matty-guy
September 7th, 2010, 09:45 PM
I've started doing my computing in 6th form (college) and it went okay, but once I got home I wanted to try the stuff I'd learnt. I installed all the Java packages I was told I'd need, installed NetBeans and Geany to see if much differed and gave it a go.
The code we were given was something like this
import javax.Swing.JOptionPane;
public class Numbers {
public static void main (String args [])
{
int blah;
blah= 66;
JOptionPane.showMessageDialog (null, "My number is" + blah);
System.exit (0);
}
}
The problem I have is that in NetBeans, I get an error next to the first like and 'JOptionPane...' line, saying ' package javax.Swing does not exist'. Geany won't compile my program, I assume for the same reason. The code up there worked at school, unless I made a silly error copying it over. Anyone know what's up or how to fix it? I've tried this on my 9.04 Crunchbang and the new Linux Mint.
The code we were given was something like this
import javax.Swing.JOptionPane;
public class Numbers {
public static void main (String args [])
{
int blah;
blah= 66;
JOptionPane.showMessageDialog (null, "My number is" + blah);
System.exit (0);
}
}
The problem I have is that in NetBeans, I get an error next to the first like and 'JOptionPane...' line, saying ' package javax.Swing does not exist'. Geany won't compile my program, I assume for the same reason. The code up there worked at school, unless I made a silly error copying it over. Anyone know what's up or how to fix it? I've tried this on my 9.04 Crunchbang and the new Linux Mint.