AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Some space between JFrame border and contentPane

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits
View previous topic :: View next topic  
Author Message
Gioele Barabucci
Guest





PostPosted: Mon Jan 17, 2005 11:36 pm    Post subject: Some space between JFrame border and contentPane Reply with quote



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
Back to top
Bill Tschumy
Guest





PostPosted: Tue Jan 18, 2005 2:56 am    Post subject: Re: Some space between JFrame border and contentPane Reply with quote



On Mon, 17 Jan 2005 17:36:33 -0600, Gioele Barabucci wrote
(in article <_ZXGd.89438$C94.24638 (AT) tornado (DOT) fastwebnet.it>):

Quote:
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

You can give the thePanelIWant an empty border using:

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



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


Back to top
Benna
Guest





PostPosted: Tue Jan 18, 2005 7:04 pm    Post subject: Re: Some space between JFrame border and contentPane Reply with quote




Quote:
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

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

Davide



Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.