• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ATM--Homework assignment

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic