JDialog Closing Problem

Dear All,

I have a JFrame namedBasicFrame.BasicFrame has a menu which contains items such asConfigure,Start etc.

When i click Configure on menu a Panel calledMainPanel appears inside theBasicFrame.TheMainPanel has aLeftPanel andRightPanel.

LeftPanel displays certain options. and

RightPanel the corresponding details

Example:

click on ]configure onLeftPanel givesa

Textbox ,Test button ,Cancel button onRightPanel for doing some settings.

Click on TestButton gives > aDialogbox with a textbox and OK and CLOSE buttons

I have set the parent ofDialogbox to be theBasicFrame and also its a modal dialog.The problem is that i have to close theDialogbox when i click Close button.For the first time when i click on close ,theDialogbox is closed.But if i start again fromBasicFrame the second time

ie,

BasicFrame--> Configure menu--> MainPanel-->

RightPanel-->TestButton-->Dialogbox

and then click Close button,it requires 2 clicks to close theDialogbox.If i repeat the same procedure once again,the closing requires 3 clicks and soon.I am not able to findout where i have gone wrong.

Any help will be appreciated

Thanks

lakshmi

Message was edited by:

lekshmi

Message was edited by:

lekshmi

[1476 byte] By [lekshmia] at [2007-11-26 12:59:34]
# 1
It might be helpful if you posted relevant code .. preferable a short, self-contained, compileing example...If your dialog is only text with Ok and Cancel buttons, I'd stronglysuggest JOptionPane.
es5f2000a at 2007-7-7 16:58:49 > top of Java-index,Desktop,Core GUI APIs...