wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes problems after import javax.swing.* Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "problems after import javax.swing.*" Watch "problems after import javax.swing.*" New topic
Author

problems after import javax.swing.*

jimmy hakka
Greenhorn

Joined: Feb 19, 2003
Posts: 2
the following is a program in a book:
import javax.swing.* ;
public class Welcome
{
public static void main(String[]grav){
JOptionpane.showMessageDialog(
null,
"Welcome to the wonderful world of Java!",
"Welcome,new programmer",
JOptionpane.PLAIN_MESSAGE);
System.exit(0);
}
}
then when I:
c:>javac Welcome.java
there were errors return:
Welcome.java:10: cannot resolve symbol
symbol : variable JOptionpane
location: class Welcome
JOptionpane.PLAIN_MESSAGE);
^
Welcome.java:6: cannot resolve symbol
symbol : variable JOptionpane
location: class Welcome
JOptionpane.showMessageDialog(
^
2 errors
what can I do?
thx.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Capitalize the 'p' in JOptionPane, that's all.
kind regards
jimmy hakka
Greenhorn

Joined: Feb 19, 2003
Posts: 2
thanks,my friend.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Welcome to JavaRanch, jimmy!
Note that to help preserve formatting of posted code and error messages you can surround it with the [code] and [/code] UBB tags.
Good luck and I hope to see you 'round the Ranch!


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problems after import javax.swing.*
 
Similar Threads
Pass by ref- pgm err
My j2ee jdk1.4.2 is not supporting javax package.
Login page
JSP servlet compilation problem
login page