List of usage examples for javax.swing JDialog repaint
public void repaint()
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();/* www . ja va 2 s . co 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; }