-
Notifications
You must be signed in to change notification settings - Fork 145
Frames
A typical Swing app will stick everything inside an instance of [JFrame] (http://download.oracle.com/javase/6/docs/api/javax/swing/JFrame.html). Create a JFrame
in Seesaw with the (frame)
function:
(frame :title "An example", :on-close :exit, :content "Some Content")
(frame)
takes a number of options (see the code and tests), but two very important options are :on-close
and :content
.
:on-close
sets the default behavior when the frame is closed by the user. Valid values are :exit
, :hide
, :dispose
, and :nothing
. Note that :exit
will cause the entire JVM to exit when the frame is closed, which may be reasonable for a standalone app, but probably isn't for use in the REPL. The default value is :hide
.
:content
sets the content of the frame which can be any widget (see Widget Coercion above), but is usually a panel of some sort.