shape.java
来自「java语言实现的一个画图小程序,可以实现绘图」· Java 代码 · 共 33 行
JAVA
33 行
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package drawfigure; import java.awt.*;class Shape{//定义一个形状抽象类 int i,sx,sy,x,y,x0,y0; //坐标 Color c; //色彩 Color back=Color.white; //dise Graphics g; //图形对象 boolean fill; Shape(){} //无参构造方法 Shape(int sx,int sy,int x,int y,Color c){//有参的构造方法 this.sx=sx; this.sy=sy; this.x=x; this.y=y; this.c=c; } void setValue(int sx,int sy,int x,int y,Color c){ this.sx=sx; this.sy=sy; this.x=x; this.y=y; this.c=c; } Graphics getG(){return g;} void draw(){}; void wipe(){};}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?