Reputation: 17
I've used a piece of code from this question (Java JTree directory structure from file paths). But when I use it, I get an error: 'FileTreeModel cannot be resolved to a type'. I use eclipse, and have the last SDK. Anyone knows how to fix it?
Mathijs
TreeModel model = new FileTreeModel(new File(System.getProperty("user.dir")));
JTree tree = new JTree(model);
Upvotes: 0
Views: 639