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

+18 votes

Tabs really don't look good, just wanted a way to change what it looked like.

asked in CSC305 Fall 2023 by (1 point)

3 Answers

+8 votes

you can edit the border and backround radius within styles to change the shape into more of an oval. how do you want to change its look

answered by (1 point)
+8 votes

You can also use a bit CSS if you're into it. Our team used a bit off CSS
For example: Create a CSS file, then in the CSS file, you can target the tab and define styles for it. Like this: .tab {

-fx-background-color: #3498db; 
-fx-text-fill: white; 
-fx-font-size: 14px; 
-fx-font-weight: bold; 

}
Then apply the CSS to your JavaFX application:
String css = getClass().getResource("styles.css").toExternalForm();
scene.getStylesheets().add(css);

answered by (1 point)
edited by
+2 votes

Like the tabs, my group implemented a navigation pane that's populated with labels that once clicked reassign one of the border panes to one of our other fxml screens (while keeping the nav pane present). Youtube has some good examples of navigation panes that you can use if you're interested in redesigning that part of your code. Hopefully this was helpful.

answered by (1 point)
...