main.java~9~
来自「航班查询与订票系统 用Java与sqlserver2000来编写一个航班查询与订」· JAVA~9~ 代码 · 共 46 行
JAVA~9~
46 行
package flight.Main;
import flight.assist.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Main
extends JFrame {
private UpdateComboBox update;
private Interface mainInterface;
public Main() {
update = new UpdateComboBox();
mainInterface = new Interface();
this.getContentPane().add(mainInterface);
this.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
DataBaseManager dbManager = DataBaseManager.getInstance();
dbManager.closeConnection();
System.out.println("*****************");
}
});
}
public static void main(String args[]) {
//Get the System's look for the GUI
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch (Exception e) {
}
Main frame = new Main();
frame.setSize(570, 440);
frame.setResizable(false);
frame.setTitle("航班查询与定票系统");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
frame.setLocation( (d.width - frame.getSize().width) / 2,
(d.height - frame.getSize().height) / 2);
frame.show();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?