@@ -0,0 +1,1112 @@
+package com.jeromecompsci.dgui.examples;%0A%0Aimport com.jeromecompsci.dgui.*;%0A%0A/**%0A * @author Derek Wang%0A */%0Apublic class CounterProgram %7B%0A    private Window window;%0A    private Button plus, minus;%0A    private Label output;%0A    private int count;%0A%0A    public CounterProgram() %7B%0A        plus = new Button(%22 + %22);%0A        minus = new Button(%22 - %22);%0A        output = new Label();%0A%0A        plus.on(%22click%22, this, %22plusButtonClicked%22);%0A        minus.on(%22click%22, this, %22minusButtonClicked%22);%0A%0A        window = new Window(%0A                new HPane(%0A                        output,%0A                        new VPane(plus, minus)%0A                )%0A        );%0A%0A        window.setText(%22Counter%22);%0A%0A        renderLabel();%0A    %7D%0A%0A    public void plusButtonClicked() %7B%0A        this.count++;%0A        renderLabel();%0A    %7D%0A%0A    public void minusButtonClicked() %7B%0A        this.count--;%0A        renderLabel();%0A    %7D%0A%0A    private void renderLabel() %7B%0A        output.setText(Integer.toString(count));%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        CounterProgram t = new CounterProgram();%0A        t.window.show();%0A    %7D%0A%7D%0A

Add counter program example