File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes ATM--Homework assignment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "ATM--Homework assignment" Watch "ATM--Homework assignment" New topic

ATM--Homework assignment

Jeff Myers

Joined: Apr 07, 2001
Posts: 1
I can get the display to show the North, South, Center, and East portions of the display using BorderLayout, but how do I put 3 buttons (stacked vertically) into the East portion and get them to do their required actions when the info is entered into the textfield in the North portion? Also, how do I get the four BorderLayout areas to not come up as buttons? The book that I am using does a lousy job explaining and I am at wits end. Please help!
sanjays samadder

Joined: Mar 30, 2001
Posts: 24
seems that you have been long waiting for reply.
what you do to get three buttons at the north position is
first get an instance of panel put that to the north.
using the frames default borderlayout.
then assign gridlayout to that panel by
p.setLayout( new GridLayout(3,1));
it creates a grid of 3by 1 then add the three buttons in order
to the panel.
to recieve ActionEvent from this buttons implemet the ActionListener Interface As usuall and Override the actionPerformed method one actionPerformed method will handle all the action for all the button if you have declared them global of as member varilabes as you call them
hpoe this makes it clear.
I agree. Here's the link:
subject: ATM--Homework assignment
It's not a secret anymore!