Michael Gates
Michael Gates

Reputation: 107

JavaFX - Can not resolve symbol 'font' (FXML)

I'm fairly new to JavaFX. I'm using IntelliJ Ultimate 13, Maven 3 (to build), and ZenJava's JavaFX plugin for Maven (to compile jar).

I'm having an issue where it says that 'font' can not be resolved. I'm trying to set the font size. In Scene Builder, everything looks fine. When I go back to IntelliJ, it gives me errors.

Example segment:

    <TextField layoutX="157.0" layoutY="213.0" prefHeight="56.0" prefWidth="349.0" promptText="Username" style="-fx-background-color: #E7E7E9; -fx-background-radius: 7;">
        <font>
            <Font size="16.0"/>
        </font>
    </TextField>

When building, it says there is an invalid property.

This is one of the things throwing errors. I'd also like to use a custom font, if possible.

Any ideas of how to fix?

Upvotes: 1

Views: 1226

Answers (1)

Michael Gates
Michael Gates

Reputation: 107

I've solved the issue! It was a really silly one..

I was using Scene Builder 2.0 on the 1.7 JDK.. don't make the same mistake! :P

Upvotes: 1

Related Questions