简体   繁体   English

如何兼顾不同的屏幕尺寸?

[英]How to take into account different screen sizes?

I have written a JAVA desktop application using Netbeans IDE, when I run the application it looks perfect on my laptop.我使用 Netbeans IDE 编写了 JAVA 桌面应用程序,当我运行该应用程序时,它在我的笔记本电脑上看起来很完美。 However when I installed it on a larger screen laptop, there is some extra space.但是,当我将它安装在更大屏幕的笔记本电脑上时,会有一些额外的空间。 What is the best way to get rid of that?摆脱它的最佳方法是什么? Is there a way I can support multiple screen sizes in my source code or should I create a copy of the project and install netbeans and do the resize at the new computer which defeats the whole purpose?!有没有办法可以在我的源代码中支持多种屏幕尺寸,或者我应该创建项目的副本并安装 netbeans 并在新计算机上调整大小,这会破坏整个目的?!

thanks谢谢

If you are using Swing, you can use any of the different layout managers.如果您使用的是 Swing,您可以使用任何不同的布局管理器。 http://download.oracle.com/javase/tutorial/uiswing/layout/using.html http://download.oracle.com/javase/tutorial/uiswing/layout/using.html

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

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