Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / January 2005

Tip: Looking for answers? Try searching our database.

Some space between JFrame border and contentPane

Thread view: 
Gioele Barabucci - 17 Jan 2005 23:36 GMT
I use various JPanels in my main JFrame via
 mainFrame.setContentPane(new ThePanelIWant());

Now I'd like to have some space between the JFrame border and this inner
panel. Is there a way to achieve this without changing the JPanels code?
Something like mainFrame.setInnerBorder(2); would to ok, but I could not
find anything like this. :(

--
Gioele
Bill Tschumy - 18 Jan 2005 02:56 GMT
> I use various JPanels in my main JFrame via
>   mainFrame.setContentPane(new ThePanelIWant());
[quoted text clipped - 6 lines]
> --
> Gioele

You can give the thePanelIWant an empty border using:

thePanelIWant.setBorder(BorderFactory.createEmptyBorder(topAmt, leftAmt,
bottomAmt, rightAmt));

Signature

Bill Tschumy
Otherwise -- Austin, TX
http://www.otherwise.com

Benna - 18 Jan 2005 19:04 GMT
> Now I'd like to have some space between the JFrame border and this inner
> panel. Is there a way to achieve this without changing the JPanels code?
[quoted text clipped - 3 lines]
> --
> Gioele

Anche Tu sul progetto di ingegneria del software immagino.... ^__^

Davide


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.