All pastes #207524 Raw Edit

ravi

public java v1 · immutable
#207524 ·published 2006-10-18 01:52 UTC
rendered paste body
import java.awt.event.*;import java.awt.*;import javax.swing.*;public class program6 extends JFrame{			 			 		 				 			public static void main(String[] args)		 {		 	final int WIDTH = 500;			final int HEIGHT = 400;		 	int acnum; 			JLabel depositL, withdrawL; 			JTextField depositTF, withdrawTF;			JButton calculateB, exitB, checkBalanceb;			Container content;			ExitButtonHandler ebHandler;			CalculateButtonHandler cbHandler;			CheckBalanceHandler cbbHandler;			depositL = new JLabel("Enter the amount you want to deposit: ", SwingConstants.RIGHT);			withdrawL = new JLabel("Enter the amount you want to withdraw: ", SwingConstants.RIGHT);									depositTF = new JTextField(10);			withdrawTF = new JTextField(10);							calculateB = new JButton("Calculate");			cbHandler = new CalculateButtonHandler();			calculateB.addActionListener(cbHandler);						exitB = new JButton("Exit");			ebHandler = new ExitButtonHandler();			exitB.addActionListener(ebHandler);						checkBalanceb = new JButton("Check balance");			cbbHandler = new CheckBalanceHandler();			checkBalanceb.addActionListener(cbbHandler);									JFrame frame;					frame = new JFrame();			content = frame.getContentPane();						frame.setTitle("Roshni's Bank: Welcome to your account");  			frame.setSize(WIDTH, HEIGHT);			frame.setDefaultCloseOperation(EXIT_ON_CLOSE);				content.setLayout(new GridLayout (4, 2));						content.add(depositL);			content.add(depositTF);		   content.add(withdrawL);			content.add(withdrawTF);			frame.setVisible(true);					deposit depositListener = new deposit();		   withdraw withdrawListener = new withdraw();			CheckBalanceHandler CheckBalanceListener = new CheckBalanceHandler();											JButton depositButton = new JButton("deposit");						depositButton.addActionListener(depositListener);						content.add(depositButton);												JButton withdrawButton = new JButton("withdraw");						withdrawButton.addActionListener(withdrawListener);						content.add(withdrawButton);												JButton CheckBalanceButton = new JButton("Check balance");						CheckBalanceButton.addActionListener(CheckBalanceListener);						content.add(CheckBalanceButton);									content.setVisible(true);					frame.pack();		}			private static class CalculateButtonHandler implements ActionListener			{				public void actionPerformed(ActionEvent e)				{					double amount, deposit, withdraw;					int acnum;															}				}						private static class CheckBalanceHandler implements ActionListener			{				public void actionPerformed(ActionEvent e)				{									}			}										private static class ExitButtonHandler implements ActionListener			{				public void actionPerformed(ActionEvent e)				{					System.exit(0);				}			}				 public static class deposit implements ActionListener		{										public void actionPerformed(ActionEvent e)					{										}				}					public static class withdraw implements ActionListener		 {			public void actionPerformed(ActionEvent e)				{										}		 }	}