Creating a GUI Bank Balance Application CSC 372 Colorado State University – Global Campus
Creating a GUI Bank Balance Application 2 BankA import .Label; import .TextField; import .ActionEvent; import .ActionListener; import javax .swing.JButton; import .JFrame; import .JPanel; public class BankAccount extends JPanel implements ActionListener{ JButton debit = new JButton("Debit"); JButton credit = new JButton("Credit"); JButton exit = new JButton("Exit"); TextField t1, t2, output; // text fields Label debitAccount, creditAccount, balanceAmount; // labels double accountBalance=0.0; public BankAccount(JFrame frame) { /* * * creating label , setting boundaries and adding to frame */ debitAccount = new Label(" Debit Amount :"); debitABounds(50, 100, 100, 50); (debitAccount); /* * * creating text box and setting boundaries and adding to frame */ t1 = new TextField(""); Bounds(150, 110, 100, 50); (t1); /* * * creating label , setting boundaries and adding to frame */ creditAccount = new Label(" credit Amount :"); creditABounds(50, 180, 100, 50); (creditAccount);
Written for
- Institution
- Creating a GUI Bank Balance Application CSC 372
- Course
- Creating a GUI Bank Balance Application CSC 372
Document information
- Uploaded on
- April 25, 2023
- Number of pages
- 7
- Written in
- 2022/2023
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
creating a gui bank balance application csc 372 colorado state university – global campus