Scala界面Panel、Layout初探

示例代码:

package com.dt.scala.guiimport scala.swing.SimpleSwingApplicationimport scala.swing.MainFrameimport scala.swing.Buttonimport scala.swing.Labelimport scala.swing.Orientationimport scala.swing.BoxPanelimport scala.swing.Swingobject GUI_Panel_Layout extends SimpleSwingApplication{ def top = new MainFrame{title = "Second GUI"val button = new Button{text = "Scala"}val label = new Label {text = "Here is Spark!!"}contents = new BoxPanel(Orientation.Vertical){contents += buttoncontents += labelborder = Swing.EmptyBorder(50,50,50,50)} }}

效果图:

相关来源:DT大数据梦工厂,微信公众号是DT_Spark,,每天都会有大数据实战视频发布,请您持续学习。

相关资料:

scala深入浅出实战经典完整视频、PPT、代码下载:

百度云盘:

腾讯微云:

360云盘: 访问密码45e2

版权声明:本文为博主原创文章,未经博主允许不得转载。

和属于我们的风景。一起吃早餐,

Scala界面Panel、Layout初探

相关文章:

你感兴趣的文章:

标签云: