Anonymous user
User input/Graphical: Difference between revisions
→{{header|Groovy}} new solution
Thundergnat (talk | contribs) m (→{{header|REBOL}}: Remove vanity tags) |
|||
Line 434:
'''[http://cogier.com/gambas/User_input-Graphical.png Click here for a picture of the running program]'''
=={{header|Groovy}}==
{{trans|Java}}
{{libheader|Swing}}
Solution:
<lang groovy>import javax.swing.JOptionPane
def number = JOptionPane.showInputDialog ("Enter an Integer") as Integer
def string = JOptionPane.showInputDialog ("Enter a String")
assert number instanceof Integer
assert string instanceof String</lang>
=={{header|Haskell}}==
|