全屏Java中的JFrame [英] JFrame in full screen Java

查看:28
本文介绍了全屏Java中的JFrame的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很快就会做一个项目,我将不得不在其中使用全屏模式.

I will be doing a project soon and I will have to use full screen mode in it.

它会在窗口中绘制一些图形.如果我使用 JFrame 或类似的东西会很方便.

It will draw some graphics in the window. It would be convienient if I use JFrame or something similar.

我不知道屏幕的最终分辨率是多少.请告诉我图形是否会自动重新缩放?

I don't know what the final resolution of the screen will be. Please tell me if the graphics will be automaticly rescaled?

JFrame jf = new JFrame();
jf.setSize(1650,1080);
//make it fullscreen;
//now is everything is going to be rescaled so it looks like the original?

推荐答案

添加:

frame.setExtendedState(JFrame.MAXIMIZED_BOTH); 
frame.setUndecorated(true);
frame.setVisible(true);

这篇关于全屏Java中的JFrame的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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