Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial<noob />
17,062 PointsHow excatly we change the background when we are at different attempt kind?, and how the nested buttons works?
Hi, I need a confirmation about this topic. craig introduced a technique that let us add and remove styles from our app. we use this code to add style:
private void addAttemptStyle(AttemptKind kind) {
container.getStyleClass().add(kind.toString().toLowerCase());
}
i understand that we get the current style from the container and then we add the attemptkind and getting the enum's name(break or focus) from toString and when we get a kind lets say focus, in our css file we have a .focus refernce that change the color, and the question is how javafx knows what is focus if we havent add an id for it in the fxml file?
another thing is that the logic of the fxml file isnt very clear and we havn't dive into that properly, anyone has a external resource or code for learning fxml?
4 Answers
Steven Parker
231,184 PointsI found that 4 out of the first 5 results from a quick Google search were tutorial resources.
<noob />
17,062 PointsSteven Parker i didn’t understand what u said, the link was broken
Steven Parker
231,184 PointsThat's odd, it works for me. But just type "FXML" into your favorite search engine and you'll find several tutorial resources.
<noob />
17,062 PointsLOL. i know we change it with the css the problem is about the code. why when we remove playing we can suddenly see the pause button.