This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
Totally frustrated, please help
new window quality
Hide Standart Buttons in Taskbar
javascript:window.close() not working in firefox
Refreshing Parent Window from Child