How do I create horizontal or vertical struts and glue for use with scala BoxPanel?
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
精彩评论