String[] nameStrings = { "Elisa", "Nicolas", "Cedric", "Rabbit", "Mike","Sabrina","Stephane","Jim","John"};
JFrame frame = new JFrame("Input Dialog Example");
String returnValue = (String) JOptionPane.showInputDialog(frame,
"Select the name you want to query?","Employee Information",JOptionPane.QUESTION_MESSAGE,null,nameStrings,nameStrings[0]);
context.name=returnValue; //store the value to the context variable