简体   繁体   English

将Java控制台显示在屏幕的前面

[英]Bring Java Console to Front of Screen

I have a java application that works just in console (windows command prompt for example). 我有一个仅在控制台中工作的Java应用程序(例如Windows命令提示符)。 I would like to occasionally bring the window to the front screen. 我偶尔希望将窗口移到前屏幕。 Is there something that I can add to my code to do this. 有什么可以添加到我的代码中来执行此操作的吗?

If you are using awt or swing, then both Window and JFrame have toFront() method to bring the window to the front. 如果使用awt或swing,则WindowJFrame都必须具有toFront()方法才能将窗口置于最前面。 If you are using console, I don't think that's possible. 如果您使用的是控制台,我认为这是不可能的。

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

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