B4J Question fx scene builder stylesheets

tremara1

Active Member
Licensed User
Longtime User
Just a quick newbie question, can you use stylesheets on components. I tried with a button the preview in scene builder looked ok but when I ran the app with b4j I got an error:

com.sun.javafx.fxml.PropertyNotFoundException: Property "stylesheets" does not exist or is read-only.

If I add the style elements manually in scene builder it works.

I probably should know this.....thanks
 

tremara1

Active Member
Licensed User
Longtime User
Thanks, I still had no luck so as I was using Scene builder v2.0 I tried v1.1 and recreated the same project from scratch and it worked. I then had a look at the fxml file(s) and they were different. The stylesheet tag was different. I have zipped the 2 fxml files if you want to look at them.. The 'test.fxml' was v1.1 and 'test2.fxml' was with v2.0
 
Upvote 0

tremara1

Active Member
Licensed User
Longtime User
Doh!!!! forgot to upload.........
 

Attachments

  • fxml.zip
    917 bytes · Views: 299
Upvote 0

tremara1

Active Member
Licensed User
Longtime User
Thanks, I still had no luck so as I was using Scene builder v2.0 I tried v1.1 and recreated the same project from scratch and it worked. I then had a look at the fxml file(s) and they were different. The stylesheet tag was different. I have zipped the 2 fxml files if you want to look at them.. The 'test.fxml' was v1.1 and 'test2.fxml' was with v2.0
I have used Scene builder v2.0 for a couple of projects with no issues seems my only issue is when I try to use external css with v2.0
 
Upvote 0

tremara1

Active Member
Licensed User
Longtime User
Please upload the complete project (File - Export as zip).
This is the project is just a test to work with css....the fxml file test.fxml was created with scene builder v2.0 it is the one not working. I created the same file in v1.1 which is called testy.fxml it does work if you rename it to test.fxml all works fine.
 

Attachments

  • buttTest.zip
    1.9 KB · Views: 286
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Looks like it is working here:
SS-2015-01-11_10.46.07.png


Is the IDE configured to use Java 8 (Tools - Configure Paths)?
 
Upvote 0

tremara1

Active Member
Licensed User
Longtime User
Thanks, that was my problem I was still configured to Java 7.
 
Upvote 0
Top