H
harasch
Gast
folgender quelltext:
meine frage, wie kann ich alle buttons ansprechen? momentan geht ja nur button1 und button3!
Code:
Object[] options = {"Button1", "Button2", "Button3"};
int pane = (int) JOptionPane.showOptionDialog(null,panel,"Text",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE, null, options,options[0]);
if(pane == JOptionPane.YES_OPTION) {
/**
}
else if(pane == JOptionPane.NO_OPTION) {
System.exit(0);
}
else if(pane == ???????????????????) {
/**
}
meine frage, wie kann ich alle buttons ansprechen? momentan geht ja nur button1 und button3!