LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-15-2005, 07:01 PM   #1
Dutchman
LQ Newbie
 
Registered: Jun 2005
Location: Australia
Distribution: n/a
Posts: 4

Rep: Reputation: 0
Post what is import javax.swing.*;


Hi all,
I am new to this, so I would like some friendly help.
I need a discription of these ASAP please.
what is import javax.swing.*;
what is import java.awt.event.*;
what is import javax.swing.border.*;
what is import java.util.Random;
what is import java.util.*;

Thanks
Dutchman


 
Old 06-15-2005, 07:47 PM   #2
Andrew M
LQ Newbie
 
Registered: Jun 2005
Location: Canada
Distribution: Debian
Posts: 15

Rep: Reputation: 0
Consult the API first for info on any language's library:

http://java.sun.com/j2se/1.3/docs/api/.
 
Old 06-15-2005, 07:49 PM   #3
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
On the java import statement:

When you've imported a class from a package, you can refer to the class by name without prefixing said name with the package name. Note that if you import two classes with identical names, the one you import last has precedence.

So, if you
Code:
import javax.swing.foo;
you can say
Code:
foo
instead of
Code:
javax.swing.foo
`*' means `all names'.

hth --Jonas
 
Old 06-15-2005, 09:32 PM   #4
Dutchman
LQ Newbie
 
Registered: Jun 2005
Location: Australia
Distribution: n/a
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for the help to the question. It helped me a great deal.
 
Old 06-16-2005, 10:12 AM   #5
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
Quote:
Thanks for the help to the question. It helped me a great deal.
You're welcome

--Jonas
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Import sys ?bash: import: command not found joirnange Linux - Newbie 4 12-28-2004 10:33 PM
getting javax.swing.* to appear student04 Programming 8 10-05-2004 10:06 AM
couldn't import swing in JAVA on REDHAT LINUX 9 nedian123 Programming 2 06-20-2004 01:47 AM
javax.swing doesn't work israel Programming 4 02-19-2004 11:59 PM
javax comm for suse linux kingshrimp Linux - Newbie 4 11-26-2003 09:19 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration