CSS can be used to style a UI created with JavaFX. It is based on CSS version 2.1. This tag should be used for questions about styling JavaFX Nodes using CSS.
Questions tagged [javafx-css]
141 questions
3
votes
2 answers
Change style of javafx spinner buttons using css
I am trying to change the style of the javafx spinner using a css stylesheet.
However, when changing the colour I can only change the colour of the text field and the arrow buttons to the side of spinner still look like the default.
How can I change…

FrancisG
- 43
- 1
- 4
3
votes
1 answer
intellij idea - Javafx css file: no suggestions
I have the latest Intellij Idea installed on my ubuntu 16.04 with the latest java(java9) from oracle.
I can create a new Javafx without no problem, but the issue is
The idea won't recognize javafx .css file, I mean I can't use
CTRL+SPACE to…

Ayyoub
- 4,581
- 2
- 19
- 32
3
votes
1 answer
How to use predefined Spinner style classes in FXML
According to this Link javaFX 8u45 spinner, can be styled in numerous ways via style class. I do know how to do it by code.
For…

jyonkheel
- 443
- 4
- 17
3
votes
1 answer
Why -fx-border-color reset border radius of TextField?
I want to change background and border color of TextField use JavaFX CSS. I don't understand why -fx-border-color reset border radius of TextField?
As you can see the second TextField doesn't have border radius.
sample/style.css:
.validation-error…

Maxim
- 9,701
- 5
- 60
- 108
3
votes
2 answers
Is it possible to set a JavaFX static property in CSS?
Sample FXML with the BorderPanel.alignment "static property":
The CSS-supported version:
…

stargater
- 134
- 1
- 13
2
votes
1 answer
Removing the blue color effect when DatePicker is clicked
Is there a way to change the default color that makes the DatePicker's textField appear to be highlighted in blue when it's clicked?
I have read all related questions that I came accross after hours of searching, and have modified all other…

Mira
- 33
- 6
2
votes
1 answer
How to fix out-of-place 'expected RBRACE' error when parsing CSS with jfx?
I was adding some variables to my CSS file, and I seem to have broken it. I have never used variables in CSS before (im not much of a front-end guy), so I dont know, if I did something wrong or the parser is acting up, because the error I'm getting…

Luh0
- 105
- 8
2
votes
1 answer
JavaFX: Give Line Chart Series of multiple tables different colors
I have an application that displays several Line Charts with several Series like this:
I'd like to change the color of each Series but haven't found a way to achieve this. The only thing I found is how to change the default colors but that doesn't…

Wewius
- 87
- 7
2
votes
0 answers
JavaFX CSS - How to curve a border radius outwards?
I am trying to give a tab the following effect when being selected:
Example image
You can see the selected export tab's bottom right corner curving over on top of the other tab.
How could this be implemented using CSS or code?
I have tried utilising…

Valtteri Valo
- 41
- 2
2
votes
1 answer
Is there a way to make a Datepicker round? (JavaFX)
I've been trying to customize with css my JavaFX application...so far so good untill I reach the Datepicker... I tried a lot of different aproaches but none of them seem to work. Is there a way to make the Datepicker round just like my…

David Reyes
- 23
- 3
2
votes
1 answer
JavaFX css grid inconsistent
The following code produces and infinitely pannable grid and also allows for zooming in and out. The grid is being drawn using css.
My issue is that the css grid doesn't work well when zoomed in very closely or zoomed out a lot. It also is…

Asis
- 319
- 1
- 2
- 14
2
votes
1 answer
How to use focused as well as hover pseudo class in Javafx
The problem is when focused and hover pseudo class are used together, then when the ImageView is clicked it doesn't perform focused pseudo class work rather it performs the work of no pseudo class and if I remove the hover pseudo class then it works…

Bibek Bhusan Sahoo
- 37
- 5
2
votes
1 answer
JavaFX - "Pointless" (CSS) Shadow Effect, Drastically decrices Graphics Performance
Hello, People [...]
Summary
Whenever i use Shadow-effect on my BorderPane or any Component/control/Element, the 3D Graphics performance (as seen, in the Preview section below) is getting way too low.
The "confusing" part is that, it even gets low…

Giorgos Xou
- 1,461
- 1
- 13
- 32
2
votes
1 answer
JavaFX Custom Control CSS PseudoClass state change stroke color
I have created a JavaFX custom control with two CSS styleable properties, and a CSS PseudoClass for state.
I'm not sure what I am missing, but changing the state will not update the stroke color.
The Reference.java
import java.util.List;
import…

DJViking
- 832
- 1
- 12
- 29
2
votes
1 answer
JavaFX TextFlow set default text color
As the title, it's possible to to apply a default color to all text of a TextFlow component?
TextFlow textFlow = new TextFlow();
textFlow.setId("supertextflow");
// Somewhere else in the code
textFlow.getChildren()
.add(new Text("Dynamic added…

Emax
- 1,343
- 2
- 19
- 30