简体   繁体   English

使用Java Swing的桌面应用程序的兼容性问题

[英]Compatability issue for Desktop application using java swing

I've created a java desktop application in which the UI has been designed using the layout managers in swing. 我创建了一个Java桌面应用程序,其中的UI是使用swing的布局管理器设计的。 The UI comes up fine in my monitor (18.5 inch). UI在我的显示器(18.5英寸)中显示良好。 However, if I try to view the UI in a smaller screen (14 inch), the layout remains the same but the contents like label/text are not getting resized. 但是,如果尝试在较小的屏幕(14英寸)上查看UI,则布局保持不变,但是诸如标签/文本之类的内容不会调整大小。 The texts are broken (followed by ...) and is unreadable. 文本被打断(后跟...)并且不可读。 Is there any way to resize the contents depending on the screen size? 有什么方法可以根据屏幕尺寸来调整内容的大小?

You need to define or take panel and add all component like label, textfield etc are set in the panel and this panel add in frame then all component set in their perticular location and text are not broken. 您需要定义或采用面板并添加所有组件,例如在面板中设置标签,文本字段等,并且此面板在框架中添加,然后所有组件在其垂直位置和文本中设置的组件都不会损坏。
Or also set fix panel size so that help to you to set same size of your application in different screen. 或者,还可以设置修复面板大小,以帮助您在不同屏幕上设置相同大小的应用程序。

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

相关问题 桌面应用中的数据库使用swing - database in desktop application using swing 在 Java 桌面聊天应用程序中混合使用 Swing 和 JavaFX - Mixing Swing and JavaFX in a Java desktop chat application 正确启动Java Swing桌面应用程序的方法 - Proper way to start Java Swing desktop application 如何在云上部署Java Desktop Swing应用程序? - How to deploy Java desktop Swing application on the cloud? 如何使用Swing通过Java桌面应用程序上的图标运行JAR文件? - How to run a JAR file through an icon on Java Desktop Application Using Swing? 桌面应用程序中的MVC和Swing - MVC and Swing in desktop application 桌面SWING应用程序上的jpa - jpa on a Desktop SWING Application 使用哪一个:用于GNOME桌面应用程序的Java Swing或GTK +? - Which one to use: Java Swing or GTK+ for GNOME desktop application? 如何在Java 8桌面应用程序中替换或重新启动死锁的Swing EventDispatchThread / EventQueue - How to replace or restart a deadlocked Swing EventDispatchThread/EventQueue in Java 8 desktop application 我应该将什么样的Swing外观用于Java桌面应用程序? - What Swing look and feel should I use for a Java desktop application?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM