Swing/TextPositionAndAlignment のバックアップ差分(No.3)
- バックアップ一覧
- 現在との差分 を表示
- 現在との差分 - Visual を表示
- ソース を表示
- バックアップ を表示
- Swing/TextPositionAndAlignment へ行く。
- 追加された行はこの色です。
- 削除された行はこの色です。
TITLE:JLabelのアイコンと文字列の位置 #navi(../) RIGHT:Posted by [[terai]] at 2009-03-16 #tags() RIGHT:Posted by &author(aterai); at 2009-03-16 *JLabelのアイコンと文字列の位置 [#k61b6047] JLabelのアイコンと文字列の位置をテストします。 -&jnlp; -&jar; -&zip; #screenshot //#screenshot #ref(http://lh6.ggpht.com/_9Z4BYR88imo/TQTVPS5wBUI/AAAAAAAAAnU/2hri1cAlfoM/s800/TextPositionAndAlignment.png) **サンプルコード [#yd654120] #code{{ #code(link){{ label.setVerticalAlignment(SwingConstants.CENTER); label.setVerticalTextPosition(SwingConstants.TOP); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setHorizontalTextPosition(SwingConstants.LEFT); }} **解説 [#e49a55c3] 上記のサンプルでは、setVerticalAlignment、setVerticalTextPosition、setHorizontalAlignment、setHorizontalTextPositionといったメソッドを使用して、JLabelのアイコンと文字列の位置関係を変更しています。 **参考リンク [#f74eb1e7] -[[opus-i | シンプル素材 テンプレート 音楽素材>http://opus-i.biz/]] //**参考リンク **コメント [#yeda804e] #comment