I've specifically set Eclipse to use the JDK 7 through Windows-Preferences several times but the swing package still refuses to work. It says the import javax.swing.* cannot be resolved. It also says JFrame cannot be resolved to a type/variable. Here is the code (package name edited to "generic package name"). I've been trying to fix this for the last 3 hours and its driving me crazy...
p
import javax.swing.*;
public class Frame {
public static void main(String[] args){
JFrame frame = new JFrame("2d game");
frame.add(new Board());
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(1200, 365);
frame.setVisible(true);
}
}