^^"
帮朋友问的
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class SPC_interface extends JFrame {
private static Bank bank;
private JTabbedPane menuTab, tellerSubMenuTab;
private JPanel bankPanel, tellerPanel, tellerCreateCustPanel, tellerSearchCustPanel;
private JTextField bankName, bankAddress, bankPhoneNumber, bankWebSite, fName, lName, dob, amount, searchCustID;
private JButton bankViewButt, bankUpdateButt, bankResetButt, customerResetButt, customerCreateButt, custSearchResetButt, custSearchButt;
private JTextArea searchResult;
private GridBagConstraints gbc = new GridBagConstraints();
private static Teller kent;
public SPC_interface() {
super( "SPC Banking" );
Container container = getContentPane();
container.setLayout(new FlowLayout());
menuTab= new JTabbedPane();
container.add(menuTab);
bankPanel = new JPanel ();
bankPanel.setLayout(new GridBagLayout());
menuTab.add (bankPanel, "Bank Info");
gbc.gridx = 0 ;
gbc.gridy = 0 ;
bankPanel.add( new JLabel("Bank name: "), gbc );
gbc.gridx = 2 ;
gbc.gridy = 0 ;
bankName = new JTextField( 20 );
bankPanel.add( bankName, gbc );
gbc.gridx = 0 ;
gbc.gridy = 1 ;
bankPanel.add( new JLabel("Bank address: "), gbc );
gbc.gridx = 2 ;
gbc.gridy = 1 ;
bankAddress = new JTextField( 20 );
bankPanel.add( bankAddress, gbc );
gbc.gridx = 0 ;
gbc.gridy = 2 ;
bankPanel.add( new JLabel("Bank phone number:"), gbc );
gbc.gridx = 2 ;
gbc.gridy = 2 ;
bankPhoneNumber = new JTextField( 20 );
bankPanel.add( bankPhoneNumber, gbc );
gbc.gridx = 0 ;
gbc.gridy = 3 ;
bankPanel.add( new JLabel("Bank web site:"), gbc );
gbc.gridx = 2 ;
gbc.gridy = 3 ;
bankWebSite = new JTextField( 20 );
bankPanel.add( bankWebSite, gbc );
gbc.gridx = 0 ;
gbc.gridy = 4 ;
bankPanel.add( new JLabel(" "), gbc );
gbc.gridx = 0 ;
gbc.gridy = 5 ;
bankResetButt = new JButton ( "Reset" );
bankPanel.add( bankResetButt, gbc );
ButtonHandler bankResetButtHandler = new ButtonHandler();
bankResetButt.addActionListener( bankResetButtHandler );
gbc.gridx = 1 ;
gbc.gridy = 5 ;
bankViewButt = new JButton ( "View" );
bankPanel.add( bankViewButt, gbc );
ButtonHandler bankViewButtHandler = new ButtonHandler();
bankViewButt.addActionListener( bankViewButtHandler );
gbc.gridx = 2 ;
gbc.gridy = 5 ;
bankUpdateButt = new JButton ( "Update" );
bankPanel.add( bankUpdateButt, gbc );
ButtonHandler bankUpdateButtHandler = new ButtonHandler();
bankUpdateButt.addActionListener( bankUpdateButtHandler );
//teller menu
tellerPanel = new JPanel ..
访客只能看到部份内容,免费 加入会员 或由脸书 Google 可以看到全部内容