Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

LayoutManager2 interface

 
swapna sivaraju
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI guys
I wanted to know which all layoutmangers
implement LayoutManager2 interface as
in one of the tutorial on net it says "only
BoxLayout implements it" but RHE says GridBagLayout ,BoxLayout,BorderLayout and CardLayout implement it.

swapna
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
LayoutManager2 understands the concept of "constraints"; these are extra paramaters you provide when you add a component to a container. Any layout manager that takes a constraint as a paramater will be implementing the LayoutManager2.
I'm not really clear what your real question is, since you seem to have answered it yourself. Look at the JavaDocs for LayoutManager2, and you will see the classes that implement it. Of the Layout Managers you should know for the test, they are: BorderLayout, BoxLayout, CardLayout, GridBagLayout.
In fact, the only required layout manager I know of that doesn't implement LayoutManager2 is FlowLayout.
 
Matt Ghiold
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am slighly confused, I though box layout was a part of swing and therefore not part of the exam.
Can someone please verify that I should be studying the box layout as well.
thanks
Matt
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's right Matt,
BoxLayout is a member of the javax.swing package, and thus, is not part of the objectives...
 
Matt Ghiold
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Valentin, I was scared there for a second...
Off to Operators and Assignment work =)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic