Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.


+11 votes
asked in CSC305 Fall 2019 by (8 points)

Are you using the Swing library, or something else?
Can you be more specific in your question?

1 Answer

+5 votes

If you're using Swing...

To simply show an image that doesn't change, you can use a JLabel with an icon -- see https://stackoverflow.com/questions/3775373/java-how-to-add-image-to-jlabel .

If you're wanting to do more with the image, e.g. in the context of a game, you might look at the tutorials here: http://zetcode.com/tutorials/javagamestutorial/

answered by (2.9k points)