public FilePreviewer(JFileChooser fc) { setPreferredSize(new Dimension(100, 50)); fc.addPropertyChangeListener(this); setBorder(new BevelBorder(BevelBorder.LOWERED)); }
/** register for events from the specified file chooser */ public void applyTo(final JFileChooser fileChooser) { fileChooser.setAccessory(new AccessoryView().getComponent()); applyDefaultFolder(fileChooser); fileChooser.addPropertyChangeListener(this); }