Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dialog does not work

Status
Not open for further replies.

DGA15

Programmer
Aug 19, 2000
40
US
Why doesn';t the code belowshow a dialog?
//--problem code below
Object anchorPoint = getParent();
while ( ! (anchorPoint instanceof Frame)){
anchorPoint = ((Component)anchorPoint).getParent ();
}
Dialog d1 = new Dialog((Frame)anchorPoint, "Enter Text", true);
d1.show();
//--problem code above

It appears to find a frame but does not popup the dialog.I understand that d1.show should make the dialog visible.Code compiles without errors and runs, but no dialog.
Thanks for any help from a Java newbie.
 
hi!
i have tested your code it works!!!
so the problem may be in another part.
maybe you can show the rest of it.....


raikyng.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top