How to use JTree to display files from a directory in JPanel?

后端 未结 1 1347
轻奢々
轻奢々 2021-01-28 16:43

I am working on developing a GUI using Swing. The GUI is implemented in such a way that the when the user wants to load a set of text files, then the filechooser dialog should o

相关标签:
1条回答
  • 2021-01-28 16:46

    You haven't revalidated the containing content Container. At the end of your actionPerformed method, add the lines

    //content.invalidate();
    content.revalidate();
    content.repaint();
    
    0 讨论(0)
提交回复
热议问题