Open Source JavaFX Now!
Combination View Flat View Tree View
wrapping swing components as a scene graph node
toggle
Hi members,
i managed to wrap a JTree as a scene graph node by using the SwingComponent.wrap function. i have added listeners/ event handler for tree selection events. but i find the GUI refresh to highlight the selected tree node is unpredictable (sometimes fast, sometimes very slow). I can't understand this, but i find the response time for the println statements in the tree selection listener/ event handler code print the current node selection executing fast as expected. so this definitely means the tree selection event has been fired, and the event handling code also executed, but GUI event dispatch thread in javaFX , is not refreshing the current selection fast as expected.

there are no exceptions in the traces/ logs, so i am unable to debug the issue why the GUI response time is slow.

your advise/ suggestion /recommendations will help.

i can share the relevant code if required.

Regards,
Meyappan
Flag Flag
RE: wrapping swing components as a scene graph node
10/23/09 1:38 PM as a reply to Meyappan Ramasamy.
I have also tried to do all the tree processing like setting up its model, its selection mode, and the event handling in the same GUI event dispatch thread, but still the new tree selection on mouse click on it is not refreshed on the GUI in a expected way. please suggest your ideas. if it was normal swing application , i guess there won't be any compatibility issues, but integrating it into javaFX is causing issues.
Flag Flag
RE: wrapping swing components as a scene graph node
10/24/09 1:57 AM as a reply to Meyappan Ramasamy.
For testing the java and javafx version of the tree, i just created a JTree with a root and 2 child, and put it in a JFrame, and there was no issue with the tree selection and the listener / event handler just prints the selected node data.

i wrapped the same JTree with SwingComponent.wrap, and put it as a scene graph node, now the tree selection is not reflected on the GUI as expected, although the tree selection events are fired and the event handler code executes printing the selected node.

i dont know where the problem is in javaFX.

please let me know your suggestions.
Flag Flag