Take the 2-minute tour ×

In javafx scenebuilder, I have created accordion. In the netbeans, I would like to add changelistener to the titledpane in the accordion. I want to display a message on clicking the titledpane. How can i do it?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

To display a message when someone clicked on titledpane ,just implement on mouse click event of TitiledPane

enter image description here

In Controller class implement that method

    private void TitledPaneClick(MouseEvent event) {
        System.out.println("Mouse clicked");
share|improve this answer
This should work. I can see hash symbol in front of the onmouse clicked text field in your screenshot.But I am not able to find hash symbol in front of the textfield in my scenebuilder. So when i run the controller code without that it's saying page language error. can you tell me how can I get the hash symbol in front of the textfield. –  crazyvi Mar 6 '13 at 17:11
download latest build of scene builder , i am currently using Version: 1.1-b18 –  invariant Mar 6 '13 at 18:44

And also I tried this way to get it.

EventHandler<MouseEvent> mousehandler = new EventHandler<MouseEvent>() {
public void handle(MouseEvent mouseEvent) {

titledpaneName is the name of the titled pane in the accordion. The code above prints hi on clicking the titledpane in accordion.

share|improve this answer

Your Answer


