AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem in WindowStateListener

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits
View previous topic :: View next topic  
Author Message
Timmy
Guest





PostPosted: Mon Nov 08, 2004 9:40 am    Post subject: Problem in WindowStateListener Reply with quote



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





PostPosted: Tue Nov 09, 2004 3:38 pm    Post subject: Re: Problem in WindowStateListener Reply with quote



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





PostPosted: Wed Nov 10, 2004 11:37 am    Post subject: Re: Problem in WindowStateListener Reply with quote



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





PostPosted: Thu Nov 11, 2004 10:04 pm    Post subject: Re: Problem in WindowStateListener Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.