Package javax.swing

Examples of javax.swing.JOptionPane.addPropertyChangeListener()


                .getWidth()) / 2,
                (desktopPane.getHeight() - modalDialog
                    .getHeight()) / 2);
        jmeDesktop.setFocusOwner(optionPane);

        optionPane.addPropertyChangeListener(
            JOptionPane.VALUE_PROPERTY,
            new PropertyChangeListener() {
              public void propertyChange(PropertyChangeEvent evt) {
                modalDialog.setVisible(false);
                jmeDesktop.setModalComponent(null);
View Full Code Here


        final JOptionPane optionPane =
            new JOptionPane ( panel, JOptionPane.PLAIN_MESSAGE,
                JOptionPane.OK_CANCEL_OPTION, null, options, options [0] );
        setContentPane ( optionPane );
        setDefaultCloseOperation ( DO_NOTHING_ON_CLOSE );
        optionPane.addPropertyChangeListener (
            new PropertyChangeListener () {
                public void propertyChange ( PropertyChangeEvent e ) {
                    if ( isVisible() && e.getSource() == optionPane ) {
                        if ( optionPane.getValue() == connect )
                            valid_ = true;
View Full Code Here

        final JOptionPane optionPane =
            new JOptionPane ( panel, JOptionPane.PLAIN_MESSAGE,
                JOptionPane.OK_CANCEL_OPTION, null, options, options [0] );
        setContentPane ( optionPane );
        setDefaultCloseOperation ( DO_NOTHING_ON_CLOSE );
        optionPane.addPropertyChangeListener (
            new PropertyChangeListener () {
                public void propertyChange ( PropertyChangeEvent e ) {
                    if ( isVisible() && e.getSource() == optionPane ) {
                        if ( optionPane.getValue() == connect )
                            valid_ = true;
View Full Code Here

  public SimpleErrorDialog(RobotDriver parentRobotDriver, String title, boolean modal , String errorText) {
    super(parentRobotDriver, title, true);
    final JOptionPane optionPane = new JOptionPane(errorText, JOptionPane.ERROR_MESSAGE);
    setContentPane(optionPane);
    setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
    optionPane.addPropertyChangeListener(
        new PropertyChangeListener() {
          public void propertyChange(PropertyChangeEvent e) {
            String prop = e.getPropertyName();
            if (isVisible()
                && (e.getSource() == optionPane)
View Full Code Here

    String text = errorText + "\n";
    text += "The Program will End on ERROR Now !\n";
    final JOptionPane optionPane = new JOptionPane(text, JOptionPane.ERROR_MESSAGE);
    setContentPane(optionPane);
    setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
    optionPane.addPropertyChangeListener(
        new PropertyChangeListener() {
          public void propertyChange(PropertyChangeEvent e) {
            String prop = e.getPropertyName();
            if (isVisible()
                && (e.getSource() == optionPane)
View Full Code Here

            dialog.setContentPane(pane);
            dialog.pack();
            dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);

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

                    if (dialog.isVisible() && (e.getSource() == pane) && (prop.equals(JOptionPane.VALUE_PROPERTY))) {
                        dialog.setVisible(false);
View Full Code Here

        final JOptionPane optionPane =
            new JOptionPane ( panel, JOptionPane.PLAIN_MESSAGE,
                JOptionPane.OK_CANCEL_OPTION, null, options, options [0] );
        setContentPane ( optionPane );
        setDefaultCloseOperation ( DO_NOTHING_ON_CLOSE );
        optionPane.addPropertyChangeListener (
            new PropertyChangeListener () {
                public void propertyChange ( PropertyChangeEvent e ) {
                    if ( isVisible() && e.getSource() == optionPane ) {
                        if ( optionPane.getValue() == connect )
                            valid_ = true;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.