Displays the custom resizable dialog box - Java Swing

Java examples for Swing:JDialog

Description

Displays the custom resizable dialog box

Demo Code

import javax.swing.JDialog;
import javax.swing.JOptionPane;

public class Main {
  public static void main(String[] args) {

    JOptionPane pane = new JOptionPane("JOptionPane is cool!",
        JOptionPane.INFORMATION_MESSAGE);
    String dialogTitle = "Resizable Custom Dialog Using JOptionPane";
    JDialog dialog = pane.createDialog(dialogTitle);
    dialog.setResizable(true);/*from   w w  w .j a va  2s  .c  o  m*/
    dialog.setVisible(true);

  }
}

Related Tutorials