This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Ex13; | |
import java.applet.Applet; | |
import java.awt.Color; | |
import java.awt.Graphics; | |
import java.awt.Image; | |
import java.awt.Toolkit; | |
public class Ex13_304 extends Applet { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.*; | |
import java.awt.geom.Line2D; | |
import java.awt.geom.Rectangle2D; | |
import javax.swing.JFrame; | |
public class Ex13_303 extends JFrame { | |
public Ex13_303() { | |
setTitle("設定線條"); | |
// 設定視窗大小 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.*; | |
import java.awt.geom.Rectangle2D; | |
import javax.swing.JFrame; | |
public class Ex13_302 extends JFrame { | |
public Ex13_302() { | |
setTitle("漸層色"); | |
// 設定視窗大小 | |
setSize(300, 300); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.*; | |
import java.awt.geom.Arc2D; | |
import java.awt.geom.Line2D; | |
import java.awt.geom.Rectangle2D; | |
import javax.swing.JFrame; | |
public class Ex13_301 extends JFrame { | |
public Ex13_301() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Ex13; | |
import java.applet.Applet; | |
import java.awt.*; | |
public class Ex13_204 extends Applet { | |
public void init() { | |
// 設定Applet背景顏色 | |
this.setBackground(Color.white); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Ex13; | |
import java.applet.Applet; | |
import java.awt.*; | |
public class Ex13_202 extends Applet { | |
public void init() { | |
// 設定Applet背景顏色 | |
this.setBackground(Color.white); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.*; | |
import java.awt.event.*; | |
import javax.swing.JFrame; | |
public class Ex13_105 extends JFrame implements MouseListener { | |
// 宣告int,存放滑鼠座標 | |
int x, y; | |
public Ex13_105() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.*; | |
import javax.swing.JFrame; | |
public class Ex13_104 extends JFrame { | |
public Ex13_104() { | |
// 設定視窗標題 | |
setTitle("視窗繪圖"); | |
// 設定視窗大小 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.applet.Applet; | |
import java.awt.*; | |
public class Ex13_103 extends Applet { | |
public void init() { | |
// 設定Applet背景顏色 | |
this.setBackground(Color.black); | |
// 設定Applet前景(繪圖)顏色 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.applet.Applet; | |
import java.awt.*; | |
public class Ex13_102 extends Applet { | |
public void init() { | |
// 設定Applet背景顏色 | |
this.setBackground(Color.black); | |
// 存放色彩變數 |
NewerOlder