Re: How Do I Write Listeners for Resizing or Maximizing a Window?




<kvnsmnsn@xxxxxxxxxxx> wrote in message news:1125427234.598533.11270@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I'm familiar enough with Java that I can create a <JPanel> object and
build listeners that execute when the user clicks a mouse in it, or
drags a mouse across it, or moves a mouse off of it. My question now
is how do I write listeners that execute when the user resizes the
window or maximizes the window? I've looked through the classes at
"java.sun.com/j2se/1.5.0/docs/api/index.html", but haven't found any-
thing that looks like it would work. Could someone give me some
pointers on this? Any information would be greatly appreciated.



// consider these program fragments

class xxx implements ComponentListener {}
yyy.addComponentListener(this);
public void componentMoved(ComponentEvent e) {}
public void componentResized(ComponentEvent e) {}


.



Relevant Pages