File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Trying to draw image, but not showing up Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

Trying to draw image, but not showing up

Mike Williams
Greenhorn

Joined: Jan 30, 2004
Posts: 7
I am trying to get the lander image to appear on the Animation Panel when i run the program. The code in question is in class DrawPanel. For some reason image is not appearing. What could be wrong.

[ March 06, 2004: Message edited by: Mike Williams ]
Mike Williams
Greenhorn

Joined: Jan 30, 2004
Posts: 7
Can someone help me?
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

What is "code to draw animation" short for? If that's where you've placed the actual animation loop, then the problem is that you'lll be blocking the event thread, which is what actually repaints the screen; never do any long-running processing on the event thread! Instead, you have to create a new thread dedicated to running your animation.
The JDK demos include a number of animation applets; look there for examples.


[Jess in Action][AskingGoodQuestions]
Mike Williams
Greenhorn

Joined: Jan 30, 2004
Posts: 7
I dont understand what your talkin about with the "code to draw animation" part, i dont see that, i just need that image to show up right now.
Mike Williams
Greenhorn

Joined: Jan 30, 2004
Posts: 7
Ok I have went back and created 2 seperate classes, but it still does not show my image, can anyone help me?
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

Please don't post questions to multiple forums. I just answered this for you over in the Threads forum, so I'm going to close this one; followups there, please.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Trying to draw image, but not showing up
 
Similar Threads
Image lost behind buttons
Applet problems
Launching a new Window
repaint paints the wrong component
Label in a field or scrollpanel