String s = (String)JOptionPane.showInputDialog(this, "Search string:", "Notification", JOptionPane.QUESTION_MESSAGE, null, null, consoleTextPane.getNotifyCondition()); setNotification(s);
JPanel notifyPanel = new JPanel(new GridBagLayout()); int x = 0; int y = 0; notifyPanel.add(new JLabel("Search string:"), new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(10, 0, 5, 5), 0, 0)); JTextField notifyField = new JTextField(20); notifyField.setText(consoleTextPane.getNotifyCondition()); notifyPanel.add(notifyField, new GridBagConstraints(x, y++, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(10, 0, 5, 0), 0, 0)); x = 0; JCheckBox stdErrorCB = new JCheckBox("Notify on Standard Error", ((NodeStatusButton)statusButton).getNotifyOnStandardError()); notifyPanel.add(stdErrorCB, new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(10, 0, 5, 5), 0, 0));         int result = JOptionPane.showConfirmDialog(this, notifyPanel, "Notification", JOptionPane.OK_CANCEL_OPTION); if (result == JOptionPane.CANCEL_OPTION) return; setNotification(notifyField.getText()); ((NodeStatusButton)statusButton).setNotifyOnStandardError(stdErrorCB.isSelected());
  private void notify_actionPerformed() {    String s =       (String)JOptionPane.showInputDialog(this,                                          "Search string:",                                          "Notification",                                          JOptionPane.QUESTION_MESSAGE,                                          null, null,                                           consoleTextPane.getNotifyCondition());    setNotification(s);  }