validate and repaint after changing panels