简体   繁体   中英

My Jframe Freezes When I start a process

i build a process for run an exe file from java app so run with start() then my frame freezes. It's just becoming a picture. I can't even close it with X. When i minimize the frame and open it again i see darkness in frame. My threads running in background, i can see from output but why my frame freezes?

i build a process for run an exe file from java app so run with start() then my frame freezes

Probably because you start the process on the Event Dispatch Thread and the process is blocking the Thread which means the GUI can't respond to events or repaint itself.

The process should be started in a separate Thread. Read the section from the Swing tutorial on Concurrency for more information.

Could you provide some code, the problem could be a number of issues so it would help cut down on some of them.

I would suggest checking that you haven't suspended/slept any of your threads.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM