Solved restore state problem (by commenting the setVisible() in Application). Solved null pointer exception in paintSelectedArea() by checking null. Fixed NotSerializable problem of Refresh ... Controller' by implementing Serializable.