Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Grid layout problem

 
Prady Kural
Greenhorn
Posts: 14
Java Oracle Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 5 buttons on grid layout as::


BB
BB
B-

but i want them to be as::


BB
BB
-B


how to do , if possible please write code.
 
Darryl Burke
Bartender
Posts: 5126
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. The problem isn't apparent. Post any ASCII art it code tags so it retains its alignment

2. This is a forum, NotACodeMill. It's up to you to post your code and ask any specific question about it.

Have you gone through the tutorial for layouts?
http://download.oracle.com/javase/tutorial/uiswing/layout/index.html
 
Matthew Brown
Bartender
Posts: 4567
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the ComponentOrientation property of the container in question - that affects how the GridLayout works. Or, you could just stick a blank component into the gap (e.g. an empty JPanel).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic