java - JPanel stacking multiple buttons -



java - JPanel stacking multiple buttons -

how stack multiple buttons on top of each other? buttons should positioned @ bottom of application frame. trying find combination no luck, example:

final jpanel content = new jpanel(new borderlayout()); content.add(chartpanel); content.add(button1, borderlayout.south); content.add(button2, borderlayout.page_end); setcontentpane(content);

the buttons overlap.

final jpanel content = new jpanel(new borderlayout()); content.add(chartpanel); final jpanel buttonpanel = new jpanel(new borderlayout()); buttonpanel.add(button1, borderlayout.north); buttonpanel.add(button2, borderlayout.south); content.add(buttonpanel, borderlayout.south); setcontentpane(content);

java jpanel

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -