File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JGoodies FormLayout question place buttons at center

 
Sethuraman Ramasubramanian
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to learn JGoodies FormLayout. I started working with the Default FormBuilder and I am having trouble aligning 2 buttons at the centre of the panel. I need to do this:

User Name Text Field
Password Text Field
..
..
..
Create Cancel

The create and cancel buttons should appear bang on the centre of the panel. The buttons always appear on the left not on the center. The code that I am using:
 
Rob Spoor
Sheriff
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The button panel is only bound to the first column, with "fill:pref". You should include the colspan, 3:
This way the button bar will cover your entire row.
 
Sethuraman Ramasubramanian
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Prime wrote:The button panel is only bound to the first column, with "fill:pref". You should include the colspan, 3:
This way the button bar will cover your entire row.


Oh thats great!!! Man I was so dumb! Was struggling with that for half a day! Thanks a lot. You just made my day.....
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic