W开发者_StackOverflow社区hat is difference between java.awt.*
and java.awt.event.*
?
It's just two different packages.
When you say import java.awt.*
it imports only those classes which belong exactly to java.awt
package, not to its subpackages.
That's why when you want to use events you have also import java.awt.event
.
Do you mean while importing? They are different packages. They aren't necessarily related. Importing java.awt.* doesn't import java.awt.event.*
精彩评论