是否可以将内部程序使用的所有JFrame都转换为JInternalFrames并将它们放置在JDesktopPane中? [英] Is it possible make all JFrames the internal program uses into JInternalFrames and place them in a JDesktopPane?

查看:84
本文介绍了是否可以将内部程序使用的所有JFrame都转换为JInternalFrames并将它们放置在JDesktopPane中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目标是让用户选择一个Java程序,然后我的程序打开一个内部带有JEditorPaneJInternalFrame作为控制台,并将所说的JInternalFrame放在JDeskopPane中.是否可以将用户程序打开的所有Window都更改为JInternalFrame,并将它们放置在所说的JDesktopPane中?

The goal is to have the user select a java program, then my program opens up a JInternalFrame with a JEditorPane inside it as the console and places said JInternalFrame in a JDeskopPane. Is it possible to change all the Windows the user's program may open into JInternalFrames and place them in said JDesktopPane, as well?

(来自 IDE-Style程序正在运行的单个问题)

推荐答案

我非常确定,如果不更改正在启动的程序的二进制文件,就不可能做到这一点.如果目标程序执行类似于new Window().show()的操作,则您几乎不可能钩住"系统,并告诉它将其交换为JInternalFrame.

I'm quite sure that this would not be possible to do without tampering with the binaries of the program that you're launching. If the target program performs something like new Window().show(), you'll have little possibilities to "hook into" the system, and tell it to swap it for a JInternalFrame.

我的意思是,如果编写并编译该程序以显示顶层窗口,则您几乎无能为力.系统中没有挂钩",您可以说将所有将来的Window放入此JInternalFrame.

What I'm saying is that if the program is written and compiled to show a top-level window, there is little you could do to change that. There is no "hook" into the system, with which you can say "put all future Windows into this JInternalFrame.

这篇关于是否可以将内部程序使用的所有JFrame都转换为JInternalFrames并将它们放置在JDesktopPane中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆