This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes how to center this button 1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to center this button 1" Watch "how to center this button 1" New topic
Author

how to center this button 1

Roldan Baldo
Ranch Hand

Joined: Aug 11, 2009
Posts: 99
how to center button 1 please? what code will i add.


Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19654
    
  18

Button 1 already is centered when I test your code. And it should - the anchor property of GridBagContraints defaults to centered.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to center this button 1
 
Similar Threads
JFrame problem
GridBagLayout...!
size of one button is less than expected in GridBagLayout
GridBagLayout problem
help automate code