标签:
学习了Scala界面Scala界面Panel、Layout实战详解,Panel是一个容器,有很多子类,复写了方法top,定义了button和label,在BoxPanel中加入button和label例子如下
Import scala.swing._
Object GUI_Panel_Layout extends simpleswingApplication{
def top =new MaiFram{
Title=”Second GUI”
Val button=new Button{
Text=”scala”
}
Val label = new label {
Text=”here is spark!!!”
}
Contents=new BoxPanel(Orientation.Vertical){
Contents+=button
Contents+=label
Border=swing.EmptyBorder(50,50,50,50)
}
}
标签:
原文地址:http://www.cnblogs.com/tom-lee/p/4684153.html