how to link a jtree with database

Query the data and put them in objects.
Then use those objects to create the JTree.

The above must be independent. One class for reading and returning the data. Then call that class take the data form the DB and build your tree.

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.