Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Annoying Window Size Problem  RSS feed

 
Olivier Legat
Ranch Hand
Posts: 176
Chrome Mac Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hello everyone,

I have this really irritating problem. I can't get the frame the size i want it to be. If i run this I get the right size but the content isnt displayed (until i resize it). I putting pack() after setSize but it resizes incorrectly. And if I put pack() before setSize I get the right size but it displays the contents as it would be if I wrote pack() afterwards

Any ideas please.

Thank-you
 
Campbell Ritchie
Sheriff
Posts: 53734
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try setSize() last.

This looks like something which would sit better on the Swing forum. Moving.
 
Campbell Ritchie
Sheriff
Posts: 53734
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think when I said setSize() last, I meant setVisible() last.
 
Olivier Legat
Ranch Hand
Posts: 176
Chrome Mac Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ritchie you're a genius!

Works

P.S. I didn't realize I posted it on the wrong forum. sorry
 
Campbell Ritchie
Sheriff
Posts: 53734
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Olivier Legat:
Ritchie you're a genius!


We all make mistakes!

Only too pleased to help
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!