How to make a button appear to have been clicked or selected? (JavaFX2)
问题 When user presses a button in my JavaFX2.2 UI, a dark blue halo appears to show it was clicked. During the course of events, my program may want to 'unclick' it to show it is no longer selected. I expected a button.setSelected(false); I remember Swing used to have this, but there isn't such a call in JavaFx. This article discusses drop shadows but I want to simply use the same appearance used when a button is clicked which isn't really a drop shadow. setEffect(new DropShadow()) Using setStyle