Coder's Guild Mailing List

Java dialog Box

Posted by Thomas, Sidney on 1999-04-13

Remmie

Oh yes, I do have a question...

How can make a Frame MODEL in a java applett?  I have an embedded
applett
but want to pop up a model dialogue box to recieve the users name before
execution continues.  I have read that the Dialog class cannot be used
from
the Applett class but can from a frame... this would mean 2 pop up boxes
(ie
applett brings up a frame that brings up a Dialog) but i really need ONE
box
to pop up up, and when a valid name is entered continue execution of the
applet... any ideas??


Well, You may want to use Visual Basic to do it.  You can use the VB
"InputBox" which is like a message box but you have a text box on the
form.  The InputBox is Modal.  Oh! Here is the code:
    
        InputBox "prompt", title, default, xpos, ypos, helpfile,
context
 
The down side is that the InputBox defaults with a cancel button, so you
would have to change the default setting.  Try another language if you
don't have VB.