Re: How Do I Write Listeners for Resizing or Maximizing a Window?
- From: Eric Sosman <eric.sosman@xxxxxxx>
- Date: Tue, 30 Aug 2005 15:11:58 -0400
kvnsmnsn@xxxxxxxxxxx wrote:
> 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.
theComponent.addComponentListener(new ComponentAdapter() {
public void componentResized(ComponentEvent evt) {
// your code here ...
}
});
--
Eric.Sosman@xxxxxxx
.
- References:
- Prev by Date: Re: Method chaining with generics
- Next by Date: Re: Method chaining with generics
- Previous by thread: Re: How Do I Write Listeners for Resizing or Maximizing a Window?
- Next by thread: Re: How Do I Write Listeners for Resizing or Maximizing a Window?
- Index(es):
Relevant Pages
|
|