Swing 选择栏弹出的使用
import javax.swing.*;
public class MyJOptionPane {public static void main(String args[]) {
Object[] obj2 ={ "足球", "篮球", "乒乓球" };
String s = (String) JOptionPane.showInputDialog(null,"请选择你的爱好:\n", "爱好", JOptionPane.PLAIN_MESSAGE, new ImageIcon("icon.png"), obj2, "足球");
}
}