This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma 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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "pop up window help" Watch "pop up window help" New topic

pop up window help

cassie williams

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?
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
there are probably better ways but it works
[ April 12, 2004: Message edited by: Amy Phillips ]
I agree. Here's the link:
subject: pop up window help
It's not a secret anymore!