• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Animation - Need way to avoid UI wipe off

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to implement a network simulation animation with messages (icons) flowing back and forth between nodes (filloval). Each node is a thread behind the scenes and determines which message to send based on its state transition model.

Now everytime the window is minimized or some other window comes over my swing window, the part of the window overlapped becomes blank. The books say that I have to put in all the drawing code in paint() so that it will update itself whenever invoked automatically.

How can i do this - the state transition is per thread. Any ideas as to how I can avoid the system from wiping my UI when minimized or overlapped?
 
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is set up to compile and run in j2se 1.5
If using j2se 1.4 or earlier comment out the j2se 1.5 lines and uncomment the j2se 1.4 lines in the three areas of NetworkPanel, eg,

 
reply
    Bookmark Topic Watch Topic
  • New Topic