frmEverbox.setResizable(false);
frmEverbox.setTitle("Everbox \u7BA1\u7406\u5668");
frmEverbox.setBounds(100, 100, 450, 600);
frmEverbox.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
JMenuBar menuBar = new JMenuBar();
frmEverbox.setJMenuBar(menuBar);
JMenu FileMenu = new JMenu("File");
menuBar.add(FileMenu);
JMenuItem ExitMenuItem = new JMenuItem("\u9000\u51FA");
ExitMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
client.run = false;
stopClientButton.setText("正在关闭,请等候");
while(true) {
if(clientThread.isAlive())
try {
Thread.sleep(1000);
} catch (Throwable e1) {
}
break;
}
frmEverbox.dispose();
}
});
FileMenu.add(ExitMenuItem);
JMenu cleanMenu = new JMenu("\u6E05\u7406");
menuBar.add(cleanMenu);
JMenuItem mntmNewMenuItem = new JMenuItem("\u6E05\u7406\u767B\u9646\u4FE1\u606F");
mntmNewMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
File f = new File("everbox.data");
if(f.exists())
f.delete();
}
});
mntmNewMenuItem.setEnabled(false);
cleanMenu.add(mntmNewMenuItem);
JMenuItem mntmNewMenuItem_1 = new JMenuItem("\u6E05\u7406\u65E5\u5FD7\u4FE1\u606F");
mntmNewMenuItem_1.setEnabled(false);
cleanMenu.add(mntmNewMenuItem_1);
JMenuItem mntmNewMenuItem_3 = new JMenuItem("\u6E05\u7406\u4E0B\u8F7D\u7528\u5230\u7684\u4E34\u65F6\u6587\u4EF6");
mntmNewMenuItem_3.setEnabled(false);
cleanMenu.add(mntmNewMenuItem_3);
JMenuItem mntmNewMenuItem_4 = new JMenuItem("\u6E05\u7406\u6587\u4EF6\u6570\u636E\u5E93");
mntmNewMenuItem_4.setEnabled(false);
cleanMenu.add(mntmNewMenuItem_4);
JMenu helpMenu = new JMenu("\u5E2E\u52A9");
menuBar.add(helpMenu);
JMenuItem vistHomepageMenuItem = new JMenuItem("\u8BBF\u95EE\u9879\u76EE\u9996\u9875");
vistHomepageMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {