updating JTree in java GUI

前端 未结 3 864
不知归路
不知归路 2021-02-14 08:21

I used a JTree in my GUI and added it to a JFrame. When I want to update it and change it\'s nodes in another part of my program (while program is running, as an action performe

3条回答
  •  再見小時候
    2021-02-14 08:32

    Do you mean the GUI aspect just isn't showing your change? You should probably look int repaint() and revalidate().

    Here's a good description of when to call which one.

提交回复
热议问题