Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Allignment Of Swing Component

 
Ahesanali Khanusiya
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



I want to align Jlable and Jtextfield Component in single line then which layout manager I used and how....
 
Darryl Burke
Bartender
Posts: 5126
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take your choice.
http://download.oracle.com/docs/cd/E17409_01/javase/tutorial/uiswing/layout/visual.html
 
Rob Spoor
Sheriff
Pie
Posts: 20526
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are more layout managers that can do this than that cannot do this. FlowLayout is the easiest if the JTextField's size should remain fixed, BorderLayout if the size should grow.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic