Package javax.swing

Examples of javax.swing.JOptionPane.createDialog()


            if (title.toLowerCase().indexOf(I18n.getString("lower_error")) != -1) {
                messageType = JOptionPane.ERROR_MESSAGE;
            }

            JOptionPane pane = new JOptionPane(body, messageType);
            JDialog dialog = pane.createDialog(this, title);
            dialog.setVisible(true);
        }
        else {
            logger.info("showMessageDialog() \n* * * " + title + " * * *\n\t" + body);
        }
View Full Code Here


              JOptionPane pane = new JOptionPane();
              pane.setMessage(message);
              pane.setMessageType(JOptionPane.PLAIN_MESSAGE);

              final JDialog d = pane.createDialog(UiUtilities.getLastModalChildOf(getParentFrame()), mLocalizer.msg("CapturePlugin","CapturePlugin") + " - " + mLocalizer.msg("deletedTitle","Deleted programs"));
              d.setResizable(true);
              d.setModal(false);

              SwingUtilities.invokeLater(new Runnable() {
                public void run() {
View Full Code Here

                                "The fast shutdown of Windows is activated.\nThe timeout to wait for before Windows is closing an application is too short,\nto give TV-Browser enough time to save all settings.\n\nThe setting hasn't the default value. It was changed by a tool or by you.\nTV-Browser will now try to change the timeout.\n\nIf you don't want to change this timeout select 'Not this time' or 'Close TV-Browser'."));

                    pane.setInitialValue(mLocalizer.msg("registryCancel",
                        "Close TV-Browser"));

                    JDialog d = pane.createDialog(UiUtilities
                        .getLastModalChildOf(mainFrame), UIManager
                        .getString("OptionPane.messageDialogTitle"));
                    d.setModal(true);
                    UiUtilities.centerAndShow(d);
View Full Code Here

    }

    public static int showOptionDialog(Component parentComponent, String message, String title, int optionType, int messageType, int initialOption, int maxCharsPerLine) throws HeadlessException {
        //PM:14/05/2008: fix text wrap
            JOptionPane pane   = new JOptionPane(message/*reformatMsg(message, maxCharsPerLine)*/, messageType, optionType);
            final JDialog dialog = pane.createDialog(parentComponent, title);

            // Only need to override default if not first button
            if (initialOption>0) {
                String defaultButtonText = BUTTON_TEXT[initialOption];
                final JButton defaultButton = findButtonByName(pane, defaultButtonText);
View Full Code Here

              System.out.println(e);
              String title = "File Path Problem";
          String message = "Files could not be loaded";
          JOptionPane optionPane = new JOptionPane(
              message, JOptionPane.INFORMATION_MESSAGE);
          JDialog dialog = optionPane.createDialog(this, title);
          dialog.setVisible(true);
          return;
            }
    }
  }
View Full Code Here

              System.out.println(e);
              String title = "File Path Problem";
          String message = "Files could not be loaded";
          JOptionPane optionPane = new JOptionPane(
              message, JOptionPane.INFORMATION_MESSAGE);
          JDialog dialog = optionPane.createDialog(this, title);
          dialog.setVisible(true);
          return;
            }
    }
  }
View Full Code Here

    }

    public static int showOptionDialog(Component parentComponent, String message, String title, int optionType, int messageType, int initialOption, int maxCharsPerLine) throws HeadlessException {
        //PM:14/05/2008: fix text wrap
            JOptionPane pane   = new JOptionPane(message/*reformatMsg(message, maxCharsPerLine)*/, messageType, optionType);
            final JDialog dialog = pane.createDialog(parentComponent, title);

            // Only need to override default if not first button
            if (initialOption>0) {
                String defaultButtonText = BUTTON_TEXT[initialOption];
                final JButton defaultButton = findButtonByName(pane, defaultButtonText);
View Full Code Here

    }

    public static int showOptionDialog(Component parentComponent, String message, String title, int optionType, int messageType, int initialOption, int maxCharsPerLine) throws HeadlessException {
        //PM:14/05/2008: fix text wrap
            JOptionPane pane   = new JOptionPane(message/*reformatMsg(message, maxCharsPerLine)*/, messageType, optionType);
            final JDialog dialog = pane.createDialog(parentComponent, title);

            // Only need to override default if not first button
            if (initialOption>0) {
                String defaultButtonText = BUTTON_TEXT[initialOption];
                final JButton defaultButton = findButtonByName(pane, defaultButtonText);
View Full Code Here

              System.out.println(e);
              String title = "File Path Problem";
          String message = "Files could not be loaded";
          JOptionPane optionPane = new JOptionPane(
              message, JOptionPane.INFORMATION_MESSAGE);
          JDialog dialog = optionPane.createDialog(this, title);
          dialog.setVisible(true);
          return;
            }
    }
  }
View Full Code Here

              System.out.println(e);
              String title = "File Path Problem";
          String message = "Files could not be loaded";
          JOptionPane optionPane = new JOptionPane(
              message, JOptionPane.INFORMATION_MESSAGE);
          JDialog dialog = optionPane.createDialog(this, title);
          dialog.setVisible(true);
          return;
            }
    }
  }
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.