Re: How Do I Write Listeners for Resizing or Maximizing a Window?
- From: "Oliver Wong" <owong@xxxxxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 18:51:30 GMT
<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.
Haven't actually tested this with code, but it seems that resizing and
maximizing would typically require mouse clicks. Have you thought about
listening for mouse clicks and then checking if the size of the window with
previously known sizes?
You can do something similar to keyboard shortcuts which resize/maximize
the window.
- Oliver
.
- Follow-Ups:
- Re: How Do I Write Listeners for Resizing or Maximizing a Window?
- From: Roedy Green
- Re: How Do I Write Listeners for Resizing or Maximizing a Window?
- References:
- Prev by Date: Re: Commenting in Java
- 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
|
|