开发者

Difference between java.awt.* and java.awt.event.*

开发者 https://www.devze.com 2023-01-28 18:36 出处:网络
W开发者_StackOverflow社区hat is difference between java.awt.* and java.awt.event.*?It\'s just two different packages.

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.*

0

精彩评论

暂无评论...
验证码 换一张
取 消