Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

using Threads for sprite animation graphics

Posted on 1997-08-05
2
246 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Android studio getdrawable(int) is deprecated 4 120
javap not working 8 58
printf performancy 11 70
ejb message driven bean mdb creation steps 2 23
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 learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
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:

829 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