Use JDialog instead of JFrame

This change is made because using JFrame causes the application to become full
screen under xmonad.
Fix issue where words and/or the last line goes out of visible region

The size of the window is increased as a fix. The exact reason why this
happens is not yet determined.