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.
//--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.