Going From One dialog to another
I ahve an applet in which I have a dialog which has two buttons. I just want to go to another dialog by clicking a button.When in the action I say
if(arg.equals("Next") {
AnotherDialog f = AnotherDialog(this,"Next");
f.show();
}
It is giving a compiler error.
Can you help?
Thanks in Advance,
bsat
Re: Going From One dialog to another
It is an extremely bad idea to open dialogs from applets.
This is because applets could fake system dialogs and request passwords...etc.
That said, my guess is that the first dialog is modal... but you should specify
more details on the error.
Re: Going From One dialog to another
Hi,
Thank you.Even from the application also I am facing the same problem.Eventhough I make it modeless,
It is saying about the first parameter i.e.
AnotherDialog fd = new AnotherDialog(parameter1,parameter2);
I think the problem is with parameter1.What i have to pass to it?
Thank you,
Satyendra
Re: Going From One dialog to another
Hi satendra
The problem that u facing can be solved if u do foolowing things
If ur using awt-event delegation model then the "this" reference
should be the frame object-reference . I think ur implementing following code
in listener class so make some arrangement to pass the object of calling
frame to that listener class . then it will be ok
======
if(arg.equals("Next") {
AnotherDialog f = AnotherDialog(this,"Next");
f.show();
}
======
If u till not getting proper result . Then send ur code to me
at : [email protected] or
: [email protected]
best wishes
sunil
Re: Going From One dialog to another
Hi,
Thank you for ur response. I got the problem solved.
Satyendra