i swear i got a nullPointerException at that if-else statement... WHY?
edit: oh i forgot to tell that this method was in a subclass with several other methods that were referenced directly with jOptionPanes. i merged the methods and the jOptionPane commands in a constructor and evrything worked