List of usage examples for javax.swing JComponent paintImmediately
public void paintImmediately(int x, int y, int w, int h)
From source file:Main.java
public static void printNow(int time, JComponent obj) { Dimension dim = obj.getSize(); obj.validate();//w w w .ja v a 2 s . com obj.paintImmediately(0, 0, dim.width, dim.height); try { Thread.sleep(time); } catch (InterruptedException e) { } }