From the course: Learning JavaFX GUI Development

Unlock the full course today

Join today to access over 23,100 courses taught by industry experts.

Challenge: Create a CSS file with styles

Challenge: Create a CSS file with styles

From the course: Learning JavaFX GUI Development

Challenge: Create a CSS file with styles

- [Voiceover] For this challenge, you want to start with the program in the Exercise Files folder, under 06_04 called StyleChallenge.Java. Right now, this program does not have any styles added to it. Your objectives are to create a CSS file, and attach it to the program. The CSS file should contain the following, a BorderPane that has color for the top border and the left-hand side border. You wanna style the three buttons that are across the top. Also, center the buttons. For the labels on the left, again you want to style those, so they're not crunched up at the top, and also give them some color, and finally, add some style to the pie chart that I have in the center. I'm estimating that this challenge will probably take you around ten minutes. The program's all ready there, you want to create your style sheet, and don't forget to attach it to the main code, and see what happens when you add color and style. When you're done, feel free to check back and see my solution, as I walk…

Contents