B4J Tutorial Styling buttons with CSS

Not a tutorial from me, but I thought I'd share this link which has some nice buttons styled in CSS.

http://fxexperience.com/2011/12/styling-fx-buttons-with-css/

Create the css file and add it to the files tab, then add a style class to each button and add the css in the designer (or code) to the pane that contains the buttons or the parent of all panes if you have multiple panes that contain buttons you want to style. Some nice looks in here.
 

max123

Well-Known Member
Licensed User
Longtime User
Thanks Steve, I've found some time, now it's a little tutorial with very small code....

Enjoy
 

Attachments

  • Screen Shot 08-07-17 at 02.31 PM.PNG
    Screen Shot 08-07-17 at 02.31 PM.PNG
    121.7 KB · Views: 1,234
  • styling-fx-buttons-with-css.zip
    84 KB · Views: 1,016
Last edited:

MrKim

Well-Known Member
Licensed User
Longtime User
Thanks Steve, I've found some time, now it's a little tutorial with very small code....

Enjoy
I tried opening your tutorial but when I try to open the layout file in designer I get the following error:
1727784524169.png
 

max123

Well-Known Member
Licensed User
Longtime User
I tried opening your tutorial but when I try to open the layout file in designer I get the following error:View attachment 157415
@MrKim your ploblem sounds like the same I had just now with one of my relatively old B4J projects.
You may open the designer from the IDE Menu, this will open the B4X Designer. Because this was developed using JavaFX Scene Builder before B4X Designer existence, it use fxml layout instead of bjl layout expected by B4X Designer.

To solve it ensure you have JavaFX Scene Builder 1.0 or better JavaFX Scene Builder 2.0 installed, then go to FileManager in the IDE and click on blue Open Designer and scene builder should be launched with your layout.

My personal opinion (that have nothing to do with your error) is that there has been a great loss by removing the possibility of managing layouts created with JavaFX Scene Builder from the IDE, which in my personal opinion is better than B4X Designer and I still only use the latter for very simple projects.

Please try my solution and post results to ensure the problem was solved.
 
Last edited:

MrKim

Well-Known Member
Licensed User
Longtime User
@MrKim your ploblem sounds like the same I had just now with one of my relatively old B4J projects.
You may open the designer from the IDE Menu, this will open the B4X Designer. Because this was developed using JavaFX Scene Builder before B4X Designer existence, it use fxml layout instead of bjl layout expected by B4X Designer.

To solve it ensure you have JavaFX Scene Builder 1.0 or better JavaFX Scene Builder 2.0 installed, then go to FileManager in the IDE and click on blue Open Designer and scene builder should be launched with your layout.

My personal opinion (that have nothing to do with your error) is that there has been a great loss by removing the possibility of managing layouts created with JavaFX Scene Builder from the IDE, which in my personal opinion is better than B4X Designer and I still only use the latter for very simple projects.

Please try my solution and post results to ensure the problem was solved.
Appreciate the advice, but just not worth my time right now...
 
Top