Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SetSize of JDialog depending on size of content  RSS feed

 
guenter krannich
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've got a panel "top" containing several "sub" panels, I add "top" to the contentPane of a JDialog and I want to set the size of that dialog according to the size of "top". I use a BoxLayout for "top".
I started with setting the dialog's size with fixed values - works
then I tried to get the size of "top" and wanted to use this, but I get zero as width/height.
Grateful for any hint!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!