javaclass

Changeset

104:c9e71dcb6038
2005-01-10 Paul Boddie raw files shortlog changelog graph Added a Tkinter wrapping example based on the Python 2.2.2 library reference example.
examples/Tkinter/Application.java (file) examples/Tkinter/tkjava/Button.java (file) examples/Tkinter/tkjava/Frame.java (file)
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/examples/Tkinter/Application.java	Mon Jan 10 01:06:17 2005 +0100
     1.3 @@ -0,0 +1,16 @@
     1.4 +public class Application extends tkjava.Frame {
     1.5 +    private tkjava.Button quit, hiThere;
     1.6 +
     1.7 +    public Application() {
     1.8 +        super();
     1.9 +        this.pack();
    1.10 +        this.createWidgets();
    1.11 +    }
    1.12 +
    1.13 +    public void createWidgets() {
    1.14 +        this.quit = new tkjava.Button(this);
    1.15 +        this.quit.pack();
    1.16 +        this.hiThere = new tkjava.Button(this);
    1.17 +        this.hiThere.pack();
    1.18 +    }
    1.19 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/examples/Tkinter/tkjava/Button.java	Mon Jan 10 01:06:17 2005 +0100
     2.3 @@ -0,0 +1,8 @@
     2.4 +package tkjava;
     2.5 +
     2.6 +public class Button {
     2.7 +    public Button(Frame parent) {
     2.8 +    }
     2.9 +    public void pack() {
    2.10 +    }
    2.11 +}
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/examples/Tkinter/tkjava/Frame.java	Mon Jan 10 01:06:17 2005 +0100
     3.3 @@ -0,0 +1,8 @@
     3.4 +package tkjava;
     3.5 +
     3.6 +public class Frame {
     3.7 +    public Frame() {
     3.8 +    }
     3.9 +    public void pack() {
    3.10 +    }
    3.11 +}