I am making a Java GUI program that makes an image popup when you lose in a game. I am just wondering if this is possible. If it is, please help me out with my program!
Printable View
I am making a Java GUI program that makes an image popup when you lose in a game. I am just wondering if this is possible. If it is, please help me out with my program!
Create a window of some kind that displays the image and then dispose of it after some time delay.
Why is this thread hidden here vs in the New to Java thread?
Can you please give me the syntax of that?
There are several examples of code on this forum. Use the search for the paintComponent method.
Or look at my recent posts. I think I posted a short simple code example.
I thought the paintComponent method is for drawing shapes on a JPanel. So, it can also make images pop up as well?
(And you did not post a short code example.)
No it does not make images pop up.Quote:
make images pop up
The paintComponent method is where you get the reference to a Graphics object that can be used to draw an image.
You have to create the place for the image to be drawn.
Look again. It's there.Quote:
you did not post a short code example
Moved here from Reviews/Advertising. 'Snowball', please take the effort to post in an appropriate section of the forums.
db
This may be the thread where Norm posted a short sample code block to do something similar to what you are trying to do:
http://www.java-forums.org/java-2d/4...tml#post215829
If it's not the correct one, you can just click on his user name and scroll through recent posts until you see bits of code.
Thanks JDScoot. I'm sure you saved the OP a lot of work.
Was just making sure the OP understood you meant in another thread and not a previous post in this thread. I'm too nice I guess. :(angel):
Thanks again.