?? drawinggraphic.java.txt
字號:
//DrawingGraphic.java文件代碼
import java.applet.*;
import java.awt.*;
public class DrawingGraphic extends Applet {
int width, height;
public void init() {
width = getSize().width;
height = getSize().height;
setBackground( Color.pink );
}
public void paint( Graphics g ) {
g.setColor(Color.red);
g.drawRect(10,30,getWidth()/2-50,getHeight()/2-50);
g.drawOval(10,30,getWidth()/2-50,getHeight()/2-50);
g.drawLine(10,30,5+getWidth()/2-50,30+getHeight()/2-50);
g.setColor( Color.blue );
g.fillRoundRect( 100, 160, 80, 110, 30, 40 );
g.setColor( Color.darkGray );
g.fillArc( 140, 40, 120, 120, 90, 135 );
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -