Ejemplo n.º 1
0
  private void neuesLaufwerkDialog() {
    Object[] options = {"Quell", "Ziel", "Abbruch"};

    System.out.println("windowClosing()");

    int retValue =
        JOptionPane.showOptionDialog(
            null,
            "Neues Laufwerk wurde gefunden. Soll es eingebunden werden?",
            "Laufwerk endeckt",
            JOptionPane.YES_NO_CANCEL_OPTION,
            JOptionPane.QUESTION_MESSAGE,
            null,
            options,
            options[2]);

    if (retValue == JOptionPane.CANCEL_OPTION || retValue == JOptionPane.CLOSED_OPTION) return;
    else if (retValue == JOptionPane.YES_OPTION) addQListBoxEintrag(dateiAuswählen(neuesLaufwerk));
    else if (retValue == JOptionPane.NO_OPTION) addZListBoxEintrag(dateiAuswählen(neuesLaufwerk));
  }