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.
画像の選択/プレビューに SwingX ラベルを使用しています。 テキストとアイコンの両方を一緒に表示する必要がありますが、アイコンを設定するとテキストが消えます! JXLabel のアイコンの上にテキストを表示するにはどうすればよいですか?
ありがとう
それは問題ありません、2つの方法があります
1.正しい方法(APIで実装、良い習慣、blablabla)
JLabel.setHorizontalTextPosition(JLabel.CENTER); // search for equivalent in SwingX
2.目的の座標に適切に設定LayoutManagerしJXLabelて別のものを配置するクレイジーな方法JXLabelLocation
LayoutManager
JXLabel
Location