We would like to know how to disable a JLabel.
/*from www .j a va2s . c o m*/ import javax.swing.JLabel; import javax.swing.JOptionPane; public class Main { public static void main(String[] args) { JLabel label = new JLabel("java2s.com"); label.setEnabled(false); JOptionPane.showMessageDialog(null, label); } }