lines.java
来自「java语言实现的一个画图小程序,可以实现绘图」· Java 代码 · 共 31 行
JAVA
31 行
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package drawfigure;import java.awt.Color; class Lines extends Shape{ public Lines(){} public Lines(int sx,int sy,int x,int y,Color c){ super(sx,sy,x,y,c);i=1; } @Override void setValue(int sx,int sy,int x,int y,Color c){ super.setValue(sx,sy,x,y,c);i=1; } @Override void draw() { g.setColor(c); g.setPaintMode(); g.drawLine(sx,sy,x,y); } @Override void wipe() { g.setXORMode(back); g.drawLine(sx,sy,x,y); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?