• Post Reply Bookmark Topic Watch Topic
  • New Topic

GridBagLayout  RSS feed

 
Colleen Lynch
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to create a form with GridBagLayout. Instead of setting the constraints for each component on the form, I've created a metod to do this called setUpLayout. The arguement passed to the method is a frame, a label, and integers for each of x and y positions, and width and height. The arguement list in the method is container, component ..... (integers).
It is saying that the method can't be found. Is it possible that it isn't recognizing the fram as a container or the label as a component?
Does anyone have any idea what could be causeing this?
Thanks
 
Angela Lamb
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post your method signature and what arguments you are trying to send to it? It sounds like it would be setUpLayout(Container container, Component componenet, int x, int y, int width, int height). If so, then calling it with something like setUpLayout(Frame f, Label l, 0, 0, 0, 0) should work. BTW, why don't you just pass a GridBagLayout instead of a Frame?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!