Anonymous user
User input/Graphical: Difference between revisions
simplified previous example
(A J language example of GUI) |
(simplified previous example) |
||
Line 248:
=={{header|J}}==
A revision of the script posted at the [http://
<lang j>
pc simpleGui;
xywh 0 14 60 11;cc IntegerLabel static ss_right;cn "Enter an integer";
xywh 65 13 60 12;cc integer edit;
xywh 0 39 60 11;cc TextLabel static ss_right;cn "Enter text";
xywh 64 38 60 12;cc text edit;
pas 6 6;pcenter;
▲ GDEMO=: 0 : 0
simpleGui_run=: 3 : 0
wd SIMPLEGUI
▲ xywh 6 6 98 12;cc savegrid button;cn "Save after <Return>";
simpleGui_integer=: '75000' NB. initialize integer
wd 'set integer *', ": simpleGui_integer
▲ rem form end;
simpleGui_text =: text
try.
simpleGui_integer =: ". integer
catch.
▲ wd 'pshow'
wdinfo 'simpleGui_integer is Not a number'
▲ )
end.
simpleGui_close_button=: 3 : 0
simpleGui_close''
▲ wd 'pclose'
▲ )
simpleGui_cancel =: simpleGui_close
simpleGui_run''
▲ )
</lang>
After you enter values into the graphical display and click "
can bring focus to the .ijx window to see results.
=={{header|Java}}==
|