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

Screen Flicker and different behavior between 1.6 and 1.7 when painting  RSS feed

 
Tom Landry
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using the ComponentEvent example from the Java Docs, I added some code that validates the frame size to prevent it being sized too small.

The is designed so that the width can't be smaller than 200 and the height can't be shorter than 350 (these values can be changed while the application is running).
When compiled and executed using jdk 1.6.0_45 it works fine but there is some flicker which am curious to know if normal or if the code isn't utilizing the painting functionality properly.

When compiled and executed using jdk 1.7.0_25 there is erratic behavior. The scroll bar on the right appears and disappears and the resizing doesn't work properly when attempting to make too short.

Not certain if a 1.7 issue or the newer version is more critical of the code being used and it is an issue with the implementation of the painting functionality.


 
Tom Landry
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One item I noticed is with 1.6 when the mouse button is released it will execute the Component Listener one final time.

With 1.7 when the mouse is released, there is no additional execution of the Component Listener.

Just not sure if its by design or not.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!