I have a popup window that instead of the ordinary YES_NO_CANCEL_OPTION I want the user to select from 3 options {A, B, or C}
static int Select_Use_Move_Items(int Select_Col){
int n = JOptionPane.showOptionDialog(frame,
"Select Option for:\n
"A: Remove - Discard one Item\n"+
"B: Transfer one Item to Person\n"+
"C: Transfer one Item to Transport",
"Make Selection",
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE,
null,
options,
options[2]);
}
How do tell in the calling routine which of the 3 buttons were pressed?
Note: this function is called in 15 different locations.
The popup subroutine is called by:
int Selection = Main.Select_Use_Move_Items(Col);
if Selection = 1 {Perform function A}
if Selection = 2 {Perform function B}
if Selection = 3 {Perform function C}
Where Col is an integer representing the column in a jtable.
Popup shows up and works but knowing which button that was pressed is what I need to know....
Thanks in advance........ :)