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

How to prevent continuous repaint when resizing a frame?  RSS feed

 
bebbo duce
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings averyone,
this should be pretty simple but i can't figure out how to do it.

Is there a way to set a JFrame to repaint on resize only when the mouse drag is released?
JSplitPane has a similar behaviour for its divider, available through setContinuousLayout().

Thanks in advance.
 
Rob Camick
Ranch Hand
Posts: 2754
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Is probably not exactly what you are looking for, but I think is as close as you can get to what you want.
 
mark goking
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
since you are using mouse events, you can use the consume() method to nullify any actions unless if it falls under the mouse drag released method
 
bebbo duce
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mark goking wrote:since you are using mouse events, you can use the consume() method to nullify any actions unless if it falls under the mouse drag released method

Thanks, I will try that
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!