*
The moose likes Swing / AWT / SWT and the fly likes pop up window help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "pop up window help" Watch "pop up window help" New topic
Author

pop up window help

cassie williams
Greenhorn

Joined: Apr 09, 2004
Posts: 5
hi there,
how do i have a pop up window(JFrame or some sort) upon clicking on a jbutton?
thanks
Amy Phillips
Ranch Hand

Joined: Apr 02, 2003
Posts: 280
Hi cassie,
I usually create a class which extends a JFrame and contains everything I want for my popup window. Then add an actionListener to the button you want to open the form. On the button being clicked I create an instance of my popup window form, call the method to make it do something and then call myform.show().
there are probably better ways but it works
[ April 12, 2004: Message edited by: Amy Phillips ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: pop up window help
 
Similar Threads
javascript:window.close() not working in firefox
Totally frustrated, please help
new window quality
Hide Standart Buttons in Taskbar
Refreshing Parent Window from Child