📄 myoval.java
字号:
/* * File name: MyOval.java * * This file defines a MyOval class. * * Author: R. R. Gargeya * Date: 12 March 2000 * * Distribution: This header should always be included. */import java.awt.Graphics;public class MyOval{ private int x, y, width, height; public MyOval() { x = 0; y = 0; width = 0; height = 0; } public MyOval(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.fillOval(x, y, width, height); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -