A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
Swing / AWT / SWT
Setting the JFrame contentpane's border
Joined: Sep 15, 2003
Mar 26, 2004 12:08:00
Is there a way to create an empty border on the
'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
to the contentpane first. Thank you.
Joined: Oct 18, 2000
Mar 29, 2004 10:40:00
All you have to do is cast the content pane to a
and set the border...
((JComponent)getContentPane()).setBorder( BorderFactory.createMatteBorder( 10, 10, 10, 10, Color.blue ) );
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: Setting the JFrame contentpane's border
how to set this a borderq
Problems with GUI
sockets in applet
Checking input in Dialog box before closing
Centering a JComponent in the CENTER area of BorderLayout?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014