sclass G22DBFileBrowser { G22Utils g22utils; File dir; JObjectTable table; ReliableSingleThread rstUpdate = rstWithPreDelay(0.5, r _updateTable); *(G22Utils *g22utils) { dir = g22utils.concepts.conceptsDir(); } cachedVisualize { table = swing(-> new JObjectTable); table.itemToMap = file -> litorderedmap( "File / Directory" := nameRelativeToPhysicalSubdirectory(file, dir), "Size" := file.isDirectory() ? "Directory" : str_toK(fileSize(file)) ); var tbl = table.visualize(); IVF1 fileListener = file -> rstUpdate!; bindToComponent(tbl, -> { g22utils.onProjectFileChanged(fileListener); rstUpdate!; }, -> g22utils.removeProjectFileChangedListener(fileListener)); ret withTopAndBottomMargin(jCenteredRaisedSection("Files in Project", northAndCenterWithMargins( withLabel("Project directory:", swing(-> new JFilePathLabel(dir).visualize())), tbl ) )); } void _updateTable { table.setData_force(findAllFiles(dir)); } }