Note: please use the abstraction layer GUI.checkBox if possible! (see GUI). See also JSCView.
A check box view is a toggle button displaying either clear (value = false) or checked (value = true).
( w = JSCWindow.new; b = JSCCheckBox( w, Rect( 20, 20, 340, 30 )); w.front; ) // assign a function that is called when button toggles: // value returns either 'true' or 'false' b.action = { arg butt; butt.value.postln; }; // set state (without invoking action function) b.value = true; b.value = false; // set state and invoke action function if it results in a change of value b.valueAction = true; // you can set an optional text label b.string = "Schoko"; b.font = JFont( "Serif", 20 );