?
Solved

How do I use the Swing API?

Posted on 2003-11-10
5
Medium Priority
?
280 Views
Last Modified: 2010-03-31
I have netbeans installed and need to use the Swing API to do some simple GUI stuff in a program I am writing.  When I use the line:
import javax.swing.*;
The package javax.swing cannot be found.  How do I get over this problem.  I am using windows xp.

Thanks
Ashley :-)
0
Comment
Question by:ashleycoker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 9717526
Check that you don't have an active SDK of < 1.2
0
 
LVL 15

Expert Comment

by:Javatm
ID: 9718102
>> The package javax.swing cannot be found

      Have already seen the requirements you need the jdk:
      http://www.netbeans.org/downloads/ide/index.html

      Did you already downloaded the jdk ?
      If not download the latest from this site.
      http://java.sun.com/webapps/download/DisplayLinks

      Then install it.

      If you are already using the jdk :

      1.) Make sure your using 1.2 ++
      2.) Install it in its default directory.

Hope this helps . . .
JAVATM
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9718413
Of course, if you don't have *any* SDK at all, then you'll have to get one, although the link above seems rather odd.

  http://java.sun.com/getjava

should be better
0
 
LVL 15

Accepted Solution

by:
Javatm earned 150 total points
ID: 9718738
>> http://java.sun.com/getjava

      I dont think this is the link for jdk, Its only for an automatic or manual download of java virtual machine
      not a link for jdk :)
 
      This is much better :
      http://java.sun.com/j2se/1.4.2/download.html
0
 
LVL 92

Expert Comment

by:objects
ID: 9719743
You don't need to upgrade your JDK, you can just install the Swing classes.
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses
Course of the Month11 days, 22 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question