continue

Flexible Calling Patterns in Other Languages

# in Jython
import javax
from javax import swing

def exit(e)
    java.lang.System.exit(0)
w=javax.swing.JFrame(title="Test")
p=top_frame.getContentPane()
eb = swing.JButton(label="Exit", background=Color.red, actionperformed=exit)
p.add(eb)
w.pack()
w.visible=1
#! /usr/bin/perl5 -w
# from http://pmwww.cs.vu.nl/documentation/Tk/UserGuide.html
use strict;
use Tk;

my $main = MainWindow->new;
$main->Button(-text => 'Exit',
              -command => [$main => 'destroy']
              )->pack;
MainLoop;

continue


back to top


set preferences

LL2, Saturday 9 November 2002, Tim Hickey/Ken Anderson