{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


CreatePanel - /see if the buttont"Create an...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// Assignment #: 6 // Name: your name // StudentID: your id // Lecture: your lecture // Description: it needs to be filled / import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; i public class CreatePanel extends JPanel { private Vector accountList; private JButton button1; private TransferPanel transferPanel; //Constructor initializes components and organize them using certain layouts public CreatePanel(Vector accountList, TransferPanel tPanel) { this.accountList = accountList; this.transferPanel = tPanel; // orgranize components here // here is an example button1 = new JButton("Create an Account"); add(button1); } //ButtonListener is a listener class that listens to
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: //see if the buttont "Create an account" is pushed. //When the event occurs, it adds an account information from //the text fields to the text. It also creates an Account object //using these two information and add it to the accountList. //It also does error checking. private class ButtonListener implements ActionListener { public void actionPerformed(ActionEvent event) { // if there is no error, add an account to account list // otherwise, show an error message } //end of actionPerformed method } //end of ButtonListener class } //end of CreatePanel class...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online