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.
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.