COMP401's assignment7, a practice of Java GUI