added main() method and attach to frame so it can run w/out appletviewer