Java将JFrame附加到正在运行的应用程序窗口? [英] Java attach JFrame to a running application window?

查看:190
本文介绍了Java将JFrame附加到正在运行的应用程序窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在右上角将JFrame附加到其他应用程序打开窗口并在调整大小时保持不变?有可能吗?

这是我想要完成的图表:

Here is a diagram of what i would like to accomplish:

感谢您的帮助!如果无法做到这一点,那么还有替代方案吗?

Thanks for the help! If this is not possible, are there alternatives?

如何获得窗口大小/位置并相应地设置我自己的jframe?

Ways to get window size/location and set my own jframe accordingly?

推荐答案

您要求Java修改已经运行的非Java程序,对于这些类型的问题,Java不是最好的工具。请理解Java的主要优势之一是它能够在多个平台上不变地运行已编译的代码。有了这种优势就会出现一个弱点:必然,Java必须尽可能与操作系统无关,因此,当代码需要熟悉操作系统时,它不是一个好工具。

You are asking Java to modify an already running non-Java program, and for these types of problems, Java is not the best tool. Please understand that one of Java's main strengths is its ability to run compiled code unchanged on multiple platforms. With this strength comes a weakness: of necessity, Java must be as OS agnostic as possible, and because of this, it is not a good tool when code needs to get cozy with the OS.

替代方案:几乎任何其他可以轻松调用OS的语言。

Alternatives: just about any other language that can allow easy OS calls.

不要误会我的意思,你可以用Java做类似的事情,但它要求你跳过使用其他工具时不需要的箍。

Don't get me wrong, you can do some similar stuff with Java, but it requires that you jump through hoops that just aren't needed when using other tools.

这篇关于Java将JFrame附加到正在运行的应用程序窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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