• category: swing folder: DisabledTextColor title: JCheckBoxなどが無効な状態での文字色を変更 tags: [JCheckBox, JComboBox, UIManager, Html, JLabel, JButton] author: aterai pubdate: 2008-10-06T14:59:33+09:00 description: JCheckBoxやJComboBoxなどのコンポーネントが無効な状態になった場合の文字色を変更します。 image: https://lh5.googleusercontent.com/_9Z4BYR88imo/TQTLDPDIq4I/AAAAAAAAAW8/jt2A5D74G04/s800/DisabledTextColor.png

概要

JCheckBoxJComboBoxなどのコンポーネントが無効な状態になった場合の文字色を変更します。

サンプルコード

UIManager.put("CheckBox.disabledText", Color.RED);
JCheckBox cbx1 = new JCheckBox("default", true);
JCheckBox cbx2 = new JCheckBox("<html>html tag</html>", true);
View in GitHub: Java, Kotlin

解説

DisabledTextColor1.png

参考リンク

コメント