Test on java swing