[英]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.