简体   繁体   English

使用系统框架上的按钮关闭Java Applet的JFrame会导致延迟

[英]Closing JFrame of java applet using buttons on the system frame causes delay

I have written a java applet which opens a JFrame (so when run in the browser, it will popup a small new window). 我已经编写了一个Java applet,它可以打开JFrame(因此在浏览器中运行时,它将弹出一个小的新窗口)。

The problem is, when pressing one of the buttons of the window frame, there is a slight delay (cannot move the mouse for 2 or 3 sec) before the window will close/minimize/maximize. 问题是,当按下窗口框的按钮之一时,在关闭窗口/最小化/最大化窗口之前会有一点延迟(不能移动鼠标2或3秒)。 The hidden menu actions (accessed when pressing on the icon of the window, top left) work perfectly. 隐藏的菜单操作(按左上角的窗口图标时可以访问)可以正常工作。

In a development environment non of the problems occur. 在开发环境中,不会发生任何问题。

I'm currently using jdk 1.6 update 16. 我目前使用JDK 1.6更新16。

Anyone an idea? 有人知道吗?

I have solved the issue in the mean time, maybe it will work in your situation as well. 同时,我已经解决了该问题,也许它也适用于您的情况。

I used to pack the interface items in the overridden "init"-function, but after doing all those in the "start"-function (also inherited from JFrame), the issue seems to be resolved. 我曾经将接口项打包在覆盖的“ init”函数中,但是在“ start”函数(也继承自JFrame)中完成所有这些操作之后,该问题似乎已解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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