Search code examples
lwuit

How to refresh FileTree?


when I delete a file from FileTree the file is deleted but it is still displayed in the tree until I close and re-open the directory containing this file is there a way to refresh the FileTree ?
another thing is that FileTree doesn't display the files or folders that there names are written in Arabic Language it just displays a file or folder with no name how to fix this ?


Solution

  • As a workaround you can try something like tree.setModel(tree.getModel()); but I'm guessing it will collapse the tree. The tree is a simplistic component that isn't designed to support changes to the underlying model. It can probably be enhanced via subclassing.