0

I need that information so I can create custom login dialog.

public static void main(String args[]) {
     JOptionPane.showInputDialog("Enter username: "); 
     // This will show dialog and after 'OK' button is clicked 
     // into that dialog, it will return the input as string, right?

}

So, i created new class which extends JDialog it includes 2 labels, 2 text fields and 1 button, after that button is clicked i want to simulate something like JOptionPane.showInputDialog() i want to wait for user input before other code proceed.

public static void main(String args[]) {
   LoginDialog ld=new LoginDialog();
   ld.setVisible(true);
   // When that button is clicked i want this code to continue...
   dl.getUsername();
   dl.getPassword();
}
jovanMeshkov
  • 757
  • 5
  • 12
  • 29

0 Answers0