Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Changing the Panel size dyanamically  RSS feed

 
sanjay hande
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to change the size of a JPanel at runtime, say by clicking one of the four radio buttons inside the panel, the Panel size will vary depending on how many components are added to the Parent Panel?
 
Campbell Ritchie
Marshal
Posts: 55717
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can add Listeners to JRadioButtons; I think it is the ActionListener you are thinking of. Then resize the JFrame in the Listeners.

Such resizing seems strange behaviour, however.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!