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 with PopupFactory

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





PostPosted: Wed Aug 09, 2006 7:10 am    Post subject: Problem with PopupFactory Reply with quote



Hi guys,
I write a DatePicker, so I use PopupFactory to popup the Select-date
panel. Pop it up is no problem, it seems work well, but the problem is
that it couldnt close the popup automatically, i.e i want the popup is
closed when user click somewhere else, like the popup menu.
I'm messing up, please help.
Back to top
Guest






PostPosted: Wed Aug 09, 2006 6:50 pm    Post subject: Re: Problem with PopupFactory Reply with quote



Nicky wrote:
Quote:
Hi guys,
I write a DatePicker, so I use PopupFactory to popup the Select-date
panel. Pop it up is no problem, it seems work well, but the problem is
that it couldnt close the popup automatically, i.e i want the popup is
closed when user click somewhere else, like the popup menu.
I'm messing up, please help.

Although there is probably some way to solve this with popups, another
option is to use an unmodal JDialog with setUndecorated(true) to
contain the panel, and add this WindowListener to the dialog:

dialog.addWindowListener(new WindowAdapter()
{
public void windowDeactivated(WindowEvent arg0)
{
dialog.dispose();
}
});

Regards,
Daniel Sjöblom
Back to top
Nicky
Guest





PostPosted: Thu Aug 10, 2006 7:10 am    Post subject: Re: Problem with PopupFactory Reply with quote



Thanks Daniel,
Your solution works very well.
But i still want to find out how the popup menu works, i'm still
working to find it out. If you know, please help.
Thx,

dsjoblom (AT) abo (DOT) fi wrote:
Quote:
Nicky wrote:
Hi guys,
I write a DatePicker, so I use PopupFactory to popup the Select-date
panel. Pop it up is no problem, it seems work well, but the problem is
that it couldnt close the popup automatically, i.e i want the popup is
closed when user click somewhere else, like the popup menu.
I'm messing up, please help.

Although there is probably some way to solve this with popups, another
option is to use an unmodal JDialog with setUndecorated(true) to
contain the panel, and add this WindowListener to the dialog:

dialog.addWindowListener(new WindowAdapter()
{
public void windowDeactivated(WindowEvent arg0)
{
dialog.dispose();
}
});

Regards,
Daniel Sjöblom
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.