javax.swing.JOptionPane' not found in import.

i tried this program in linux

import javax.swing.JOptionPane;

public class Welcome4 {

public static void main (String args[])

{

JOptionPane.showMessageDialog(

null, "Welcome\nto\nJava\nProgramming!");

System.exit (0); //terminate program

}

when i typed javac Welcome4.java in the terminal the result is

Welcome4.java:1: Class or interface `javax.swing.JOptionPane' not found in import.

import javax.swing.JOptionPane;

^

1 error

but this goes well in windows.

any help will be very much appreciated

[598 byte] By [rporticio] at [2007-9-30 20:41:40]
# 1
What version of Java do you have on Linux?
scorbett at 2007-7-7 1:30:40 > top of Java-index,Administration Tools,Sun Connection...
# 2
While this shouldn't cause that error, your post is missing a final curly bracket.Adding that, it compiles ok in Windows.
ChuckBing at 2007-7-7 1:30:40 > top of Java-index,Administration Tools,Sun Connection...