LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   what is import javax.swing.*; (https://www.linuxquestions.org/questions/programming-9/what-is-import-javax-swing-%2A%3B-334032/)

Dutchman 06-15-2005 07:01 PM

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
:Pengy:
:newbie:
:jawa:

Andrew M 06-15-2005 07:47 PM

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

http://java.sun.com/j2se/1.3/docs/api/.

jonaskoelker 06-15-2005 07:49 PM

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

Dutchman 06-15-2005 09:32 PM

Thanks for the help to the question. It helped me a great deal.

jonaskoelker 06-16-2005 10:12 AM

Quote:

Thanks for the help to the question. It helped me a great deal.
You're welcome :)

--Jonas


All times are GMT -5. The time now is 07:18 PM.