A
A
Anton2015-06-03 14:08:07
User interface
Anton, 2015-06-03 14:08:07

How to make JavaFX Separator be 1px wide?

The subject was discussed here .
Discussion abandoned, issue not resolved.
If we prescribe

.separator *.line {
-fx-border-style: solid;
-fx-border-width: 1px;
-fx-border-color: red;
}

The separator is still 2px wide! 2 pixels is its default width. What is it? Java bug?
lDfEctZsbWQ.jpg
You can see in the picture that the square has a 1 pixel wide stroke, while the red divider is clearly 2 px thick.
How to be?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timur, 2015-06-03
@fattan

It seems to me that there is no error here - the element has a zero height. A border is added on each side. That is, the upper border is plused with the lower one - here you have two pixels.
Not 100% sure, but maybe this will help you: -fx-border-style: hidden hidden solid hidden;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question