import javax.swing.*; import java.awt.*; public class JFrame { public static void main(String[] args) { JFrame myFrame = new JFrame(); myFrame.setTitle("JFrame Window"); myFrame.setSize(400, 200); myFrame.setLocation(200, 300); myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); myFrame.setVisible(true); } } Exception in thread "main" java.lang.Error: Unresolved compilation problems: The method setTitle(String) is undefined for the type JFrame The method setSize(int, int) is undefined for the type JFrame The method setLocation(int, int) is undefined for the type JFrame EXIT_ON_CLOSE cannot be resolved or is not a field The method setVisible(boolean) is undefined for the type JFrame at JFrame.main(JFrame.java:8)