Here you can find the source of removeImage(JLabel image)
public static void removeImage(JLabel image)
//package com.java2s; //License from project: Open Source License import javax.swing.JFrame; import javax.swing.JLabel; public class Main { static JFrame window; public static void removeImage(JLabel image) { image.setVisible(false);/*from w ww.j a v a 2 s .c o m*/ window.remove(image); } }