JavaFX 2没有根据窗口大小调整UI控件的大小 [英] JavaFX 2 Not Resizing UI Control Based On Window Size

查看:357
本文介绍了JavaFX 2没有根据窗口大小调整UI控件的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是JavaFX的新手,我想学习。我有一个包含GridPane的Group,其中包含lineChart,TableView和HBox(状态栏)但我遇到以下问题:

I'm new to JavaFX and I want to learn. I have a Group containing a GridPane that contains a lineChart, TableView and HBox (status bar) but I'm experiencing the following problem:


  1. 我在Windows XP上使用屏幕分辨率800 x 600,当我将屏幕分辨率更改为1024 x 768时,lineChart,TableView和HBox不会扩展以填充新的窗口大小,它在右侧留下了很大的空间。当调整窗口大小时,如何使控件填充窗口的宽度。

  1. I am using screen resolution 800 x 600 on Windows XP when I change the screen resolution to 1024 x 768, the lineChart, TableView and HBox does not expand to fill the new window size, it leaves a large space at the right. How can I make controls fill the width of the window when window is resized.

TableView的高度超出窗口的边界,窗口的下边界tableView和状态栏未显示。如何确保tableView不会超出窗口高度?

The TableView's height extends beyond the boundary of the window, the bottom border of the tableView and the status bar is not showing. How can I make sure that the tableView does not extend beyond the window height?


推荐答案

您应该使用userComputed size(height和width)属性。

you should use userComputed size (height,and width) property.

这篇关于JavaFX 2没有根据窗口大小调整UI控件的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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