Reputation: 23
I am trying to add a background image to my GUI (on java). All the commands for GUI I got from my university..
try {
Image image = ImageIO.read(Background.class.getResourceAsStream("myBackground.jpg"));
} catch (Exception e) {
e.printStackTrace();
}
DrawSurface d = ... (commands from university jar)
d.drawImage(0, 0, image);
I see the background when I run it (as a jar) on Windows XP.
I don't see the background when I run it (the same jar) on Windows Vista (Without any exception! ), so I think it may be something with Vista settings..
How can I fix it?
Upvotes: 0
Views: 39
Reputation: 442
Don't use Vista.
More than likely, one of two things is happening in your University's code:
repaint()
calls.Upvotes: 1