• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Screen Flicker and different behavior between 1.6 and 1.7 when painting

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
An elephant? An actual elephant. Into the apartment. How is the floor still here. Hold this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic