?? simpletoolapp.java
字號:
/**
* Copyright 2000 MapInfo Corporation
* You are free to use this code in your applications, but you may not
* redistribute the source code without this notice.
*/
import java.awt.*;
import java.awt.event.*;
public class SimpleToolApp {
public SimpleToolApp() {
Frame frame = new SimpleToolFrame();
//Center the window
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = frame.getSize();
if (frameSize.height > screenSize.height) {
frameSize.height = screenSize.height;
}
if (frameSize.width > screenSize.width) {
frameSize.width = screenSize.width;
}
frame.setLocation((screenSize.width - frameSize.width)/2, (screenSize.height - frameSize.height)/2);
frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } });
frame.setVisible(true);
}
public static void main(String[] args) {
new SimpleToolApp();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -