aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Setting the JFrame contentpane's border Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Setting the JFrame contentpane Watch "Setting the JFrame contentpane New topic
Author

Setting the JFrame contentpane's border

Chris Ramsey
Ranch Hand

Joined: Sep 15, 2003
Posts: 34
Is there a way to create an empty border on the JFrame's contentpane, so that when I add components to it the will not be placed flushed with the sides? I would like to do this without having to add a JPanel to the contentpane first. Thank you.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

All you have to do is cast the content pane to a JComponent and set the border...


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting the JFrame contentpane's border