This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GridaBagLayout and Container

 
Alex Kravets
Ranch Hand
Posts: 476
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In my applet, I use GridBagLayout. When applet loads, the components in the applet are not positioned all the way at the edges of the container. Another words there is a margin off the top and left sides. I do position all of my components at (0,0). So what causes margin to appear?
thanks,
Alex
 
Chantal Ackermann
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
try specifying the anchor: c.anchor = GridBagConstraints.NORTHWEST;
and specify the filling: c.fill = GridBagConstraints.HORIZONTAL;
chantal
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic