Pause Util Value is returned

E

E Tepp

Hello,

I would like to create frame that prompts the user for file
information. The frame is used in many parts of the program so that I
do not wish to use the frame object itself to redirect the next
action. Instead, based on the user input I would like to determin the
next action. This requires that I show the frame, wait for a return
value before the program contiues. However when I try this the
function that called the frame runs to completion before the value is
returned.

How can I make the program pause and wait for the return value.

Thank You,
Elliott
 
S

Steve W. Jackson

:Hello,
:
:I would like to create frame that prompts the user for file
:information. The frame is used in many parts of the program so that I
:do not wish to use the frame object itself to redirect the next
:action. Instead, based on the user input I would like to determin the
:next action. This requires that I show the frame, wait for a return
:value before the program contiues. However when I try this the
:function that called the frame runs to completion before the value is
:returned.
:
:How can I make the program pause and wait for the return value.
:
:Thank You,
:Elliott

If you're using Swing, look into the JOptionPane. You can use one of a
series of predefined ones or use the class to devise your own. Any are
able to accept input and block until dismissed.

= Steve =
 
M

Matthew Zimmer

Steve said:
If you're using Swing, look into the JOptionPane. You can use one of a
series of predefined ones or use the class to devise your own. Any are
able to accept input and block until dismissed.

= Steve =

And if JOptionPane is too limited for what you want, use JDialog where
you set the dialog modal value to true (forces block) and then set to
visible.

Matthew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top