import tfd.scala.squib._ import java.awt.event.ActionEvent import javax.swing.{JButton, WindowConstants} frame( 'title -> "Press Me", 'visible -> true, 'defaultCloseOperation -> WindowConstants.DISPOSE_ON_CLOSE, contents( button( 'text->"Press Me", events ( 'actionPerformed -> { ae:ActionEvent => ae.getSource.asInstanceOf[JButton].setText("Pressed") } ) ) ) ).pack