wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes best gridbagLayout tutorial Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "best gridbagLayout tutorial" Watch "best gridbagLayout tutorial" New topic
Author

best gridbagLayout tutorial

kava Kk
Greenhorn

Joined: Dec 11, 2013
Posts: 3
please i want a good full gridbagLayout tutorial
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2233
    
    7

Welcome.

GridBagLayout is usually used for positioning components in a somewhat "complex" UI. The question to ask is "is it that complex such that you must use GridBagLayout?"

The JPanel can be separated into different JPanels with their own layout managers. When "properly" laid out, the effect would be the same.


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5
kava Kk
Greenhorn

Joined: Dec 11, 2013
Posts: 3
thanks K. Tsang,
i am comming from the web (css - php) and i used to use a div inside another div (something like JPanel inside another JPanel) , ok
but can i ask again, in web we put layered over another layered and hide and show them like(z-index in css) is there is something like it in swing?
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2233
    
    7

kava Kk wrote:thanks K. Tsang,
i am comming from the web (css - php) and i used to use a div inside another div (something like JPanel inside another JPanel) , ok
but can i ask again, in web we put layered over another layered and hide and show them like(z-index in css) is there is something like it in swing?


Show/hide effect in swing? I guess it's possible depend on what you do with the "action events" for the component (eg button).

The development approach to GUI and web UI is somewhat different other than the end result (WYSIWYG).

Check out the swing tutorial
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

kava Kk wrote:in web we put layered over another layered and hide and show them like(z-index in css) is there is something like it in swing?


Sure, you can do that with CardLayout. I have no idea how you would do that with GridBagLayout and I wouldn't even dare to try it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: best gridbagLayout tutorial
 
Similar Threads
Get a JPanel to fill all available width
GUI Layout Design...
Gridbaglayout
Help with GridBagLayout resize behaviour
Can't get the desired position of label