📄 main.java
字号:
package com.king4solomon.homework.compiler.gui;
import javax.swing.*;
import javax.swing.plaf.*;
import java.awt.Font;
public class Main {
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException,
UnsupportedLookAndFeelException {
// TODO Auto-generated method stub
/**
* 改变当前project所使用的Look&Feel为系统模式,在当前环境下即
* com.sun.java.swing.plaf.Windows.WindowsLookAndFeel 未使用try块而是采用throw
* unhandled exception抛出异常
*/
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
setUIFont(new FontUIResource("Dialog", Font.PLAIN, 12));
HandoutFrame handout = new HandoutFrame("Extended C0 Compiler");
handout.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
handout.setVisible(true);
}
public static void setUIFont(javax.swing.plaf.FontUIResource f) {
//
// sets the default font for all Swing components.
// ex.
// setUIFont (new
// javax.swing.plaf.FontUIResource("Serif",Font.ITALIC,12));
//
java.util.Enumeration keys = UIManager.getDefaults().keys();
while (keys.hasMoreElements()) {
Object key = keys.nextElement();
Object value = UIManager.get(key);
if (value instanceof javax.swing.plaf.FontUIResource)
UIManager.put(key, f);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -