Why does JOptionPane have a constructor?

Archana Mani

The static methods available called "showXxxDialog" will satisfy many common dialogs, and are provided as a matter of convenience. Note that all dialogs displayed this way are modal.

You can create a new JOptionPane using the constructor as you have in your code. This gives you flexibility to create the pane however you want.

In addition, if you use the constructors, you can delay the showing of the dialog or make it non-modal.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact