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

📄 paintbox.java

📁 利用java编写的paintbox小程序
💻 JAVA
字号:
/*
 * PaintBox.java
 *
 * Created on 2007年4月23日, 下午11:55
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package paintbox;

/**
 *
 * @author fly
 */
import java.awt.event.*;
import java.awt.*;

public class PaintBox {
    
    /** Creates a new instance of PaintBox */
    public PaintBox() {
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
      PaintBoxFrame frame = new PaintBoxFrame ();
      
      //以下使窗口显示在屏幕的中央
      frame.pack ();
      Dimension screenSize=Toolkit.getDefaultToolkit().getScreenSize();
      int screenWidth=screenSize.width;
      int screenHeight=screenSize.height;
      Dimension frameSize=frame.getSize();
      int frameWidth=frameSize.width;
      int frameHeight=frameSize.height;
      int x=(screenWidth-frameWidth)/2;
      int y=(screenHeight-frameHeight)/2;
      frame.setLocation(x,y);
      
      
      frame.setVisible (true);
      frame.setResizable (false);
    }
    
}

⌨️ 快捷键说明

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