📄 analyzer.java
字号:
// CMM lexical analyzer application
import java.awt.Toolkit;
import java.awt.Dimension;
import java.awt.event.WindowEvent;
import java.awt.event.WindowAdapter;
import javax.swing.*;
/**
*
* @author 流浪的鱼 jason_kou@163.com
*/
public class Analyzer {
public static void main(String[] args) {
theApp = new Analyzer();
SwingUtilities.invokeLater(new Runnable() { // Anonymous Runnable class
// object
public void run() { // Run method executed in thread
theApp.creatGUI(); // Call static GUI creator
}
});
}
private void creatGUI() {
window = new AnalyzerFrame("CMM Lexical Analyzer");
Toolkit theKit = window.getToolkit();
Dimension wndSize = theKit.getScreenSize();
window.setBounds(wndSize.width / 9, wndSize.height / 9,
wndSize.width * 4 / 5, wndSize.height * 4 / 5);
window.setVisible(true);
}
class WindowHandler extends WindowAdapter {
// Handler for window closing event
public void windowClosing(WindowEvent e) {
}
}
private static AnalyzerFrame window;
private static Analyzer theApp;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -