When you run a class from the command line, Java looks in that class for this method and calls it, or reports the error you're seeing.

I'd tell you to just add a main method, but you still wouldn't see anything; the method you're showing creates a window but never makes it visible, so there's no point in calling it. Here's about the smallest complete program based on this code: