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

ComponentListener()  RSS feed

 
Angela Stempfel
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
if i use the componentLIstener to know when the applications is resized, how can I find out if the applications is smaller or bigger now?
angela
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to save the previous component size as an attribute in whatever class is implementing ComponentListener and compare it against the current size of the Component causing the event. ( You can get the current size easily with event.getComponent().getSize()... )

-Nate
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!