This is my java program and I can't understand the difference between (JFrame.HIDE_ON_CLOSE) & (JFrame.DISPOSE_ON_CLOSE ) methods.Can you please explain this?
import javax.swing.*; class DemoJLabel extends JFrame{ JLabel lbl1; DemoJLabel(){ lbl1=new JLabel("My Label"); add(lbl1); setTitle("JLabelDemo"); // setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); pack(); setVisible(true); } } class MyDemoLabel{ public static void main(String []args){ DemoJLabel jlabel=new DemoJLabel(); } }