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

📄 mainframe.java

📁 Java program for making trip reservations.
💻 JAVA
字号:
package try1;

import java.awt.Dimension;
import java.util.ArrayList;

import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.ListSelectionModel;
import javax.swing.SwingUtilities;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.Rectangle;



public class MainFrame extends JFrame {

	private static final long serialVersionUID = 1L;

	private JPanel jContentPane = null;

	private JScrollPane jScrollPaneTableScales = null;

	private JTable jTableScales = null;

	private JPanel jPanelBottom = null;

	private JButton jButtonAddScale = null;

	private JButton jButtonExit = null;

	private JButton jButtonChangeReservation = null;

	private ScaleTableModel scaleTableModel;

	private ArrayList list=new ArrayList();

	private JRadioButton jRadioButtonNumSys = null;

	private JRadioButton jRadioButtonNonNumSys = null;

	private JLabel jLabelNumSys = null;

	private JLabel jLabelNonNumSys = null;

	private JLabel jLabelAddScale = null;

	private JButton jButtonSearch = null;

	private JLabel jLabelWarn = null;

	private Scale scale=null;
	private ArrayList<Scale> scales=new ArrayList<Scale>();
	private ButtonGroup group=null;  //  @jve:decl-index=0:
	private int counterI;
	private int counterJ;
	private NumericScale num=null;
	private NonNumericScale nonNum=null;
	private ArrayList<NumericScale> numScales=new ArrayList<NumericScale>();  //  @jve:decl-index=0:
	private ArrayList<NonNumericScale> nonNumScales=new ArrayList<NonNumericScale>();  //  @jve:decl-index=0:

	private JTextArea jTextAreaTry = null;

	private JTextArea jTextArea = null;

	private JScrollPane jScrollPane = null;


	/**
	 * This method initializes jScrollPaneTableScales
	 *
	 * @return javax.swing.JScrollPane
	 */
	private JScrollPane getJScrollPaneTableScales() {
		if (jScrollPaneTableScales == null) {
			jScrollPaneTableScales = new JScrollPane();
			jScrollPaneTableScales.setPreferredSize(new Dimension(0, 100));
			jScrollPaneTableScales.setBounds(new java.awt.Rectangle(0,0,569,100));
			jScrollPaneTableScales.setViewportView(getJTableScales());
		}
		return jScrollPaneTableScales;
	}

	/**
	 * This method initializes jTableScales
	 *
	 * @return javax.swing.JTable
	 */
	private JTable getJTableScales() {
		if (jTableScales == null) {
			jTableScales = new JTable();
			scaleTableModel = new ScaleTableModel();
			jTableScales.setModel(scaleTableModel);
			jTableScales.setSelectionMode(
				ListSelectionModel.SINGLE_SELECTION);
		}
		return jTableScales;
	}

	/**
	 * This method initializes jPanelBottom
	 *
	 * @return javax.swing.JPanel
	 */
	private JPanel getJPanelBottom() {
		if (jPanelBottom == null) {
			jPanelBottom = new JPanel();
			jPanelBottom.setBounds(new Rectangle(1, 370, 569, 45));
			jPanelBottom.setLayout(null);
			jPanelBottom.setPreferredSize(new Dimension(0, 45));
			jPanelBottom.add(getJButtonAddScale(), null);
			jPanelBottom.add(getJButtonExit(), null);
			jPanelBottom.add(getJButtonSearch(), null);
		}
		return jPanelBottom;
	}

	/**
	 * This method initializes jButtonAddScale
	 *
	 * @return javax.swing.JButton
	 */
	private JButton getJButtonAddScale() {
		if (jButtonAddScale == null) {
			jButtonAddScale = new JButton();
			jButtonAddScale.setText("念徉忤 耔耱屐

⌨️ 快捷键说明

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