• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Grid layout problem

 
Greenhorn
Posts: 14
Oracle Redhat Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
reply
    Bookmark Topic Watch Topic
  • New Topic