Created
September 30, 2017 14:23
-
-
Save kleinlennart/705b7c5be3998e3b5b02ee7cb0dd784a to your computer and use it in GitHub Desktop.
Display Image from source folder in Label
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JLabel label = new JLabel(""); | |
Image img = new ImageIcon(this.getClass().getResource("/filename.jpg")).getImage(); | |
label.setIcon(new ImageIcon(img)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment