Removed usage of JOptionPane causing errors on no xserver pcs.