newtripdialog.java

来自「Java program for making trip reservation」· Java 代码 · 共 73 行

JAVA
73
字号

import java.awt.Frame;
import java.awt.Rectangle;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import java.awt.Color;
import java.awt.SystemColor;

public class NewTripDialog extends JDialog {

	private JPanel jContentPane = null;
	private JLabel jLabel1 = null;
	private JLabel jLabel2 = null;
	private JLabel jLabel3 = null;
	private JLabel jLabel4 = null;
	private JLabel jLabel5 = null;
	private JLabel jLabel6 = null;
	private JButton jButtonOK = null;
	private boolean okPressed = false;
	private JButton jButtonCancel = null;
	/**
	 * This method initializes jTextArea1
	 *
	 * @return javax.swing.JTextArea
	 */
	private JTextField jTextField1 = null;
	private JTextField jTextField2 = null;
	private JTextField jTextField3 = null;
	private JTextField jTextField4 = null;
	private JTextField jTextField5 = null;
	private JTextField jTextField6 = null;
	private JLabel jLabel7 = null;
	private JTextField jTextField7 = null;
	private JLabel jLabel = null;
	private JLabel jLabel8 = null;
	private JLabel jLabel9 = null;
	private JLabel jLabel10 = null;
	/**
	 * This method initializes jButtonAdd
	 *
	 * @return javax.swing.JButton
	 */
	private JButton getJButtonAdd() {
		if (jButtonOK == null) {
			jButtonOK = new JButton();
			jButtonOK.setBounds(new Rectangle(228, 282, 96, 26));
			jButtonOK.setBackground(SystemColor.info);
			jButtonOK.setText("念徉忤");
			jButtonOK.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					okPressed=true;
					setVisible(false);
				}
			});
		}
		return jButtonOK;
	}

	/**
	 * This method initializes jButtonCancel
	 *
	 * @return javax.swing.JButton
	 */
	private JButton getJButtonCancel() {
		if (jButtonCancel == null) {
			jButtonCancel = new JButton();
			jButtonCancel.setBounds(new Rectangle(376, 285, 88, 23));
			jButtonCancel.setBackground(SystemColor.info);
			jButtonCancel.setText("悟赅

⌨️ 快捷键说明

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