You're trying to return a String form the actionPerformed method, something which can't be allowed, since as the compiler is telling you, it is declared to be void and can return nothing. Instead you should call a method inside of actionPerformed. Please tell us: just where is that String supposed to go? What code calls and displays this JFrame?
Edit: Also as JB Nizet states, if you want to show double quotes in a String, escape it:
String foo = "This is \"foo\" String".
I wonder if what you really want to do is to create a modal JDialog, and have the dialog get user information and then return a String. If so, consider using a JOptionPane.
You also need to extract the text from your JTextField which will require that you call getText()
on it.
EDit
Just a JOptionPane should do:
public static String getSettings() {
String input = JOptionPane.showInputDialog(null, "Class: ",
"Insert Settings", JOptionPane.QUESTION_MESSAGE);
return String.format("class=\"%s\"", input);
}