Gin Ichimaru
Gin Ichimaru

Reputation: 21

How I can specify a stylesheet into a fxml file?

Sorry for my bad english but I'm italian.

I'm trying to specify a stylesheet into a fxml file in this way

<stylesheets>
  <URL value="@../default.css" />
</stylesheets>

but I get this error:

java.lang.RuntimeException: java.net.MalformedURLException: no protocol: ../default.css

Upvotes: 2

Views: 505

Answers (1)

James_D
James_D

Reputation: 209358

getStylesheets returns a list of Strings, not URLs. So you need

<stylesheets>
  <String fx:value="@../default.css" />
</stylesheets>

Upvotes: 1

Related Questions