Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

best gridbagLayout tutorial

 
kava Kk
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please i want a good full gridbagLayout tutorial
 
K. Tsang
Bartender
Posts: 3521
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
kava Kk
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3521
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic