I have been learning Java for a few weeks now and I am really stuck when it comes to applying a background image to a JFrame. Every tutorial I\'ve come across doesn\'t creat
Better to use:
ImageIcon closeImg = new ImageIcon(getClass().getResource("\\images\\buttons\\closeBtn.png"));
Make sure your image is located in the same location relative to where your class file is output.
Also your close button calls setVisible(false)
but does not dispose of any resources or exit the application.