Solved

using Threads for sprite animation graphics

Posted on 1997-08-05
2
237 Views
Last Modified: 2010-04-16
I want to use threads to move several sprites around a screen area, in Java 1.0 (no inner classes).  How can I make sure that a current Graphics object gets passed to each Thread each time it updates?
0
Comment
Question by:glow060197
2 Comments
 
LVL 1

Accepted Solution

by:
vmanocha earned 190 total points
ID: 1224525
I am not very sure that I understand your question fully, but you can get the graphics by calling getGraphics() function of the Component class. If this does not answer your question fully, can you please explain in little bit more detail ?
0
 

Author Comment

by:glow060197
ID: 1224526
Well, yes I guess so.  It wasn't the technique I was looking for, but I think my head was elsewhere when I asked it.  Thanks.

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now