Programmatic (Java) access to style / layout ?

David Grieve david.grieve at
Tue Dec 17 13:18:02 PST 2013

It is possible, but probably not in the way that would provide. By that I mean, it would be nice to be able to progammatically say "the border color for this button when hovered is red." This can be done now by adding an invalidation listener to the hoverProperty and setting the border on Region, but I don' t think this is what you are after. 

I think RT-17923 means different things to different people. I'd be interested to know what such and API would look like to you.

On Dec 17, 2013, at 3:39 PM, Oliver Doepner <odoepner at> wrote:

> Hello,
> This might have been asked before but I haven't found it:
> Is it possible to style JavaFX components using pure Java (i.e. without
> CSS)?
> If this is being worked on, does anyone know what the status is?
> I think this is one of the areas where JavaFX can actually be better than
> HTML5/CSS because a nicely typed Java representation of CSS could provide
> great tooling and features that others had to invent LESS or SASS for.
> I have seen this (from Oct 2012):
> I have also seen this:
> Last update: Brian
> Beck<>added
> a comment - Mar,
> 12 2012 09:01 PM : "It is now past the point where this feature can be
> added for 2.1. Will need to be considered for a future release"
> Thanks
> Oliver
> -- 
> Oliver Doepner

More information about the openjfx-dev mailing list