my dog learned polymorphism*
The moose likes Swing / AWT / SWT and the fly likes Simple JFrame formatting... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Simple JFrame formatting..." Watch "Simple JFrame formatting..." New topic
Author

Simple JFrame formatting...

Adam Ellsworth
Greenhorn

Joined: Sep 25, 2004
Posts: 21
Im making a simple program and have probably a fairly simple question. My problem is, I want one of my JButtons/TextArea above my legendArea but it keeps coming up to the left of it. Is there any command to create a break of somesort? Any help would be appreciated Thanks.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
Are you adding them to a JPanel?
If so, the default layout is a FlowLayout, so they will go from left to right (depending on widths).
Change the layout of the panel to BorderLayout, then add to NORTH and CENTER

something like this (aircode - expect a typo or two)

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Simple JFrame formatting...
 
Similar Threads
About flush() in Servlet
return a value by firing a JButton event
simple 404 error rectify it
javascript calendar
Export to Excel