문제

In JavaFX 8 application I'm using setUserAgentStylesheet(STYLESHEET_CASPIAN); to set the default skin style. But in Netbeans I get error:

cannot find symbol
  symbol:   variable STYLESHEET_CASPIAN
  location: class MainApp
----
(Alt-Enter shows hints)

In order to remove the warning in Netbeans I tried tried this:

String STYLESHEET_CASPIAN = null;

setUserAgentStylesheet(STYLESHEET_CASPIAN);

But it's not correct. How I can remove the warning message?

enter image description here

도움이 되었습니까?

해결책

STYLESHEET_CASPIAN was introduced in FX8 (jdk8). If you intent to use FX2.x you don't need to change user agent stylesheet (caspian is only and default).

If your project compiles, but NB shows warning it's NetBeans issue. Most probably you had FX2.x in you project previously and NB remembered it. Try to change platform in project options back and forth to reset NB cache.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top