srecord noeq JFilePathLabel(File file) { transient JLabel label; transient JFilePathButton button; bool nameOnly; public transient simplyCached JComponent visualize() { label = jlabel_noAutoToolTip(); button = new JFilePathButton(file); update(); ret layout(); } void setFile(File file) { this.file = file; update(); } void update { setText(label, file == null ? "-" : nameOnly ? fileName(file) : f2s(file)); if (nameOnly) toolTip(file == null ? "No file" : f2s(file), label); button.setFile(file); } JComponent layout() { //ret centerAndEastWithMargin(label, button); ret jline(label, button.visualize()); } void showInExplorer { button.showInExplorer(); } selfType nameOnly() { set nameOnly; this; } }