Java import packages understanding : <p>i'm learning Java for one year now and this question is confusing me.</p>

<p>At the moment i'm working with Java Swing and i want to know why i have to write the line</p>

<pre><code>import java.awt.event.*;
</code></pre>

<p>when i want to use the actionListener even when i've already imported the whole awt package before :/</p>

<pre><code>import java.awt.*
</code></pre>

<p>why do i have to tell the compiler to import a Sub-package (is it the right name?), for instance the event package, when i already imported everything under the awt package?</p>

<p>Thanks alot!</p>
