Click to See Complete Forum and Search --> : Going From One dialog to another
B.Satyendra
March 5th, 1999, 02:34 AM
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
Paolo Milani
March 5th, 1999, 04:08 AM
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.
B.Satyendra
March 5th, 1999, 04:22 AM
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
Sunil Sarje
March 5th, 1999, 06:00 AM
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 : sunil_sarje@mailcity.com or
: javafaq@mailcity.com
best wishes
sunil
sunil sarje
March 5th, 1999, 06:00 AM
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 : sunil_sarje@mailcity.com or
: javafaq@mailcity.com
best wishes
sunil
B.Satyendra
March 8th, 1999, 12:10 AM
Hi,
Thank you for ur response. I got the problem solved.
Satyendra
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.