• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Components Placement

 
Karl Nilsson
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey, i need to know if there is a layout (other than in canvas) that allows the programmer to specify the placement of components by setting it a pair of coordinates
i know flowlayout is the default layout, and that doesn't do it
is a canvas my only option?
the reason i'm saying this is i started learning java a little while ago, but am still used to using VB and having no layouts, just coordinates
 
Craig Wood
Ranch Hand
Pie
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the AWT you can use Panel to hold components. In Swing use JPanel or JComponent.

Null layouts, Absolute Positioning in the java tutorial, is the least used/fun layout (check what happens when you resize the frame) but sometimes nothing else will do. setBounds is the key.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic