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