문제

In Java Swing I would like to create a JButton which contains an image(icon) and some text. In few words a JButton(text,icon). I would like the text to be displayed below the image, and not beside, as in normal JButton layout. Does anyone have an idea on how to achieve this?

도움이 되었습니까?

해결책

Have a look at the method setVerticalTextPosition in AstractButton using the constant SwingConstants.BOTTOM.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top