Wait until Dialog closes and return value.

T

thjomha

I am writing a point of sale application. I would like a Tender dialog
to open on top of the sale frame and then return the amount of change
when its done. The sale frame will wait until it recieves the amount
of change. I can't just use a JOptionDialog becuase the tender dialog
i have deisnged is more complicated...it allows multiple entries, etc
and only closes when F1 is hit.

Please help,

Thanks,
Taha Jomha
 
L

Locke

I am writing a point of sale application. I would like a Tender dialog
to open on top of the sale frame and then return the amount of change
when its done. The sale frame will wait until it recieves the amount
of change. I can't just use a JOptionDialog becuase the tender dialog
i have deisnged is more complicated...it allows multiple entries, etc
and only closes when F1 is hit.

Please help,

Thanks,
Taha Jomha


Put "rateFrame = new SetRate(this);" in the beginning somewhere, probably
after your initializing happens. You need to just create the tender form
that has everything you need and then create an instance that is not made
visible until you perform an action. Add "rateFrame.setVisible(true);" with
a different name obviously to the action performed which makes your already
created frame visible. When they close the tender frame just make it
invisible again. Then when you need the change you can pull it from the
saved value in the tender form - " exchangeRateFrame =
rateFrame.franceRate;". I hope this helps somehow. This way you are able
to use variables from other frames.

Locke
 
A

Andrew Thompson

I am writing a point of sale application. I would like ...

Are you your only user? If not - what would the user like?
..a Tender dialog ....
...only closes when F1 is hit.

...because that is very counter-intuitive, given that many
applications use F1 for *help*.
 

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,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top