Import javax.swing.* error

Heya. I decided to learn java and i've been doing the tutorials, recently i started the swing tutorials and the learn by example page. However, whenever I try to import javax.swing.* it gives me an error. SO you know, i am using the J2SDK 1.4.2 and netbeans IDE 5.0. Here's the error text and what i type.

import javax.swing.* ;

the error is:

illegal start of expression and then sometimes i get <identifier> expected.

can anyone help me?

[478 byte] By [C89c_Ccubeda] at [2007-10-3 3:35:55]
# 1

To update. I figured out how to do this with a blank start file in netbeans, however it's awful to have to delete main and then make a new class file. So, is there anyway to get a blank template project or to import javax.swing.* without having to delete main and start with a blank file? SO, i guess my question has changed, but it's still about an import javax.swing.* error.

thanks.

C89c_Ccubeda at 2007-7-14 21:30:46 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...