wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes LayoutManager2 interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "LayoutManager2 interface" Watch "LayoutManager2 interface" New topic
Author

LayoutManager2 interface

swapna sivaraju
Ranch Hand

Joined: Jan 18, 2002
Posts: 75
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

Joined: Jan 07, 2002
Posts: 2205
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.


Rob
SCJP 1.4
Matt Ghiold
Ranch Hand

Joined: Feb 24, 2002
Posts: 213
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


-Matt<br /> SCJP2<br /> SCJD
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
That's right Matt,
BoxLayout is a member of the javax.swing package, and thus, is not part of the objectives...


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Matt Ghiold
Ranch Hand

Joined: Feb 24, 2002
Posts: 213
Thanks Valentin, I was scared there for a second...
Off to Operators and Assignment work =)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: LayoutManager2 interface
 
Similar Threads
Placing a component at center both vertically and horizontally
Layout Policy
question about BorderLayout
java.awt BorderLayout and FlowLayout
Layout Qstn