---
title: "Discussion on \"Demystifying Pseudo Classes in JavaFX\" | Hashnode"
description: "Discussion on \"Demystifying Pseudo Classes in JavaFX\". Pseudo Classes are the best way to handle on/off state changes in a Node in JavaFX.  But it's very badly explained in the JavaDocs and hard to understand.  This article should clear that up.\nWhat's a PseudoClass?\nHave you ever noticed how a Button ch..."
url: "https://hashnode.com/posts/demystifying-pseudo-classes-in-javafx/61f03894e247b2151e61f4e4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Demystifying Pseudo Classes in JavaFX](https://pragmatic-coding.hashnode.dev/demystifying-pseudo-classes-in-javafx?utm_source=hashnode&utm_medium=feed)

Pseudo Classes are the best way to handle on/off state changes in a Node in JavaFX. But it's very badly explained in the JavaDocs and hard to understand. This article should clear that up. What's a PseudoClass? Have you ever noticed how a Button ch...

Jan 25, 2022 · 10 min read · pragmatic-coding.hashnode.dev  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#gui](https://hashnode.com/tag/gui)
-   [#desktop](https://hashnode.com/tag/desktop)
-   [#programming-tips](https://hashnode.com/tag/programming-tips)

## Written by

[Dave Barrett](https://hashnode.com/@PragmaticCoding)

@PragmaticCoding · Mississauga, Ontario, Canada

  
[View profile](https://hashnode.com/@PragmaticCoding)

I build cool stuff

I am a developer from Canada. I've been programming professionally since about 1985, working at banks, insurance companies, software companies and a large dairy. For much of my career, I've worked on large multi-user systems build in "MultiValue" databases, like Ultimate, Universe and Unidata.

## Responses 1

Markdown supported · ⌘↵ to post

[Omar alpjaly](https://hashnode.com/@OmarAlpjaly)

[Jul 19, 2022](https://hashnode.com/posts/demystifying-pseudo-classes-in-javafx/61f03894e247b2151e61f4e4/comment/62d70c44d3af5e3713d6140e)

Note : if you declared the css selector like this ".label :red" the Pseudo Class will not work . you should not add any space before ":" i lost hours for that
