Package javax.swing

Examples of javax.swing.JOptionPane$CloseOwnerListener


//                //Performatives r = ( Performatives ) p ;
//        }
//    }

    public void handleRequestGive() {
        final JOptionPane pane = new JOptionPane( "xxx msg" );
        pane.setWantsInput( true );

        pane.setInputValue( "" );
        pane.setOptions( new String[]{"Yes", "No"} );

        JInternalFrame internalFrame = pane.createInternalFrame( contentPane,
                                                                 "xxx title" );
        internalFrame.setVisible( true );
        pane.show();
        internalFrame.addInternalFrameListener( new InternalFrameListener() {

            public void internalFrameOpened(InternalFrameEvent e) {
            }

            public void internalFrameIconified(InternalFrameEvent e) {
            }

            public void internalFrameDeiconified(InternalFrameEvent e) {
            }

            public void internalFrameDeactivated(InternalFrameEvent e) {
            }

            public void internalFrameClosing(InternalFrameEvent e) {

            }

            public void internalFrameClosed(InternalFrameEvent e) {
                System.out.println( pane.getInputValue() + ":" + pane.getValue() );
            }

            public void internalFrameActivated(InternalFrameEvent e) {
            }
        } );
View Full Code Here


         */
        public void displayError(String message) {
            if (debug) {
                System.err.println(message);
            }
            JOptionPane pane =
                new JOptionPane(message, JOptionPane.ERROR_MESSAGE);
            JDialog dialog = pane.createDialog(JSVGViewerFrame.this, "ERROR");
            dialog.setModal(false);
            dialog.show();
        }
View Full Code Here

         */
        public void displayError(String message) {
            if (svgUserAgent != null) {
                super.displayError(message);
            } else {
                JOptionPane pane =
                    new JOptionPane(message, JOptionPane.ERROR_MESSAGE);
                JDialog dialog =
                    pane.createDialog(JSVGCanvas.this, "ERROR");
                dialog.setModal(false);
                dialog.show(); // Safe to be called from any thread
            }
        }
View Full Code Here

         */
        public void displayError(String message) {
            if (svgUserAgent != null) {
                super.displayError(message);
            } else {
                JOptionPane pane =
                    new JOptionPane(message, JOptionPane.ERROR_MESSAGE);
                JDialog dialog =
                    pane.createDialog(JSVGCanvas.this, "ERROR");
                dialog.setModal(false);
                dialog.show(); // Safe to be called from any thread
            }
        }
View Full Code Here

         */
        public void displayError(String message) {
            if (debug) {
                System.err.println(message);
            }
            JOptionPane pane =
                new JOptionPane(message, JOptionPane.ERROR_MESSAGE);
            JDialog dialog = pane.createDialog(JSVGViewerFrame.this, "ERROR");
            dialog.setModal(false);
            dialog.show();
        }
View Full Code Here

   *
   * @param h the test harness
   */
  private void testVisualProperties(TestHarness h)
  {
    JOptionPane p = new JOptionPane();
    TestOptionPaneUI ui = new TestOptionPaneUI();
    p.setUI(ui);

    installComponentsCalled = false;
    uninstallComponentsCalled = false;

    p.setIcon(new ImageIcon());
    checkReinstalled(h);

    p.setInitialSelectionValue("Hello World");
    checkReinstalled(h);

    p.setInitialValue(new Object());
    checkReinstalled(h);

    p.setMessage(new Object());
    checkReinstalled(h);

    p.setMessageType(JOptionPane.ERROR_MESSAGE);
    checkReinstalled(h);

    p.setOptions(new Object[0]);
    checkReinstalled(h);

    p.setOptionType(JOptionPane.NO_OPTION);
    checkReinstalled(h);

    p.setWantsInput(false);
    p.setWantsInput(true);
    checkReinstalled(h);
  }
View Full Code Here

      message = "MEAPsoft has encountered a fatal error: " + message;

    //if(message.length() > 70)
    //    message = message.substring(0, 70);
     
    final JOptionPane optionPane =
      new JOptionPane(message, JOptionPane.QUESTION_MESSAGE);

    final JDialog dialog = new JDialog(jframe, "Exception!", true);
    //dialog.setContentPane(optionPane);
    dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);

    optionPane.addPropertyChangeListener(
      new PropertyChangeListener() {
        public void propertyChange(PropertyChangeEvent e) {
          String prop = e.getPropertyName();

          if (dialog.isVisible()
View Full Code Here

    public void actionPerformed( ActionEvent e )
    {
      final String newValue = pes.getPreferenceNode().get( pes.getPreferenceKey(), initialValue );
   
      if( !newValue.equals( initialValue ) && !haveWarned.isSet() ) {
        final JOptionPane op = new JOptionPane( text, JOptionPane.INFORMATION_MESSAGE );
//        JOptionPane.showMessageDialog( c, text, title, JOptionPane.INFORMATION_MESSAGE );
        BasicWindowHandler.showDialog( op, c, title );
        haveWarned.set( true );
      }
    }
View Full Code Here

      } else {
        ggDuration.setSpace( space );
        ggDuration.setValue( value );
      }

      final JOptionPane op = new JOptionPane( msgPane, JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION );
//      result = JOptionPane.showOptionDialog( getFrame() == null ? null : getFrame().getWindow(), msgPane, getValue( NAME ).toString(),
//        JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, null );
      result = BasicWindowHandler.showDialog( op, getFrame() == null ? null : getFrame().getWindow(), getValue( NAME ).toString() );

      if( result == JOptionPane.OK_OPTION ) {
View Full Code Here

    testThread.start();
    ggSpinner.setActive( true );
//    dlg.setVisible( true );   

    final JOptionPane op = new JOptionPane( pane,
                                            JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION,
                                            new ImageIcon( GUIUtil.class.getResource( "assistent_64x64.png" )));
//    result = JOptionPane.showOptionDialog( getWindow(), pane,
//        getResourceString( "prefsAudioDevicesAssistent" ),
//        JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE,
View Full Code Here

TOP

Related Classes of javax.swing.JOptionPane$CloseOwnerListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.