I don't think eclipse is loading jdk

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

I don't think eclipse is loading jdk

Postby lbcp15 » Sat Mar 16, 2013 6:05 am

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);
}
}
lbcp15
Once Poster
Once Poster
 
Posts: 1
Joined: Sat Mar 16, 2013 5:43 am

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 3 guests