全屏模式下的 JInternalFrame
我打算在全屏模式下使用 JInternalFrame 作为模态 JDialog,但是,当前在调用它时并未显示它。我需要将其添加到某个容器中吗?我尝试将其添加到 JOptionPane.showInternalMessage(...),但由于我想让该对话框在 3 秒后自动消失,因此这是行不通的,因为 JOptionPane 对话框只会保留在那里,直到有人单击“确定”。
有什么想法吗?非常感谢。
I intend to use a JInternalFrame as a modal JDialog in full-screen mode, however, it is not currently being shown when it gets called. Do I need to add it to some container? I tried adding it to a JOptionPane.showInternalMessage(...), but since I want to make the dialog to go away automatically after 3 seconds, this would not work, as the the JOptionPane dialog would just stay there until someone clicks OK.
Any idea? Many thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,您必须将其添加到您希望其成为“内部”的容器中。
下面有一个示例向您展示了这种行为。您可以在这里注意到,内部框架(将在框架内按下鼠标时显示/隐藏)不会绘制在 EAST 面板上,因为当它超出其父级的边界时,它会被剪裁。
Yes you have to add it to a container in which you want it to be 'internal'.
Below you have an example which shows you this behaviour. You can notice here that the internal frame (which will appear/hide on mouse press inside the frame) is not painted over the EAST panel, as it is clipped when it goes outside the borders of its parent.