?? myrect.java
字號:
/* * File name: MyRect.java * * This file defines a MyRect class. * * Author: R. R. Gargeya * Date: 12 March 2000 * * Distribution: This header should always be included. */import java.awt.Graphics;public class MyRect{ private int x, y, width, height; public MyRect() { x = 0; y = 0; width = 0; height = 0; } public MyRect(int x, int y, int width, int height) { this.x = x; this.y = y; this.width = width; this.height = height; } public void setX(int x) { this.x = x; } public void setY(int y) { this.y = y; } public void setWidth(int width) { this.width = width; } public void setHeight(int height) { this.height = height; } public int getX() { return x; } public int getY() { return y; } public int getWidth() { return width; } public int getHeight() { return height; } public void draw(Graphics g) { g.drawRect(x, y, width, height); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -