📄 main.java
字号:
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.*;
import javax.swing.*;
public class Main {
public static void main(String[] args) {
try {
// UIManager.setLookAndFeel(new SubstanceLookAndFeel());
JFrame.setDefaultLookAndFeelDecorated(true);
JDialog.setDefaultLookAndFeelDecorated(true);
// UIManager.setLookAndFeel("org.fife.plaf.VisualStudio2005.VisualStudio2005LookAndFeel");
// UIManager.setLookAndFeel(new SubstanceRavenLookAndFeel())
// UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceRavenLookAndFeel");
// UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceOfficeSilver2007LookAndFeel");
// UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceAutumnLookAndFeel");
// UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceChallengerDeepLookAndFeel");
// UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceEmeraldDuskLookAndFeel");
// UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceMagmaLookAndFeel");
// UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceRavenGraphiteGlassLookAndFeel");
// UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceModerateLookAndFeel");
UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceNebulaBrickWallLookAndFeel");
// UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceSaharaLookAndFeel");
// UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceCremeLookAndFeel");
// SubstanceLookAndFeel.setCurrentTheme(new SubstanceTerracottaTheme());
// SubstanceLookAndFeel.setSkin(new EmeraldDuskSkin());
// SubstanceLookAndFeel.setCurrentButtonShaper(new ClassicButtonShaper());
// SubstanceLookAndFeel.setCurrentWatermark(new SubstanceBubblesWatermark());
// SubstanceLookAndFeel.setCurrentBorderPainter(new StandardBorderPainter());
// SubstanceLookAndFeel.setCurrentGradientPainter(new StandardGradientPainter());
// SubstanceLookAndFeel.setCurrentTitlePainter(new FlatTitePainter());
} catch (Exception e) {
System.err.println("Something went wrong!");
}
JFrame myframe = new JFrame();
PageChange pc = new PageChange();
JTabbedPane tab = new JTabbedPane();
JMenuBar mb = new JMenuBar();
JMenu mi = new JMenu("Help");
mi.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) {
JOptionPane.showMessageDialog(new JOptionPane(), "Computer Operating Systems Page-Replacement Algorthms", "提示!", JOptionPane.OK_OPTION);
}
});
mb.add(mi);
tab.add("页面置换算法", pc);
myframe.setLayout(new BorderLayout());
myframe.add(BorderLayout.NORTH, mb);
myframe.add(BorderLayout.CENTER, tab);
myframe.setTitle("Computer Operating Systems Page-Replacement Algorthms");
myframe.setSize(650, 500);
Dimension ds = Toolkit.getDefaultToolkit().getScreenSize();
myframe.setLocation((int) (ds.getWidth() - myframe.getWidth()) / 2, (int) (ds
.getHeight() - myframe.getHeight()) / 2);
myframe.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e){
System.exit(0);
}
});
myframe.show(true);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -