Fixing OSX specific problems with JOptionPanes