How to add selected Node in JTree in Text area.

You'll need to clarify your question. Since the JTextArea displays text, I'd imagine it would go something like jTree.getItemAt(index).toString() or something like that. Then you'd append the text to the JTextArea using whatever the correct method is (probably append)

yes you are right, but I didnt get "Tree.getItemAt(index).toString()" or similar method to get name of file where it is clicked.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.