Originally Posted by dannyboi
OK, besides that...
I don't understand this followup question. That is literally all that is wrong with it. Make sure you add the missing closing braces. Just the class and the method itself; I'd remove the redundant open and close braces as well though.
Now other than this, you are mixing swing and command line components. This is bizarre to say the least, if you want to use a gui, then keep it all in the gui. Use the showInputDialog instead and try/catch an Integer.parseInt call. Otherwise, even packed as a jar you'd need to execute it on the command line every time in order to receive input.