I am writing a connect four game. In my constructor for the board have two gridlayouts, both within a borderlayout. Can anyone tell me how I create a new gridlyout and insert it in place of the originally constructed one without creating a new window?
posted 10 years ago
Each layout manager has a parent container that it is installed in. You could call setLayout on the parent with the new layout. Or you could use the setRows and setColumns in the GridLayout api to change the existing layout. The Container api has methods to remove components.