简体   繁体   中英

What is the * 'class' in swing user interface?

I have seen this in my lecture's code examples but never in the main lecture notes. I haven't been able to find any information on it online either. What is the * 'class' (if it is even a class) in:

package graphicsExample;
import java.swing.*;
    ...

In other what's, what does importing this do?

It's importing all classes from a single package, ie

import javax.swing.*;

imports the classes/interfaces/enums/exceptions the classes listed here (not including nested classes/interfaces/ect.): https://docs.oracle.com/javase/8/docs/api/javax/swing/package-summary.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM