List of usage examples for javax.swing JDialog invalidate
@Override public void invalidate()
From source file:pl.otros.vfs.browser.JOtrosVfsBrowserDialog.java
protected JDialog createDialog(Component parent) throws HeadlessException { Frame toUse = (Frame) SwingUtilities.getAncestorOfClass(Frame.class, parent); final JDialog dialog = new JDialog(toUse); dialog.getContentPane().add(vfsBrowser); dialog.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { cancelSelection();/*from w ww. java 2 s. c o m*/ } }); vfsBrowser.setApproveAction(new AbstractAction(Messages.getMessage("general.openButtonText")) { @Override public void actionPerformed(ActionEvent actionEvent) { returnValue = ReturnValue.Approve; dialog.dispose(); } }); vfsBrowser.setCancelAction(new AbstractAction(Messages.getMessage("general.cancelButtonText")) { @Override public void actionPerformed(ActionEvent actionEvent) { cancelSelection(); dialog.dispose(); } }); dialog.setModal(true); dialog.invalidate(); dialog.repaint(); return dialog; }