javajtreejtreetable

Multi Dimensional array to JTree in java


i want to assign a multidimensional array to jtree. how can i do this?

here is sample of an array:

ROOT:{ FolderA : {FileA,FileB} , FolderB: {FileA,FileB} } ....

Also i want to determine files and assign icon to them.


Solution

  • You must get model from your jtree and then operate on it. Here you have working example