class extending GCanvas won't do as told by addComponentListener
<p>After importing java.awt.event.*, I've added a component listener to a class extending GCanvas with the following code:</p>

<pre><code>public NameSurferGraph() {
addComponentListener(this);
nameList = new ArrayList&lt;NameSurferEntry&gt;();
}

public void componentHidden(ComponentEvent e) { }
public void componentMoved(ComponentEvent e) { }
public void componentResized(ComponentEvent e) { update(); }
public void componentShown(ComponentEvent e) { }

public void update() {
removeAll();
drawBackground();
if (nameList.size()&gt;0) {
for (int i=0; i&lt;nameList.size(); i++) {;
drawLineForOneName(i);
}
}
}
</code></pre>

<p>But when I call a method on it from another class, nothing happens.</p>

<pre><code>public NameSurferGraph graph = new NameSurferGraph();

public void graphName(String name) {
entry = database.findEntry(name);
graph.addEntry(entry);
graph.update();
}
</code></pre>

<p>Any ideas about what I might be doing wrong?</p>
