开发者

Java: suspend frame while other frame getting information from user

开发者 https://www.devze.com 2022-12-31 12:13 出处:网络
I need to get some information from user by showing a JFrame I need the first frame pause process until user enter data from the second frame

I need to get some information from user by showing a JFrame

I need the first frame pause process until user enter data from the second frame

I thought about using wait() and notify() but I don't know how

How ca开发者_运维百科n I do this?

Thanks


It seems to that it would be a lot easier for you is you just use a modal JDialog, which you present to the user. The inputs whatever is needed there and the JFrame that popped the dialog will carry on after the dialog's closed. wait() and notify() are used for thread synchronization btw...

0

精彩评论

暂无评论...
验证码 换一张
取 消