bankadmin.java

来自「JavaeeTutorial5的源代码。」· Java 代码 · 共 1,078 行 · 第 1/5 页

JAVA
1,078 行
字号
        streetLabel.setText("Street:");        cityLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);        cityLabel.setText("City:");        stateLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);        stateLabel.setText("State:");        zipLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);        zipLabel.setText("Zip:");        phoneLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);        phoneLabel.setText("Phone:");        emailLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);        emailLabel.setText("Email:");        firstNameTextField.setEditable(false);        lastNameTextField.setEditable(false);        middleInitialTextField.setEditable(false);        streetTextField.setEditable(false);        cityTextField.setEditable(false);        stateTextField.setEditable(false);        zipTextField.setEditable(false);        phoneTextField.setEditable(false);        emailTextField.setEditable(false);        customerOpenButton.setText("Open");        customerOpenButton.addMouseListener(                new java.awt.event.MouseAdapter() {                    public void mouseReleased(java.awt.event.MouseEvent evt) {                        customerOpenButtonMouseReleased(evt);                    }                });        customerNewButton.setText("New Customer");        customerNewButton.addMouseListener(                new java.awt.event.MouseAdapter() {                    public void mouseReleased(java.awt.event.MouseEvent evt) {                        customerNewButtonMouseReleased(evt);                    }                });        customerUpdateButton.setText("Update");        customerUpdateButton.setEnabled(false);        customerUpdateButton.addMouseListener(                new java.awt.event.MouseAdapter() {                    public void mouseReleased(java.awt.event.MouseEvent evt) {                        customerUpdateButtonMouseReleased(evt);                    }                });        customerRemoveButton.setText("Remove");        customerRemoveButton.setEnabled(false);        customerRemoveButton.addMouseListener(                new java.awt.event.MouseAdapter() {                    public void mouseReleased(java.awt.event.MouseEvent evt) {                        customerRemoveButtonMouseReleased(evt);                    }                });        customerCancelButton.setText("Cancel");        customerCancelButton.addMouseListener(                new java.awt.event.MouseAdapter() {                    public void mouseReleased(java.awt.event.MouseEvent evt) {                        customerCancelButtonMouseReleased(evt);                    }                });        customerSearchPanel.setBorder(                javax.swing.BorderFactory.createTitledBorder(                        null,                        "Customer Actions",                        javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,                        javax.swing.border.TitledBorder.DEFAULT_POSITION,                        new java.awt.Font("Tahoma", 0, 11),                        new java.awt.Color(0, 0, 0)));        customerSearchLabel.setText("Search By Last Name:");        customerSearchButton.setText("Search");        customerSearchButton.addMouseListener(                new java.awt.event.MouseAdapter() {                    public void mouseReleased(java.awt.event.MouseEvent evt) {                        customerSearchButtonMouseReleased(evt);                    }                });        customerSearchList.setSelectionMode(                javax.swing.ListSelectionModel.SINGLE_SELECTION);        customerSearchList.setEnabled(false);        customerSearchScrollPane.setViewportView(customerSearchList);        org.jdesktop.layout.GroupLayout customerSearchPanelLayout = new org.jdesktop.layout.GroupLayout(                    customerSearchPanel);        customerSearchPanel.setLayout(customerSearchPanelLayout);        customerSearchPanelLayout.setHorizontalGroup(                customerSearchPanelLayout.createParallelGroup(                        org.jdesktop.layout.GroupLayout.LEADING).add(                        org.jdesktop.layout.GroupLayout.TRAILING,                        customerSearchPanelLayout.createSequentialGroup().addContainerGap().add(                                customerSearchPanelLayout.createParallelGroup(                                        org.jdesktop.layout.GroupLayout.TRAILING).add(                                        org.jdesktop.layout.GroupLayout.LEADING,                                        customerSearchScrollPane,                                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,                                        409,                                        Short.MAX_VALUE).add(                                        customerSearchPanelLayout.createSequentialGroup().add(                                                customerSearchLabel).addPreferredGap(                                                org.jdesktop.layout.LayoutStyle.RELATED).add(                                                customerSearchTextField,                                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,                                                300,                                                Short.MAX_VALUE))).addPreferredGap(                                org.jdesktop.layout.LayoutStyle.RELATED).add(                                customerSearchButton).addContainerGap()));        customerSearchPanelLayout.setVerticalGroup(                customerSearchPanelLayout.createParallelGroup(                        org.jdesktop.layout.GroupLayout.LEADING).add(                        customerSearchPanelLayout.createSequentialGroup().add(                                11,                                11,                                11).add(                                customerSearchPanelLayout.createParallelGroup(                                        org.jdesktop.layout.GroupLayout.BASELINE).add(                                        customerSearchLabel).add(                                        customerSearchTextField,                                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,                                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,                                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).add(                                        customerSearchButton)).addPreferredGap(                                org.jdesktop.layout.LayoutStyle.RELATED).add(                                customerSearchScrollPane,                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,                                87,                                Short.MAX_VALUE).addContainerGap()));        org.jdesktop.layout.GroupLayout customerInfoPanelLayout = new org.jdesktop.layout.GroupLayout(                    customerInfoPanel);        customerInfoPanel.setLayout(customerInfoPanelLayout);        customerInfoPanelLayout.setHorizontalGroup(                customerInfoPanelLayout.createParallelGroup(                        org.jdesktop.layout.GroupLayout.LEADING).add(                        org.jdesktop.layout.GroupLayout.TRAILING,                        customerInfoPanelLayout.createSequentialGroup().add(                                customerInfoPanelLayout.createParallelGroup(                                        org.jdesktop.layout.GroupLayout.TRAILING).add(                                        org.jdesktop.layout.GroupLayout.LEADING,                                        customerInfoPanelLayout.createSequentialGroup().addContainerGap().add(                                                customerSearchPanel,                                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,                                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,                                                Short.MAX_VALUE)).add(                                        customerInfoPanelLayout.createSequentialGroup().add(                                                10,                                                10,                                                10).add(                                                customerInfoPanelLayout.createParallelGroup(                                                        org.jdesktop.layout.GroupLayout.TRAILING,                                                        false).add(                                                        middleInitialLabel,                                                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,                                                        97,                                                        Short.MAX_VALUE).add(                                                        org.jdesktop.layout.GroupLayout.LEADING,                                                        lastNameLabel,                                                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,                                                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,                                                        Short.MAX_VALUE).add(                                                        streetLabel,                                                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,                                                        97,                                                        Short.MAX_VALUE).add(                                                        cityLabel,                                                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,                                                        97,                                                        Short.MAX_VALUE).add(                                                        stateLabel,                                                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,                                                        97,                                                        Short.MAX_VALUE).add(                                                        zipLabel,                                                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,                                                        97,                                                        Short.MAX_VALUE).add(                                                        phoneLabel,                                                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,                                                        97,                                                        Short.MAX_VALUE).add(                                                        emailLabel,                                                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,                                                        97,                                                        Short.MAX_VALUE).add(                                                        customerIdLabel,                                                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,                                                        97,                                                        Short.MAX_VALUE).add(                                                        org.jdesktop.layout.GroupLayout.LEADING,                                                        firstNameLabel,                                                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,                                                        97,                                                        Short.MAX_VALUE)).addPreferredGap(                                                org.jdesktop.layout.LayoutStyle.RELATED).add(                                                customerInfoPanelLayout.createParallelGroup(                                                        org.jdesktop.layout.GroupLayout.LEADING).add(                                                        org.jdesktop.layout.GroupLayout.TRAILING,                                                        firstNameTextField,                                                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,

⌨️ 快捷键说明

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