📄 openingpanel.java
字号:
gridBagConstraints.gridy = 4;
add(jLabel2, gridBagConstraints);
jLabel3.setText("http://netwar.sourceforge.net");
jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 17;
add(jLabel3, gridBagConstraints);
jLabel4.setText("v 0.5.0");
jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 18;
add(jLabel4, gridBagConstraints);
jButton1.setToolTipText("This will allow you to Host a Game");
jButton1.setText("Host Game");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 8;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
add(jButton1, gridBagConstraints);
jButton2.setToolTipText("You can join a game by clicking here");
jButton2.setText("Join Game");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 11;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
add(jButton2, gridBagConstraints);
jButton3.setToolTipText("About Netwar");
jButton3.setText("About Netwar");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 14;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
add(jButton3, gridBagConstraints);
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
//Start the server and bring up the Host game dialog
Netwar.netwar.switchToViewer(new HostConnection());
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
//Bring up dialog to connect to client
Netwar.netwar.switchToViewer(new ClientConnection());
}
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
javax.swing.JOptionPane.showMessageDialog(((netwar.gui.OpeningPanel)netwar.Netwar.netwar.getDataViewer()),
"Netwar is an Open Source Project.\n\nDevelopers:\n\nDaniel Grund\nBrian Hibler\nKyle Kakligian\nJason Komutrattananon\n\nWebsite: http://netwar.sourceforge.net\n\nFor Licensing Information, please view copying.txt",
"About Netwar",
javax.swing.JOptionPane.INFORMATION_MESSAGE);
}
// Variables declaration
private javax.swing.JDialog jDialog1;
private javax.swing.JButton jButton3;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel2;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JLabel jLabel1;
private javax.swing.JTextArea jTextArea2;
private javax.swing.JTextArea jTextArea1;
private javax.swing.JComboBox jComboBox1;
private javax.swing.JLabel jLabel5;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -