% MINERVA (c) IF Computer 1996,97 % http://www.ifcomputer.com/MINERVA mailto:support@ifcomputer.com :- package(gui). :- package(guibuilder). main(Applet, Args) :- gui(Applet, border, [ 'North' / label(_,'Hello World'), 'Center' / text_area(OutputWindow, 16, 60), 'South' / panel(_, grid(2,1), [ label(_, 'input a term: '), text_field(InputWindow, 60) ** action(process_input(InputWindow)) ]) ]), textComponent_setEditable(OutputWindow,false), textArea_getOutputStream(OutputWindow, Output), set_output(Output), set_error(Output), write('Hello World!'), nl, flush_output, helloWorld(Args). process_input(InputWindow) :- textComponent_getText(InputWindow, Text), parse_atom(Text, Term), helloWorld(Term), textComponent_setText(InputWindow, ''). helloWorld(Args) :- writeq(Args), nl, flush_output.