swing added,init for javascript