Java GUI隐藏了Windows任务栏 [英] Java GUI hides windows taskbar

查看:119
本文介绍了Java GUI隐藏了Windows任务栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 JFrame 为桌面应用程序创建GUI。我使用此代码根据平台屏幕的分辨率设置的GUI大小。

I am using JFrame to create my GUI for a desktop application. The size of the GUI I am setting according to the resolution of the platform screen using this code.

this.setSize(this.getToolkit().getScreenSize());

问题在于,当我运行应用程序时,GUI会覆盖所有屏幕。 Windows任务栏也隐藏在GUI后面。

The problem is that when I run the application the GUI covers all of the screen. The Windows task-bar is also hidden behind the GUI.

我希望无论任务栏大小如何,任务条都应该在所有条件下都可见。我该如何实现?

I want that whatever the size of the task-bar is, the task-bar should be visible in all conditions. How do I achieve that?

推荐答案

怎么样?

jFrame.setState(JFrame.MAXIMIZED_BOTH);

这篇关于Java GUI隐藏了Windows任务栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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