This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi all, Write a line of code that declares a variable named layout of type LayoutManager and initializes it with a new object, which when used with a container can lay out components in a rectangular grid of equal-sized rectangles, 3 components wide and 2 components high???
Originally posted by Nick Riviera: LayoutManager layout = new GridLayout(3,2);
Actually I thought the constructor for GridLayout was GridLayout(int rows, int cols) Therefore the rows would determine the vertical(i.e. height) and cols would determine the horizontal (i.e. width) So I believe it should be stated: LayoutManager layout = new GridLayout(2,3); For 2 components high and 3 components wide which is just a different way of saying 3 components wide and 2 components high. You agree?