Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Swing / AWT / SWT and the fly likes Cannot open Dialog in the frame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Cannot open Dialog in the frame" Watch "Cannot open Dialog in the frame" New topic

Cannot open Dialog in the frame

Raj kalaria
Ranch Hand

Joined: Sep 08, 2005
Posts: 72
I have a frame and in the frame i have three tabs

In one of the tab i have button which when click should call the dialog, but
for some reason the dialog is not opening. here is the code
I am using netbeans

I am not sure if i am passing correct reference to the dialog while creating
the instance.

Parent Frame (name of the class is Usertab)

Dialog Code
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
the code in main() should be in the constructor (namely the 'visible' part),
or you could include dy.setVisible(true) in callDialog()
I agree. Here's the link:
subject: Cannot open Dialog in the frame
Similar Threads
how to build swing applications with bidirectional support
traversing between frames
Issue in Displaying panel
Proper sizing for dynamic components
Custom ComboBox with icon