// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import javax.swing.JOptionPane;

public class SelectOption {
    public static void main(String[] args) {
        String[] opts = { "Option A", "Option B", "Option C" };
        String s = (String)JOptionPane.showInputDialog(null, "Chose one of these", "Choice", JOptionPane.YES_OPTION, null, opts, opts[0]);
        System.out.println(s);
    }
}
