开发者

java swing form hang

I am developing an 开发者_如何学Capplication in java Swing(desktop) that communicate to device through Serial port.the problem is that it hangs when communication lost with device.and I am unable to close the Form until I don't end the .exe in window task mannager.what should be solution so that i can close the forms.


I'm guessing you are communicating with the other application by using the Event Dispatch Thread. If the other application hangs then your GUI becomes unresponsive.

I would suggest you use a separate Thread to communicate with the other device.

Read the section from the Swing tutorial on Concurrency for more information.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜