• Post Reply Bookmark Topic Watch Topic
  • New Topic

Grid Bag Layout not working in JInternalFrame  RSS feed

 
lupercal hill
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I use Grid Bag Layout. I am trying to but I cant get it to work.

my code is below.

 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

You've created a GridBagContraints object, and you're setting all its fields, but you're not using it when you add the components to the container -- you need to pass the GridBagContraints as a second argument to Container.add().

We have a forum devoted to GUI stuff -- our Swing, AWT, SWT and JFace forum. I'll move this thread there for any follow-ups.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!