All pastes #1282234 Raw Edit

psp

public java v1 · immutable
#1282234 ·published 2008-12-11 02:14 UTC
rendered paste body
import javax.swing.*;import java.awt.event.*;import java.awt.FlowLayout;import java.awt.BorderLayout;import java.awt.Color;public class AppGui extends JFrame implements ActionListener{  public AppGui()  {    setSize(720,700);    addWindowListener(new WindowDestroyer());        //The Name Of Our Presitigous Bank    setTitle("Cash 'n Carrion Bank");    getContentPane().setLayout(new BorderLayout());        //Our mission     JLabel bgText = new JLabel("Welcome to PSP Finance - The Premier Finance Services Organization In The World - Established Around 2008 A.D.");    getContentPane().add(bgText);        //Kick off with the button Addition    JPanel buttonPanel = new JPanel();    buttonPanel.setLayout(new FlowLayout());    getContentPane().add(buttonPanel, BorderLayout.SOUTH);        //A button to open new accounts with    JButton newAccount = new JButton("Open New Account");    newAccount.addActionListener(this);    buttonPanel.add(newAccount);        //A button to check account status    JButton checkStatus = new JButton("Check Account Status");    checkStatus.addActionListener(this);    buttonPanel.add(checkStatus);        //A button to make a purchase    JButton makeTransaction = new JButton("Make A Purchase");    makeTransaction.addActionListener(this);    buttonPanel.add(makeTransaction);        //A button to quit, for those super geniuses who can't figure out what the close button is for    JButton quit = new JButton("Quit");    quit.addActionListener(this);    buttonPanel.add(quit);      }  public void actionPerformed(ActionEvent e)  {    if (e.getActionCommand().equals("Open New Account"))        {    		NewUserGui addUser = new NewUserGui();    		addUser.setVisible(true);        }        else if (e.getActionCommand().equals("Check Account Status"))    {    	CheckStatus detailCheck = new CheckStatus();    	detailCheck.setVisible(true);    }