• 追加された行はこの色です。
  • 削除された行はこの色です。
TITLE:SystemColorの使用
#navi(../)
#tags()
RIGHT:Posted by &author(aterai); at 2003-09-25
*SystemColorの使用 [#u69460d3]
Posted by [[terai]] at 2003-09-25

#contents

**概要 [#c694128b]
Swingコンポーネントの色をSystemColorクラスから取得します。

#twocolumn
-&jnlp;
-&jar;
-&zip;

#screenshot
//#screenshot
#ref(http://lh4.ggpht.com/_9Z4BYR88imo/TQTUESCOFBI/AAAAAAAAAlc/eXW_0wilSew/s800/SystemColor.png)

#twocolumn

RIGHT:&jnlp;
RIGHT:&jar;
RIGHT:&zip;

#twocolumn

**サンプルコード [#d56e9e8d]
#code{{
#code(link){{
Color color = SystemColor.textHighlightText;
}}

**解説 [#l578b2c0]
各プラットフォームのディスクトップデザインに対応したシステムカラーは、SystemColorクラスのstaticフィールドにまとめて定義されています。

**参考リンク [#rcd6ac16]
-[[システムカラー>http://www.asahi-net.or.jp/~dp8t-asm/java/tips/SystemColor.html]]
-[http://www.asahi-net.or.jp/~dp8t-asm/java/tips/SystemColor.html システムカラー]

**コメント [#s998c29d]
- Ubuntu などでは、SystemColorはあまりうまくいかないようです。UIManagerを使った方がいいかも。 -- [[terai]] &new{2007-05-07 (月) 17:04:59};
- Ubuntu などでは、SystemColorはあまりうまくいかないようです。UIManagerを使った方がいいかも。 -- [[aterai]] &new{2007-05-07 (月) 17:04:59};

#comment