Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object PositionTest extends Frame {
- val button1 = new Button("Button")
- val button2 = new Button("Button")
- val positionPanel = new PositionPanel {
- add(button1,
- Seq((PositionPanel.Property.Left, 10), (PositionPanel.Property.Right, .5f),
- (PositionPanel.Property.Top, 10), (PositionPanel.Property.Bottom, 10)))
- add(button2,
- Seq((PositionPanel.Property.HCenter, .125f), (PositionPanel.Property.Top, 10),
- (PositionPanel.Property.Height, .25f), (PositionPanel.Property.Width, .25f)))
- }
- title = "Test"
- preferredSize = new Dimension(300, 200)
- contents = positionPanel
- def main (args: Array[String]): Unit = {
- PositionTest.visible = true
- println (PositionTest.button1)
- println (PositionTest.button2)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement