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);
Escuela, estudio y materia
- Institución
- Creating a GUI Bank Balance Application CSC 372
- Grado
- Creating a GUI Bank Balance Application CSC 372
Información del documento
- Subido en
- 25 de abril de 2023
- Número de páginas
- 7
- Escrito en
- 2022/2023
- Tipo
- Examen
- Contiene
- Preguntas y respuestas
Temas
-
creating a gui bank balance application csc 372 colorado state university – global campus