Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Labels正在一一定位HBox。我希望他们彼此合而为一。我怎样才能做到?提前致谢
Labels
HBox
您应该尝试将 VBox 放在 Hbox 内,然后您可以通过将 HBox.hgrow 属性设置为 ALWAYS 来将 VBox 设置为始终与 HBox 一起增长。如果您这样做,并将 HBox 的 prefWidth 设置为至少适合您的最大标签的大小,那么将显示所有内容。
您使用的是 FXML 还是代码?你能张贴你所拥有的片段吗?