0

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);
Community
  • 1
  • 1

1 Answers1

1

You're missing FileTreeModel.java from the compilation path as presented here

Reimeus
  • 158,255
  • 15
  • 216
  • 276