Pergunta

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

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top