Skip to content

vs‐java

Isaiah edited this page Oct 25, 2023 · 3 revisions

Comparison vs java.

iui:

mut window := ui.Window.new(title: 'My App')

// Create Button
mut btn := ui.Button.new(text: 'A Button')
btn.subscribe_event('mouse_up', on_click_event)

// Add Button to Window & Run
window.add_child(btn)
window.gg.run() 

Java:

JFrame f = new JFrame("My App");

JButton btn = new JButton("A Button");
btn.addActionListener(ev -> { on_click_event(ev) });
f.add(btn);

f.setVisible(true)
Clone this wiki locally