📄 operationframe.java
字号:
/* * OperationFrame.java * * Created on 2008年5月10日, 下午12:57 */package javaproject;import java.io.*;import java.util.ArrayList;import java.util.Arrays;import javax.swing.JFileChooser;import javax.swing.JOptionPane;import javax.swing.JTextField;/** * * @author Tian Fengping */public class OperationFrame extends javax.swing.JFrame { /** Creates new form OperationFrame */ public OperationFrame() { initComponents(); } /** 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. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { buttonGroup1 = new javax.swing.ButtonGroup(); buttonGroup2 = new javax.swing.ButtonGroup(); examinationJPanel = new javax.swing.JPanel(); number1JTextField = new javax.swing.JTextField(); name1JTextField = new javax.swing.JTextField(); date1JTextField = new javax.swing.JTextField(); numberJRadioButton = new javax.swing.JRadioButton(); nameJRadioButton = new javax.swing.JRadioButton(); dateJRadioButton = new javax.swing.JRadioButton(); seeJButton = new javax.swing.JButton(); allJRadioButton = new javax.swing.JRadioButton(); jScrollPane1 = new javax.swing.JScrollPane(); oneJTextArea = new javax.swing.JTextArea(); placeJRadioButton = new javax.swing.JRadioButton(); place1JTextField = new javax.swing.JTextField(); jPanel1 = new javax.swing.JPanel(); upJRadioButton = new javax.swing.JRadioButton(); downJRadioButton = new javax.swing.JRadioButton(); orderJButton = new javax.swing.JButton(); newJPanel = new javax.swing.JPanel(); numberJLabel = new javax.swing.JLabel(); nameJLabel = new javax.swing.JLabel(); dateJLabel = new javax.swing.JLabel(); descriptionJLabel = new javax.swing.JLabel(); number2JTextField = new javax.swing.JTextField(); name2JTextField = new javax.swing.JTextField(); date2JTextField = new javax.swing.JTextField(); ok2JButton = new javax.swing.JButton(); jScrollPane2 = new javax.swing.JScrollPane(); twoJTextArea = new javax.swing.JTextArea(); placeJLabel = new javax.swing.JLabel(); place2JTextField = new javax.swing.JTextField(); changeJPanel = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); ok3JButton = new javax.swing.JButton(); number3JTextField = new javax.swing.JTextField(); name3JTextField = new javax.swing.JTextField(); date3JTextField = new javax.swing.JTextField(); jScrollPane3 = new javax.swing.JScrollPane(); threeJTextArea = new javax.swing.JTextArea(); jLabel5 = new javax.swing.JLabel(); place3JTextField = new javax.swing.JTextField(); showJButton = new javax.swing.JButton(); ok4JButton = new javax.swing.JButton(); mainJMenuBar = new javax.swing.JMenuBar(); fileJMenu = new javax.swing.JMenu(); openFileJMenuItem = new javax.swing.JMenuItem(); editorJMenu = new javax.swing.JMenu(); lookJMenuItem = new javax.swing.JMenuItem(); newJMenuItem = new javax.swing.JMenuItem(); changeJMenuItem = new javax.swing.JMenuItem(); changPasswordJMenuItem = new javax.swing.JMenuItem(); setOrderJMenuItem = new javax.swing.JMenuItem(); helpJMenu = new javax.swing.JMenu(); authorJMenuItem = new javax.swing.JMenuItem(); versionJMenuItem = new javax.swing.JMenuItem(); jMenuItem1 = new javax.swing.JMenuItem(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Photograph Album Terminal"); examinationJPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("查看相片")); number1JTextField.setEditable(false); name1JTextField.setEditable(false); date1JTextField.setEditable(false); buttonGroup1.add(numberJRadioButton); numberJRadioButton.setText("序号"); numberJRadioButton.setEnabled(false); numberJRadioButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { numberJRadioButtonActionPerformed(evt); } }); buttonGroup1.add(nameJRadioButton); nameJRadioButton.setText("名称"); nameJRadioButton.setEnabled(false); nameJRadioButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { nameJRadioButtonActionPerformed(evt); } }); buttonGroup1.add(dateJRadioButton); dateJRadioButton.setText("日期"); dateJRadioButton.setEnabled(false); dateJRadioButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { dateJRadioButtonActionPerformed(evt); } }); seeJButton.setText("查询"); seeJButton.setEnabled(false); seeJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { seeJButtonActionPerformed(evt); } }); buttonGroup1.add(allJRadioButton); allJRadioButton.setText("所有"); allJRadioButton.setEnabled(false); oneJTextArea.setColumns(20); oneJTextArea.setEditable(false); oneJTextArea.setRows(5); jScrollPane1.setViewportView(oneJTextArea); buttonGroup1.add(placeJRadioButton); placeJRadioButton.setText("拍摄地点"); placeJRadioButton.setEnabled(false); placeJRadioButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { placeJRadioButtonActionPerformed(evt); } }); place1JTextField.setEditable(false); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("排序")); buttonGroup2.add(upJRadioButton); upJRadioButton.setText("升序"); upJRadioButton.setEnabled(false); buttonGroup2.add(downJRadioButton); downJRadioButton.setText("降序"); downJRadioButton.setEnabled(false); orderJButton.setText("排序"); orderJButton.setEnabled(false); orderJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { orderJButtonActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(upJRadioButton) .addComponent(downJRadioButton)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE) .addComponent(orderJButton) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(upJRadioButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(downJRadioButton) .addContainerGap(10, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(21, Short.MAX_VALUE) .addComponent(orderJButton) .addGap(18, 18, 18)) ); javax.swing.GroupLayout examinationJPanelLayout = new javax.swing.GroupLayout(examinationJPanel); examinationJPanel.setLayout(examinationJPanelLayout); examinationJPanelLayout.setHorizontalGroup( examinationJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(examinationJPanelLayout.createSequentialGroup() .addGroup(examinationJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, examinationJPanelLayout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 229, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, examinationJPanelLayout.createSequentialGroup() .addGap(6, 6, 6) .addComponent(dateJRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, examinationJPanelLayout.createSequentialGroup() .addContainerGap() .addGroup(examinationJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(examinationJPanelLayout.createSequentialGroup() .addGroup(examinationJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(nameJRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(numberJRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(examinationJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(place1JTextField) .addComponent(name1JTextField) .addComponent(number1JTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 88, Short.MAX_VALUE) .addComponent(date1JTextField))) .addGroup(examinationJPanelLayout.createSequentialGroup() .addGroup(examinationJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(seeJButton) .addComponent(placeJRadioButton)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, examinationJPanelLayout.createSequentialGroup() .addContainerGap() .addComponent(allJRadioButton))) .addContainerGap()) ); examinationJPanelLayout.setVerticalGroup( examinationJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(examinationJPanelLayout.createSequentialGroup() .addContainerGap() .addGroup(examinationJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(number1JTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(numberJRadioButton)) .addGap(18, 18, 18) .addGroup(examinationJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(name1JTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(nameJRadioButton)) .addGap(18, 18, 18) .addGroup(examinationJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -