I'm trying to set an Icon for a Message Alert popup, and I'm using the methods I've found online. However, they're causing issues where the image:
- Doesn't even get set as the icon
- Is way too oversized
- Placed in the JPanel
The screenshot below shows what I mean:
And my code doesn't seem to have any issues:
final ImageIcon iconF = new ImageIcon(LOGIN.class.getResource("/resources/offline.png"));
JOptionPane.showMessageDialog(null, "ERROR: Please check your username and password then try again.", "Login Failed", JOptionPane.ERROR_MESSAGE, iconF);
I don't understand what's causing this mess of an issue when this seems to be the "answer" to my own question.