Meaningless Drivel is fun!
The moose likes JavaFX and the fly likes Style textfields and comboboxes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JavaFX
Bookmark "Style textfields and comboboxes" Watch "Style textfields and comboboxes" New topic

Style textfields and comboboxes

M Bryan
Ranch Hand

Joined: Jun 15, 2011
Posts: 64

I am currently working on styling my textfields and comboboxes, but there is a small problem.
I want both to have white border on default, a grey border when hovering them and a blue border when they are focused. This works quite well, but as soon as I start typing, they lose their border color respectivly it gets white again.

This is what my css looks like:

Thank you!
Volodymyr Lysenko
Ranch Hand

Joined: Mar 29, 2012
Posts: 511

This style works for me on TextField:

After I start typing or even close window it works and I apply this style by :

True person is moral, false is right!
I agree. Here's the link:
subject: Style textfields and comboboxes
jQuery in Action, 3rd edition