 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Timmy Guest
|
Posted: Mon Nov 08, 2004 9:40 am Post subject: Problem in WindowStateListener |
|
|
Hi guy,
in my code below:
===========================================================
jd1 = new JDialog();
jd1 .setContentPane(getJContentPane1());
jd1 .setSize(100, 100);
jd1 .setTitle("Test");
jd1 .addWindowStateListener(new java.awt.event.WindowStateListener(){
public void windowStateChanged(WindowEvent e)
{
System.out.println("Jdialog State changed");
}
}
);
===========================================================
I found that the WindowStateListener is never being executed
Any comment?
Thanks
|
|
| Back to top |
|
 |
John McGrath Guest
|
Posted: Tue Nov 09, 2004 3:38 pm Post subject: Re: Problem in WindowStateListener |
|
|
On 11/8/2004 at 4:40:27 AM, Timmy wrote:
| Quote: | in my code below:
jd1 = new JDialog();
:
jd1 .addWindowStateListener(new java.awt.event.WindowStateListener(){
I found that the WindowStateListener is never being executed
|
What is happening to the dialog that you think should cause the
WindowStateListener to execute?
--
Regards,
John McGrath
|
|
| Back to top |
|
 |
Timmy Guest
|
Posted: Wed Nov 10, 2004 11:37 am Post subject: Re: Problem in WindowStateListener |
|
|
Hi,
"Resize" event can trigger the WindowStateListener?
Thanks
John McGrath wrote:
| Quote: | On 11/8/2004 at 4:40:27 AM, Timmy wrote:
in my code below:
jd1 = new JDialog();
:
jd1 .addWindowStateListener(new java.awt.event.WindowStateListener(){
I found that the WindowStateListener is never being executed
What is happening to the dialog that you think should cause the
WindowStateListener to execute?
|
|
|
| Back to top |
|
 |
John McGrath Guest
|
Posted: Thu Nov 11, 2004 10:04 pm Post subject: Re: Problem in WindowStateListener |
|
|
On 11/10/2004 at 6:37:38 AM, Timmy wrote:
| Quote: | "Resize" event can trigger the WindowStateListener?
|
No. A WindowStateListener receives events when the "State" (or extended
state) attribute of a Window is changed. In other words, when the Window
is iconified, minimized, maximized, etc.
To receive notification of size changes, use a ComponentListener.
--
Regards,
John McGrath
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|