Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+12 votes

How do you set the slider to the center. When set to the top it is stuck at the top left corner, when trying to do set center afterwards an error occurs. Does anyone have any clues for me??

asked in CSC305 Fall 2023 by (1 point)

2 Answers

+2 votes

You can set the slider to center by setting the h box containing it to center using .setAlignment(Pos.CENTER);

answered by (1 point)
+2 votes

use the .setAlignment(Pos.CENTER) method of the hbox you made.

answered by (2.3k points)
...