I haven’t written in a long timeswing了,但你的代码错误是因为范型的问题,JComboBoxYou need to specify a content type.
Although I have never used it JComboBox,但猜测内容也无非是String,Integer之类,应该是取决于你的JComboBoxWhat value do you want to store? For example, if you want to select a number, you can do this:
JComboBox<Integer> selectOperaor = new JComboBox<Integer>();
Thanks for the invitation! !
I haven’t written in a long time
swing
了,但你的代码错误是因为范型的问题,JComboBox
You need to specify a content type.Although I have never used it
JComboBox
,但猜测内容也无非是String
,Integer
之类,应该是取决于你的JComboBox
What value do you want to store? For example, if you want to select a number, you can do this: