Calling revalidate() method instead of updateUI/dispose()/pack()