To reference a static member inside a class like that, as a simple name, you need a static import:
import static javax.swing.SwingUtilities.*;
and later you can use
invokeLater(r);
A normal import import javax.swing.SwingUtilities;
allows you to refer to the the class SwingUtilities
by a simple name, but not any of the members of that class. So with that you could do:
import javax.swing.SwingUtilities;
and
SwingUtilities.invokeLater(r);