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.
有没有一种简单的方法来编辑 JSpinner 箭头的宽度?
您可以使用setPreferredSize():
setPreferredSize()
Dimension d = spinner.getPreferredSize(); d.width = 50; spinner.setPreferredSize(d);
小心 LayoutManager,如果它超出范围,它可以修改这个首选大小。