Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using JOptionPane on MacOS 9



Hi there everyone...

I have been doing some early java programing on my PC and I wanted to try it
out on the Mac. I downloaded the SDK 2.2 and MRJ 2.2.5. When I went to
compile the following simple code, I got this error
**********************
CODE: test.java

import javax.swing.*

public class test{

public static void main(String args[]){

String age;
Int yearsold;

age = JOptionPane.showInputDialog(" What is your age");
yearsold = Integer.parseInt( age );
System.out.println( yearsold);}
}
**************

This is the error I get....
test.java:1 Package javax.swing not found in import
import javax.swing.*;


What does this mean? does the SDK not come with the Swing Classes? I just
want to do simple Java GUI stuff


Jon Lumpkin
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.