pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: Blocking while a dialog/prompt/alert/sheet is open, like Javascript's alert() ?
Date Tue, 26 Jan 2010 14:26:43 GMT
> This is taken from Sun tutorials:
> 
> // open confirm dialog
> int n = JOptionPane.showConfirmDialog(
>     null,
>     "Would you like green eggs and ham?",
>     "An Inane Question",
> 
>     JOptionPane.YES_NO_OPTION);
> 
> if(n == JOptionPane.YES_OPTION){
>    // open new dialog
>    JOptionPane.showMessageDialog(
>        null,
>        "You selected yes.",
>        "Yes Option",
> 
>        JOptionPane.INFORMATION_MESSAGE);
> }
> Now, if only someone can do that in Pivot.

This is not possible in Pivot. JOptionPane.showMessageDialog() opens a native dialog and sets
a JOptionPane as its content. All Pivot windows are hosted in a single AWT component called
DisplayHost. This component is, in turn, hosted either by an applet (BrowserApplicationContext)
or a native Frame (DesktopApplicationContext).

G



Mime
View raw message