Hey All
I want to set a Background for my JWindow. I used setIconImage method in JWindow. but it's not working
How knows what the problem is?
public MainMenu() throws Exception {
try {
bg = ImageIO.read(new File("pics" + File.separator
+ "mainMenuBackground.jpg"));
content = new JWindow(this);
content.setIconImage(bg);
gs.setFullScreenWindow(content);
content.repaint();
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
this.repaint();
} catch (Exception e) {
throw new Exception("Some files are unavailable");
}
}
This lines of code makes a Full-screen window with no background image. why?
How can i fix it?