⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 line.java

📁 java screenpen,包括一些最基本的功能,有实际作用,也可作为初学的参考资料.
💻 JAVA
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package screenpen;import java.awt.Color;import java.awt.Graphics;import java.util.logging.Level;import java.util.logging.Logger;/** * * @author zhaolin */public class Line implements Cloneable{    private Color color = Color.RED;    private int x1,y1,x2,y2;    public Color getColor() {        return color;    }    public void setColor(Color color) {        this.color = color;    }    public int getX1() {        return x1;    }    public void setX1(int x1) {        this.x1 = x1;    }    public int getX2() {        return x2;    }    public void setX2(int x2) {        this.x2 = x2;    }    public int getY1() {        return y1;    }    public void setY1(int y1) {        this.y1 = y1;    }    public int getY2() {        return y2;    }    public void setY2(int y2) {        this.y2 = y2;    }        public void paintMySelf(Graphics g){        g.setColor(color);        g.drawLine(x1, y1, x2, y2);    }        public Object clone(){        try {            return super.clone();        } catch (CloneNotSupportedException ex) {            Logger.getLogger(Line.class.getName()).log(Level.SEVERE, null, ex);            return null;        }    }    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -