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
Greenhorn
Joined: Mar 30, 2001
Posts: 24
posted
0
hi, 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. sanjay