importing swing package

Using the Java SDK with TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
guran

importing swing package

Post by guran »

Here's a question from a beginner of Java programming. I have used jdk 1.1.8 for some time and it has worked without any problems.That is, compiling and running applications from within Textpad.The very small applications i have written so far have been working without me setting some classpath variable (whatever that is...) Now i'm studying a tutorial from Sun(The Java tutorial) and have come to the trail on how to use the JFC swing package. To be able to compile and run the examples there with the "import javax.swing*.." statement in the sourcecode i downloaded JFC swing 1.1.1, which is supposed to make such programs work if you have jdk 1.1.8 previously installed.
The problem is that i get an error message in Textpad saying : "Package javax.swing not found in import.
import javax.swing.*; " I read during the installation process, that you must import the swingall.jar -file in order for swing to work with a programming IDE.
I simply do not know how to do this import in Textpad. I have almost no knowledge in DOS commands either.
Scott Swank

Re: importing swing package

Post by Scott Swank »

You need to put the swingall.jar into the classpath - whatever that is ;). Open textpad, select 'configure | Tools | Compile Java'. You will see an input for Parameters. enter '-classpath c:\pathtoswingalljar\swingall.jar'

Hint -

Regards,
Scott
Post Reply