JFrame with SplitPane and Panels

Hello!



I’ve build up a little program.

I have a JFrame with a SplitPane in it.

On the left I got an JTree with some Nodes and on the right i got a JmeCanvas.

JTree and JmeCanvas are both on JPanels.



Now I want to implement when I’m pressing on a specific Node in the JTree to do something in the JmeCanvas

for example display a bounding box.



Have anyone a tip for me How I can do this.

I’ve tried it with actionCommands, but this don’t have worked!





regards



-René

Read the tutorials on how to manipulate the scene graph and then make sure you always use callables from the AWT thread to modify the scene (e.g. button presses):

[snippet id=“10”]