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.
如何使图标和文本之间的距离更小/更小?
利用setIconTextGap
setIconTextGap
要将间隙减少 1 个像素:
button.setIconTextGap(button.getIconTextGap() - 1);
增加 1 个像素:
button.setIconTextGap(button.getIconTextGap() + 1);