Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BorderLayout problem!!!

Status
Not open for further replies.

Govnor

Technical User
Sep 3, 2002
55
GB
hi,
i want to use BorderLayout to set my layout, but when i add two buttons in the NORTH area, only one button shows,

i think the secound button over writes the first button,

code:
c.add(BorderLayout.NORTH, dealButton);
c.add(BorderLayout.NORTH, shuffleButton);

only shufflebutton shows!!!!

help please!!
 
The BorderLayout indeed allows only one Component per area, so you will only see the second button. You can, however, add a Panel to the North area, and then add the two buttons to the Panel (which has FlowLayout by default). Then you will see the two buttons appearing in the North area. regards,
Blaxo
 
thanks alot Blaxo that real helped, i can do borderlayout now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top