Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/385.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Nimbus Look and feel为UIManager.getColor(“inactiveCaptionBorder”)返回Null_Java_Swing_Look And Feel_Nimbus - Fatal编程技术网

Java Nimbus Look and feel为UIManager.getColor(“inactiveCaptionBorder”)返回Null

Java Nimbus Look and feel为UIManager.getColor(“inactiveCaptionBorder”)返回Null,java,swing,look-and-feel,nimbus,Java,Swing,Look And Feel,Nimbus,我在这里得到了NPE: Color base = UIManager.getColor("inactiveCaptionBorder"); 当 设置为应用程序 任何信息都是可观的 提前谢谢 中不存在inactiveCaptionBorder的值,因为此值不是直接应用于l中的(我在Nimbus默认值中搜索值为inactive的字符串,结果只有两个值==inactiveCaption,textInactiveText) 中不存在用于inactiveCaptionBorder的by@camickr值

我在这里得到了NPE:

Color base = UIManager.getColor("inactiveCaptionBorder");

设置为应用程序

任何信息都是可观的


提前谢谢

中不存在
inactiveCaptionBorder
的值,因为此值不是直接应用于l中的(我在Nimbus默认值中搜索值为inactive的字符串,结果只有两个值==
inactiveCaption
textInactiveText


中不存在用于
inactiveCaptionBorder
的by@camickr

值列表,因为此值未直接应用于l中(我在Nimbus默认值中搜索值为Inactivate的字符串,因为只有两个值==
inactiveCaption
textInactiveText


@camickr的列表

顺便说一句。你应该设置你的NimbusLookAndFeel


对于所有非SUN JREs Java 1.7,其具有
javax.swing.plaf.nimbus.NimbusLookAndFeel
和没有
com.SUN.Java.swing.plaf.nimbus.NimbusLookAndFeel

顺便说一句,您应该设置您的NimbusLookAndFeel


对于所有非SUN JREs Java 1.7,它们有一个
javax.swing.plaf.nimbus.NimbusLookAndFeel
和一个
com.SUN.Java.swing.plaf.nimbus.NimbusLookAndFeel

谢谢mKorbel。但我不明白
(inactive==inactiveCaption,textinactivatext)
:-)看起来就像我今天处于危急和安全状态,我不知道我今天抽的是哪一团烟:-)谢谢mKorbel。但我不明白(inactive==inactiveCaption,textInactiveText):-)看起来就像我今天处于危急和安全状态,我不知道我今天抽的是哪种烟:-)
UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
    if ("Nimbus".equals(info.getName())) {
        UIManager.setLookAndFeel(info.getClassName());
        break;
    }
}