• Post Reply Bookmark Topic Watch Topic
  • New Topic

Adding a JPanel to BoxLayout from

 
Khaled Mahmoud
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having problem with adding JPanels to a Box layout form.
My JFrame class uses the BoxLayout.I created three JPanel objects and each
i put JButton into every JPanel.and then i added to them to the JFrame.
Only the first button.

Why does this happen??
If i added a glue horizontal glue after the last panel, i wont see any button.
Note : I am using the BoxLayout with Y-Axis
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
post your code - just the gui stuff (frame, panels, buttons)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!