aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Want to know about border Layout and gridbag layout Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Want to know about border Layout and gridbag layout" Watch "Want to know about border Layout and gridbag layout" New topic
Author

Want to know about border Layout and gridbag layout

Shubham Chhabra
Greenhorn

Joined: Jul 19, 2011
Posts: 8
I need help on java swing layouts.............

Please help asap.
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4490
    
    8

The Oracle Java tutorials are a good place to start - try http://docs.oracle.com/javase/tutorial/uiswing/layout/index.html

Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

i have used border layout quite often it is pretty easy. i haven't used gridbag layout. all i remember is it is harder to use. i agree the tutorial is the place to start.


SCJP
Visit my download page
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19790
    
  20

Shubham Chhabra wrote:Please help asap.

Please EaseUp.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Haina Minawa
Ranch Hand

Joined: Oct 13, 2011
Posts: 119
Shubham Chhabra wrote:I need help on java swing layouts.............

Please help asap.


Matthew has suggested a good article about Swing layout. For me, I often use FlowLayout, BorderLayout and GridBagLayout. The last one is very flexible layout manager if you are building a complex GUI, and usually we have to combine some layouts together.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> I need help on java swing layouts.............
> Please help asap.

Congratulations, you are the 999,999th person to post a lame question.

You have won a free laptop.
Riaan Nel
Ranch Hand

Joined: Apr 23, 2009
Posts: 160

You can accomplish a lot by nesting simple layouts (BorderLayout and GridLayout) within each other.

Also, it might just be me, but I find that GridBagLayout is very similar to laying out components on a web page using an HTML table.


"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." - George Bernard Shaw
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Want to know about border Layout and gridbag layout