Tombol Java dengan gambar JPG

JButton button; // precondition: not null
ImageIcon icon = new ImageIcon(FirstWindow.class.getResource("/Background.jpeg"));
button.setIcon(icon);
button.setDisabledIcon(icon); // or a grayed-out version
Muddy Wanker