GUI Extension

GUI Extension (Swing)

Create desktop applications using Java Swing components. Access via GUI namespace.

Base Components

Component

Base structure for all elements.

Container < Component

Base structure for elements that hold other components.

Top-Level Containers

General Containers

Controls & Inputs

Menus

Event Handling

Event RegistrationCallback Signature
comp.onClick("funcName")funcName()
comp.onMouse("funcName")funcName(type, x, y, button, clickCount)
comp.onKey("funcName")funcName(type, keyCode, keyChar, modifiers)
menu.onSelect("funcName")funcName(action)

Example


win = GUI.Window("My App");
panel = GUI.Panel();
btn = GUI.Button("Click Me");

function onClick(type, x, y, btn, c) {
    print("Clicked!");
}
btn.onMouse("onClick");

panel.add(btn);
win.add(panel);
win.setSize(300, 200);
win.show();