Runtime Photo Display.

Q20. Design a Java NetBeans GUI application to display a photo while program is running.



Code For Upload

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

String url;


jLabel1.setIcon(new ImageIcon(url));


Code For Clear

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

jLabel1.setIcon(new ImageIcon(“”));





Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: