drawcavans.java~25~

来自「Java画版程序。......................要求变态。」· JAVA~25~ 代码 · 共 44 行

JAVA~25~
44
字号
package myframe;/** * Title: * Description: * Copyright:    Copyright (c) 2002 * Company: * @author * @version 1.0 */import javax.swing.*;import java.awt.*;import java.util.*;import myshape.*;import myshapeaction.*;public class DrawCavans extends JLabel implements GraphicsEditor {  public DrawCavans() {  }  public static int width,height;  int w=10,h=10;  public void changeView(int ince){    width+=w*ince;    height+=h*ince;  }  public void setWidthHeight(){     width=this.getWidth();     height=this.getHeight();  }  public void paintComponent(Graphics g){    g=g.create(4,4,width,height);   Iterator iterator=drawedItemList.iterator();   while(iterator.hasNext()){    ((MyShape)iterator.next()).paint(g);   }  } // Graphics2D g1=(Graphics2D)g;}

⌨️ 快捷键说明

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