S
shoa
Hello
I have a JOptionPane that allow me select an object (inside a vector
"allPeople"). After selecting an object in this JOptionPane, I want to have
an another JOptionPane to confirm that sellection with three choices; YES,
NO, CANCEL
The code below explains this:
//after click a button
Object o = JOptionPane.showInputDialog(this, "There is a person with this
name in database \n Do you want to get this person details",
"Select Person",
JOptionPane.OK_CANCEL_OPTION, null, allPeople.toArray(), "Person");
if (o != null) {...
.....
}
It can be seen that here I used "JOptionPane.OK_CANCEL_OPTION" for the
confirmation. I tried to use other options such as
JOptionPane.YES_OPTION.... but I cannot find out a JOptionPane that provides
three choices Yes, No, Cancel as what I want (I can get only the option OK
and CANCEL). Is there a solution to overcome this.?
Many thanks
S.Hoa
I have a JOptionPane that allow me select an object (inside a vector
"allPeople"). After selecting an object in this JOptionPane, I want to have
an another JOptionPane to confirm that sellection with three choices; YES,
NO, CANCEL
The code below explains this:
//after click a button
Object o = JOptionPane.showInputDialog(this, "There is a person with this
name in database \n Do you want to get this person details",
"Select Person",
JOptionPane.OK_CANCEL_OPTION, null, allPeople.toArray(), "Person");
if (o != null) {...
.....
}
It can be seen that here I used "JOptionPane.OK_CANCEL_OPTION" for the
confirmation. I tried to use other options such as
JOptionPane.YES_OPTION.... but I cannot find out a JOptionPane that provides
three choices Yes, No, Cancel as what I want (I can get only the option OK
and CANCEL). Is there a solution to overcome this.?
Many thanks
S.Hoa