• Post Reply Bookmark Topic Watch Topic
  • New Topic

best layout to center component...  RSS feed

 
mark smith
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

i use a BorderLayout on a jframe
on the center i display an image
on the left side, i put a label and a button, i would like to center the component

with the code below... the label take 50% of the height and the button take the rest



what is the best solution?

thank
 
Campbell Ritchie
Sheriff
Posts: 53779
128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
GridBagLayout?
Go to Cay Horstmann's website, and have a look at the GBC class for "taming the GridBagLayout."
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!