Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Java、Swing、JCombobox。
我需要一个带有 2 个箭头(向上和向下)的单行文本框,而不是下拉列表。
我敢肯定这很容易,但我还没有成功找到解决方案。
提前致谢。
看看JSpinner_SpinnerListModel
JSpinner
SpinnerListModel
根据您的要求,Java Swing已经有一个名为JSpinner.
Java Swing
尝试使用 JList. 只需设置列表的高度,以便一次只能看到一个元素。有关更多信息,请参阅此...
JList
http://zetcode.com/tutorials/javaswingtutorial/basicswingcomponentsII/