📄 dialog4.java
字号:
package ct;import java.awt.*;import javax.swing.*;import com.borland.jbcl.layout.*;import java.awt.event.*;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2006</p> * <p>Company: </p> * @author not attributable * @version 1.0 */public class Dialog4 extends JDialog { JPanel jPanel1 = new JPanel(); JTextField jTextField1 = new JTextField(); XYLayout xYLayout1 = new XYLayout(); JButton jButton1 = new JButton(); JButton jButton2 = new JButton(); JButton jButton3 = new JButton(); JTextArea jTextArea1 = new JTextArea(); public Dialog4(Frame frame, String title, boolean modal) { super(frame, title, modal); try { jbInit(); pack(); } catch(Exception ex) { ex.printStackTrace(); } } public Dialog4() { this(null, "", false); } private void jbInit() throws Exception { jTextField1.setText("头像"); jPanel1.setLayout(xYLayout1); jButton1.setFont(new java.awt.Font("Dialog", 0, 15)); jButton1.setText("单机娱乐"); jButton1.addActionListener(new Dialog4_jButton1_actionAdapter(this)); jButton2.setFont(new java.awt.Font("Dialog", 0, 15)); jButton2.setText("双人对战"); jButton2.addActionListener(new Dialog4_jButton2_actionAdapter(this)); jButton3.setFont(new java.awt.Font("Dialog", 0, 15)); jButton3.setText("游戏设置"); jButton3.addActionListener(new Dialog4_jButton3_actionAdapter(this)); jTextArea1.setText("人物信息"); this.getContentPane().add(jPanel1, BorderLayout.CENTER); jPanel1.add(jTextArea1, new XYConstraints(176, 25, 185, 133)); jPanel1.add(jTextField1, new XYConstraints(42, 42, 96, 88)); jPanel1.add(jButton2, new XYConstraints(151, 205, 113, 45)); jPanel1.add(jButton3, new XYConstraints(287, 204, 97, 43)); jPanel1.add(jButton1, new XYConstraints(29, 204, 105, 47)); } void jButton2_actionPerformed(ActionEvent e) { Dialog4 D=new Dialog4(); D.show(false); Dialog3 F=new Dialog3(); F.setLocation(350,250); F.show(true); this.dispose(); } void jButton3_actionPerformed(ActionEvent e) { Dialog4 D=new Dialog4(); D.show(false); Dialog5 F=new Dialog5(); F.setLocation(350,250); F.show(true); this.dispose(); } void jButton1_actionPerformed(ActionEvent e) { Dialog4 D=new Dialog4(); D.show(false); Frame1 F=new Frame1(); F.setLocation(100,50); F.setResizable(false); this.setSize(new Dimension(800, 600)); F.show(true); this.dispose(); }}class Dialog4_jButton2_actionAdapter implements java.awt.event.ActionListener { Dialog4 adaptee; Dialog4_jButton2_actionAdapter(Dialog4 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.jButton2_actionPerformed(e); }}class Dialog4_jButton3_actionAdapter implements java.awt.event.ActionListener { Dialog4 adaptee; Dialog4_jButton3_actionAdapter(Dialog4 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.jButton3_actionPerformed(e); }}class Dialog4_jButton1_actionAdapter implements java.awt.event.ActionListener { Dialog4 adaptee; Dialog4_jButton1_actionAdapter(Dialog4 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.jButton1_actionPerformed(e); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -