⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mainfram.java

📁 java做的机票查询系统、 仅供初学者参考! 包含了数据库!!
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/*
 * MainFram.java
 *
 * Created on __DATE__, __TIME__
 */

package GaoerferPackage;

/**
 *
 * @author  __USER__
 */
public class MainFram extends javax.swing.JFrame {

	/** Creates new form MainFram */
	public MainFram() {
		initComponents();
		this.setTitle("高尔夫预定系统");
		cboCourt.setEnabled(false);
		txtNum.setEditable(false);
		labPrice.setEnabled(false);
		btnPreper.setEnabled(false);
	}

	/** This method is called from within the constructor to
	 * initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is
	 * always regenerated by the Form Editor.
	 */
	//GEN-BEGIN:initComponents
	// <editor-fold defaultstate="collapsed" desc="Generated Code">
	private void initComponents() {

		jLabel1 = new javax.swing.JLabel();
		txtCard = new javax.swing.JTextField();
		jLabel2 = new javax.swing.JLabel();
		txtPassword = new javax.swing.JPasswordField();
		btnDism = new javax.swing.JButton();
		cboCourt = new javax.swing.JComboBox();
		jLabel3 = new javax.swing.JLabel();
		jLabel4 = new javax.swing.JLabel();
		labPrice = new javax.swing.JLabel();
		jLabel5 = new javax.swing.JLabel();
		txtNum = new javax.swing.JTextField();
		btnPreper = new javax.swing.JButton();

		setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

		jLabel1.setFont(new java.awt.Font("宋体", 1, 18));
		jLabel1.setText("\u4f1a\u5458\u5361\u53f7\uff1a");

		jLabel2.setFont(new java.awt.Font("宋体", 1, 18));
		jLabel2.setText("\u5bc6\u7801\uff1a");

		btnDism.setFont(new java.awt.Font("宋体", 0, 18));
		btnDism.setText("\u4f1a\u5458\u767b\u5f55");
		btnDism.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				btnDismActionPerformed(evt);
			}
		});

		cboCourt.setFont(new java.awt.Font("宋体", 1, 18));
		cboCourt.setModel(new javax.swing.DefaultComboBoxModel(new String[] {
				"东邪", "西毒", "南帝", "北丐", "中神通" }));
		cboCourt.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				cboCourtActionPerformed(evt);
			}
		});

		jLabel3.setFont(new java.awt.Font("宋体", 1, 18));
		jLabel3.setText("\u53ef\u9009\u7403\u573a\uff1a");

		jLabel4.setFont(new java.awt.Font("宋体", 1, 18));
		jLabel4.setText("\u6bcf\u573a\u5355\u4ef7\uff1a");

		labPrice.setFont(new java.awt.Font("宋体", 1, 24));
		labPrice.setText("10000");

		jLabel5.setFont(new java.awt.Font("宋体", 1, 18));
		jLabel5.setText("\u9884\u5b9a\u573a\u6b21\uff1a");

		txtNum.setFont(new java.awt.Font("宋体", 1, 24));

		btnPreper.setFont(new java.awt.Font("宋体", 0, 18));
		btnPreper.setText("\u4f1a\u5458\u9884\u5b9a");
		btnPreper.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				btnPreperActionPerformed(evt);
			}
		});

		org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
				getContentPane());
		getContentPane().setLayout(layout);
		layout
				.setHorizontalGroup(layout
						.createParallelGroup(
								org.jdesktop.layout.GroupLayout.LEADING)
						.add(0, 553, Short.MAX_VALUE)
						.add(
								layout
										.createSequentialGroup()
										.add(57, 57, 57)
										.add(
												layout
														.createParallelGroup(
																org.jdesktop.layout.GroupLayout.TRAILING)
														.add(
																org.jdesktop.layout.GroupLayout.LEADING,
																jLabel5,
																org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																145,
																Short.MAX_VALUE)
														.add(
																org.jdesktop.layout.GroupLayout.LEADING,
																jLabel4,
																org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																145,
																Short.MAX_VALUE)
														.add(
																org.jdesktop.layout.GroupLayout.LEADING,
																layout
																		.createParallelGroup(
																				org.jdesktop.layout.GroupLayout.TRAILING,
																				false)
																		.add(
																				org.jdesktop.layout.GroupLayout.LEADING,
																				jLabel3,
																				org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																				org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																				Short.MAX_VALUE)
																		.add(
																				org.jdesktop.layout.GroupLayout.LEADING,
																				jLabel1,
																				org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																				org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																				Short.MAX_VALUE)
																		.add(
																				org.jdesktop.layout.GroupLayout.LEADING,
																				jLabel2,
																				org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																				84,
																				org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
										.add(37, 37, 37)
										.add(
												layout
														.createParallelGroup(
																org.jdesktop.layout.GroupLayout.LEADING)
														.add(
																layout
																		.createSequentialGroup()
																		.add(
																				layout
																						.createParallelGroup(
																								org.jdesktop.layout.GroupLayout.LEADING)
																						.add(
																								txtPassword,
																								org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																								168,
																								Short.MAX_VALUE)
																						.add(
																								txtCard,
																								org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																								143,
																								org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
																		.addContainerGap(
																				146,
																				Short.MAX_VALUE))
														.add(
																layout
																		.createSequentialGroup()
																		.add(
																				layout
																						.createParallelGroup(
																								org.jdesktop.layout.GroupLayout.TRAILING,
																								false)
																						.add(
																								org.jdesktop.layout.GroupLayout.LEADING,
																								labPrice,
																								org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																								org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																								Short.MAX_VALUE)
																						.add(
																								org.jdesktop.layout.GroupLayout.LEADING,
																								cboCourt,
																								0,
																								146,
																								Short.MAX_VALUE)
																						.add(
																								org.jdesktop.layout.GroupLayout.LEADING,
																								txtNum))
																		.addContainerGap())))
						.add(
								org.jdesktop.layout.GroupLayout.TRAILING,
								layout
										.createSequentialGroup()
										.addContainerGap(381, Short.MAX_VALUE)
										.add(
												layout
														.createParallelGroup(
																org.jdesktop.layout.GroupLayout.TRAILING)
														.add(btnPreper).add(
																btnDism)).add(
												67, 67, 67)));
		layout
				.setVerticalGroup(layout
						.createParallelGroup(
								org.jdesktop.layout.GroupLayout.LEADING)
						.add(0, 498, Short.MAX_VALUE)
						.add(
								layout
										.createSequentialGroup()
										.add(42, 42, 42)
										.add(
												layout
														.createParallelGroup(
																org.jdesktop.layout.GroupLayout.BASELINE)
														.add(
																jLabel1,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																32,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
														.add(
																txtCard,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																29,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
										.add(29, 29, 29)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -