• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Space around my BorderLayout

 
Greg Funston
Ranch Hand
Posts: 81
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have designed a GUI within a Jframe. It has a Borderlayout inside with 3 panels. A top panel a bottom panel and a center panel with a JScrollpanel. I like my GUI except for one thing. It goes all the way to the edge of my JFrame. Is there a simple way to have an inset or margin from the frame. I would appreciate any ideas.




Thanks.

Greg Funston SCJP
 
Maneesh Godbole
Saloon Keeper
Posts: 11064
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can try setting an empty border around the component.
Check out BorderFactory#createEmptyBorder(int top,int left,int bottom,int right)
 
Greg Funston
Ranch Hand
Posts: 81
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks



It was exactly what I was looking for. I saw it when I was looking through the API but had dismissed it
without realizing it was adjustable.

Cheers,
Greg Funston SCJP :
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic