drawcavans.java~24~
来自「Java画版程序。......................要求变态。」· JAVA~24~ 代码 · 共 41 行
JAVA~24~
41 行
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){ Graphics2D g1=(Graphics2D)g; Iterator iterator=drawedItemList.iterator(); while(iterator.hasNext()){ ((MyShape)iterator.next()).paint(g1); } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?