That code doesn't look as though it would compile - does it? There's no ; after showMessageDialog, and no closing curly bracket on the actionPerformed method. If your code doesn't compile, copy and...