求 JAVA 算24点的代码import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
public class calculate24 extends JFrame{
private javax.swing.JPanel jContentPane = null;
private JLabel jLabel = null;
private JLabel jLabel1 = null;
private JTextField jTextField = null;
private JTextField jTextField1 = null;
private JTextArea jTextArea = null;
private JLabel jLabel2 = null;
private JButton jButton = null;
private JScrollPane jScrollPane = null;
private JButton jButton1 = null;
private JButton jButton2 = null;
private JButton jButton3 = null;
private JButton jButton4 = null;
private JButton jButton5 = null;
private JButton jButton6 = null;
private JButton jButton7 = null;
private JButton jButton8 = null;
private JButton jButton9 = null;
private JButton jButton10 = null;
/**
* This is the default constructor
*/
public calculate24() {
super();
initialize();
}
/**
* This method initializes this
*
* @return void
【java小游戏代码24点的简单介绍】*/
private void initialize() {
this.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
this.setBounds(200, 200, 565, 452);
this.setContentPane(getJContentPane());
this.setTitle("24点");
}
/**
* This method initializes jContentPane
*
* @return javax.swing.JPanel
*/
private javax.swing.JPanel getJContentPane() {
if (jContentPane == null) {
jLabel2 = new JLabel();
jLabel1 = new JLabel();
jLabel = new JLabel();
jContentPane = new javax.swing.JPanel();
jContentPane.setLayout(null);
jLabel.setBounds(66, 52, 150, 45);
jLabel.setText("please unter four number");
jLabel1.setBounds(253, 52, 282, 45);
jLabel1.setText("please unter how many result do you want to get");
jLabel2.setBounds(354, 201, 70, 36);
jLabel2.setText("result");
jContentPane.add(getJButton(), null);
jContentPane.add(jLabel, null);
jContentPane.add(jLabel1, null);
jContentPane.add(getJTextField(), null);
jContentPane.add(getJTextField1(), null);
jContentPane.add(jLabel2, null);
jContentPane.add(getJScrollPane(), null);
jContentPane.add(getJButton1(), null);
jContentPane.add(getJButton2(), null);
jContentPane.add(getJButton3(), null);
jContentPane.add(getJButton4(), null);
jContentPane.add(getJButton5(), null);
jContentPane.add(getJButton6(), null);
jContentPane.add(getJButton7(), null);
jContentPane.add(getJButton8(), null);
jContentPane.add(getJButton9(), null);
jContentPane.add(getJButton10(), null);
}
return jContentPane;
}
/**
* This method initializes jTextField
*
* @return javax.swing.JTextField
*/
private JTextField getJTextField() {
if (jTextField == null) {
jTextField = new JTextField();
jTextField.setBounds(67, 84, 149, 41);
jTextField.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent e) {
jTextField.select(0,jTextField.getText().length());
}
});
}
return jTextField;
}
/**
* This method initializes jTextField1
*
* @return javax.swing.JTextField
*/
private JTextField getJTextField1() {
if (jTextField1 == null) {
jTextField1 = new JTextField();
推荐阅读
- 弟弟玩益智游戏的说说,弟弟玩益智游戏的说说句子
- 天津如何做好微营销推广,天津微帮推广微信号
- 直播买理发工具,直播剪头发
- php数据为空时的判断 php判断为空的方法有哪些
- mysql添加索引特别慢,mysql中添加索引语句
- 电商视频如何优化推广,电商视频如何优化推广策略
- 像素射击免费购买版本游戏,像素射击免费版下载
- linux强制挂载命令 linux强制解除挂载
- 魔龙2070s显卡怎么装,2070s魔龙显卡长度