Is it possible make all JFrames the internal program uses into JInternalFrames and place them in a JDesktopPane?

大憨熊 提交于 2020-01-06 09:04:32

问题


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?

(individual question from IDE-Style program running)


回答1:


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.

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.



来源:https://stackoverflow.com/questions/4055467/is-it-possible-make-all-jframes-the-internal-program-uses-into-jinternalframes-a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!