Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- JDialog



  Modal dialog in Java example code

In Java, we can create modal dialog so that the main JFrame cannot be operated on until the modal dialog is closed. To achieve this, we need to use one class in Java--JDialog. This class can be used to create an modal dialog.Example code : import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; public class Dialog extends JDialog{ public Dialog(){ super(); JPanel panel=new JPanel(); panel.add(new JLabel("Hello dialog")); this.getCont...

   Java,Modal,JFrame,JDialog,Demo,Code     2011-08-18 09:50:27