Updating a jtree

Posted by / 10-Feb-2020 02:20

From an outside class (let's say Class2), I need to update the contents of the JTree (after adding and deleting objects displayed on the JTree).I tried repaint() and update UI() methods but they didnt work. I'm having a problem getting a groupable JTable to work.

First it gives you a bit of background about Swing.Hi, I'm adding nodes to my JTree, but it is not being updated.If I add a node to the root, then the tree updates OK, but then if I add another, nothing happens.This trail tells you how to create graphical user interfaces (GUIs) for applications and applets, using the Swing components.If you would like to incorporate Java FX into your Swing application, please see Integrating Java FX into Swing Applications.

updating a jtree-48updating a jtree-43updating a jtree-35

Copyright © 1993, 2018, Oracle and/or its affiliates.