I am using jsplit pane, in left component , there is tree view that display folder and file of home directory. When i click on the leaf node of a tree , if it is not a directory, then file (image, pdf, text, video, etc..) should open in right component of jsplit pane.

how can i display that file right component of jsplit pane when we select file in jtree in left pane.

Please provide code snippets Its urgent.
Thanks