开发者

How do I create horizontal or vertical struts and glue for use with scala BoxPanel?

开发者 https://www.devze.com 2023-02-02 19:54 出处:网络
In Java, the class java.swing.Box contains m开发者_运维百科ethods to create horizontal and vertical struts and glue. Struts and glue is usefull to space elements when using BoxLayout.

In Java, the class java.swing.Box contains m开发者_运维百科ethods to create horizontal and vertical struts and glue. Struts and glue is usefull to space elements when using BoxLayout.

Box.createHorizontalStrut(10)
Box.createVerticalStrut(10)

Box.createHorizontalGlue()
Box.createVerticalGlue()

Where can I find the corresponding methods in scala?


I found the methods in the scala Swing companion object:

import swing.Swing

Swing.HStrut(10)
Swing.VStrut(10)

Swing.HGlue
Swing.VGlue
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号