• Post Reply Bookmark Topic Watch Topic
  • New Topic

grid layout within border layout  RSS feed

 
Brandi Love
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

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?
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Brandi Love
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great suggestions - thanks so much for the help!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!