• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Clearing Screen

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm trying to draw object on a screen in an infinite loop, which I have completed, however when they redraw, the original image still appears, is there anyway to clear screen of the original image and randomize them with out clearing the whole screen but rather just the object itself?

Also i am using a Java Applet with java.applet.*;

Thanks
 
Marshal
Posts: 25594
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on what you mean by "screen" for a start. And then it depends on how you "draw" those objects.

A small executable code sample would clear up a lot of mysteries. Read our SSCCE link for hints on how to produce one.
 
Konrad Cetes
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[/code]

These are the lines to import and draw one image.
 
Sheriff
Posts: 67399
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of the Cs in SSCCE stands for complete.
 
Paul Clapham
Marshal
Posts: 25594
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Konrad Cetes wrote:I'm trying to draw object on a screen in an infinite loop, which I have completed...



I'm a bit surprised that you managed to complete an infinite loop.
 
Konrad Cetes
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Honestly wasn't that hard, the code itself is a bit more complicated than that, but thats the jist of it all.
 
Paul Clapham
Marshal
Posts: 25594
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay, then. If you still have a problem then let us know, otherwise is it okay to mark this topic as resolved?
 
Konrad Cetes
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup, thanks a lot.
 
Space seems cool in the movies, but once you get out there, it is super boring. Now for a fascinating tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic