Here is an example
import javax.swing.JOptionPane;
Object selectedValue = null;
public void onTick(Instrument instrument, ITick tick) throws JFException {
Object[] possibleValues = { "First", "Second", "Third" };
if(selectedValue != null) {
return;
}
selectedValue = JOptionPane.showInputDialog(null,
"Choose one", "Input",
JOptionPane.INFORMATION_MESSAGE, null,
possibleValues, possibleValues[0]);
console.getOut().println("selected "+ selectedValue);
}