|
文本编辑器源文件(java语言)(6) this.fr= fr; setBackground(Color.lightGray); }
public void show(int x,int y) { repaint(); reshape(x,y,100,160); show(); }
private void draw_uplines(Graphics g,int x,int y,int w1,int h1) { g.setColor(Color.white); g.drawLine(x,y,x+w1-1,x); g.drawLine(x,y,x,y+h1-1);
g.setColor(Color.black); g.drawLine(x+w1-1,y-1,x+w1-1,y+h1-1); g.drawLine(x+w1-2,y+1,x+w1-2,y+h1-2); g.drawLine(x+1,y+h-2,x+w1-2,y+h1-2); // g.drawLine(x,y+h1-1,x+w1-1,y+h1-1); // g.setColor(Color.black); // g.drawLine(x,y+h1-1,x+w1-1,y+h1-1); } public void paint(Graphics g) { sz= size(); w= sz.width; h= sz.height; // g.setFont(Ffont); fm= g.getFontMetrics(); fh=fm.getHeight(); fw= fm.charWidth('C'); g.setColor(Color.gray);
|