Form a firstname.lastname@domain.se address, eliminating diacritics from a name
You can chain replaces and you don't need to replace "n. spaces" -> " ", you can just replace them with a "." if you trim first

String s = JOptionPane.showInputDialog(null, "Ange namn och efternamn");
s = s.trim()
      .replaceAll("\\s{2,}", ".")
      .toLowerCase()
      .replace('å', 'a')
      .replace('ä', 'a')
      .replace('ö', 'o');
JOptionPane.showMessageDialog(null, s + "@nackademin.se");