//******************************************************************************
// ModelExe2.java:	Applet
//
//******************************************************************************

import java.awt.*;
import java.util.*;
import java.applet.*;
import java.net.URL;
import VBrun400;

//==============================================================================
// Main class for applet ModelExe2.java
//
//==============================================================================
public class ModelExe2 extends Applet
{
    
    // Load Visual Basic run-time Java classes.
    //--------------------------------------------------------------------------
    VBrun400 VB = new VBrun400();


    // Create java components corresponding to Visual Basic controls.
    //--------------------------------------------------------------------------
    TextField rrate = new TextField("9");
    TextField Txtc0 = new TextField("100");
    TextField txti0 = new TextField("25");
    TextField txtmpc = new TextField(".9");
    TextField ProTax = new TextField(".1");
    TextField tax0 = new TextField("50");
    TextField gov0 = new TextField("100");
    Button Command1 = new Button("Solve Model");
    Label Label34 = new Label("Disposable");
    Label Label33 = new Label("National");
    Label Label32 = new Label("Total");
    Label Label31 = new Label("Government");
    Label Label30 = new Label("Simple Keynesian Income Determination");
    Label Label29 = new Label("9");
    Label Label28 = new Label("Interest Rate (%)");
    Label Label27 = new Label("100");
    Label Label26 = new Label("25");
    Label Label25 = new Label(".9");
    Label Label24 = new Label("Was");
    Label Label23 = new Label("Now");
    Label Label22 = new Label("Autonomous Consumption");
    Label Label21 = new Label("Autonomous Investment");
    Label Label20 = new Label("Marginal Propensity to Consume");
    Label Label19 = new Label(".1");
    Label Label18 = new Label("50");
    Label Label17 = new Label("100");
    Label Label16 = new Label("Parameters: Enter Your Changes");
    Label Label15 = new Label("Was");
    Label Label14 = new Label("Now");
    Label Label13 = new Label("Marginal Tax Rate");
    Label Label12 = new Label("Household Tax");
    Label Label11 = new Label("Leg'd  Gov't Spending");
    Label Label10 = new Label("Policy Variables: Enter Your Changes");
    Label Label3[] = new Label[6];
    Label Label2 = new Label("Was");
    Label Label1 = new Label("Now");
    Label lblG = new Label("");
    Label lblINV = new Label("");
    Label lblC = new Label("");
    Label lblTAX = new Label("");
    Label lblYD = new Label("");
    Label lblY = new Label("");
    Label Label9 = new Label("Spending");
    Label Label8 = new Label("Investment");
    Label Label7 = new Label("Consumption");
    Label Label6 = new Label("Taxes");
    Label Label5 = new Label(" Income");
    Label Label4 = new Label(" Income");
    Image jpgModelExe;
    
    
    // Coordinate based layout manager used to mimic Visual Basic WYSIWYG layout
    //--------------------------------------------------------------------------
    protected void addControl(Container cContainer,
                              Component cControl,
                              int top,
                              int left,
                              int width,
                              int height)
    {
        cContainer.add(cControl);
        cControl.reshape(left, top, width, height);
    }


    // The init() method is used to initialize the applet. It is automatically
    // called by the system when the applet is first loaded.
    //--------------------------------------------------------------------------
    public void init()
    {
        setLayout(null);
        resize(602, 412);
        setBackground(new Color(12648447));

        rrate.setBackground(new Color(255, 255, 255));
        rrate.setFont(new Font("Dialog", Font.PLAIN, 16));
        addControl(this, rrate, 284, 154, 58, 33);

        Txtc0.setBackground(new Color(255, 255, 255));
        Txtc0.setFont(new Font("Dialog", Font.PLAIN, 16));
        addControl(this, Txtc0, 251, 510, 58, 33);

        txti0.setBackground(new Color(255, 255, 255));
        txti0.setFont(new Font("Dialog", Font.PLAIN, 16));
        addControl(this, txti0, 186, 510, 58, 30);

        txtmpc.setBackground(new Color(255, 255, 255));
        txtmpc.setFont(new Font("Dialog", Font.PLAIN, 16));
        addControl(this, txtmpc, 122, 510, 58, 30);

        ProTax.setBackground(new Color(255, 255, 255));
        ProTax.setFont(new Font("Dialog", Font.PLAIN, 16));
        addControl(this, ProTax, 227, 154, 58, 33);

        tax0.setBackground(new Color(255, 255, 255));
        tax0.setFont(new Font("Dialog", Font.PLAIN, 16));
        addControl(this, tax0, 178, 154, 58, 33);

        gov0.setBackground(new Color(255, 255, 255));
        gov0.setFont(new Font("Dialog", Font.PLAIN, 16));
        addControl(this, gov0, 122, 154, 58, 33);

        Command1.setForeground(new Color(0, 0, 0));
        Command1.setFont(new Font("Dialog", Font.PLAIN, 11));
        addControl(this, Command1, 316, 324, 187, 25);

        Label34.setBackground(new Color(12648447));
        Label34.setForeground(new Color(0, 0, 0));
        Label34.setFont(new Font("Dialog", Font.PLAIN, 13));
        Label34.setAlignment(Label.CENTER);
        addControl(this, Label34, 348, 186, 98, 25);

        Label33.setBackground(new Color(12648447));
        Label33.setForeground(new Color(0, 0, 0));
        Label33.setFont(new Font("Dialog", Font.PLAIN, 13));
        Label33.setAlignment(Label.CENTER);
        addControl(this, Label33, 348, 97, 82, 25);

        Label32.setBackground(new Color(12648447));
        Label32.setForeground(new Color(0, 0, 0));
        Label32.setFont(new Font("Dialog", Font.PLAIN, 16));
        addControl(this, Label32, 308, 559, 123, 33);

        Label31.setBackground(new Color(12648447));
        Label31.setForeground(new Color(0, 0, 0));
        Label31.setFont(new Font("Dialog", Font.PLAIN, 16));
        addControl(this, Label31, 340, 567, 123, 25);

        Label30.setBackground(new Color(12648447));
        Label30.setForeground(new Color(0, 0, 0));
        Label30.setFont(new Font("Dialog", Font.PLAIN, 18));
        addControl(this, Label30, 8, 259, 438, 25);

        Label29.setBackground(new Color(12648447));
        Label29.setForeground(new Color(0, 0, 0));
        Label29.setFont(new Font("Dialog", Font.PLAIN, 16));
        Label29.setAlignment(Label.CENTER);
        addControl(this, Label29, 284, 219, 50, 33);

        Label28.setBackground(new Color(12648447));
        Label28.setForeground(new Color(0, 0, 0));
        Label28.setFont(new Font("Dialog", Font.PLAIN, 13));
        addControl(this, Label28, 284, 32, 106, 42);

        Label27.setBackground(new Color(12648447));
        Label27.setForeground(new Color(0, 0, 0));
        Label27.setFont(new Font("Dialog", Font.PLAIN, 16));
        Label27.setAlignment(Label.CENTER);
        addControl(this, Label27, 251, 575, 58, 33);

        Label26.setBackground(new Color(12648447));
        Label26.setForeground(new Color(0, 0, 0));
        Label26.setFont(new Font("Dialog", Font.PLAIN, 16));
        Label26.setAlignment(Label.CENTER);
        addControl(this, Label26, 186, 575, 58, 25);

        Label25.setBackground(new Color(12648447));
        Label25.setForeground(new Color(0, 0, 0));
        Label25.setFont(new Font("Dialog", Font.PLAIN, 16));
        Label25.setAlignment(Label.CENTER);
        addControl(this, Label25, 122, 575, 58, 33);

        Label24.setBackground(new Color(12648447));
        Label24.setForeground(new Color(0, 0, 0));
        Label24.setFont(new Font("Dialog", Font.PLAIN, 16));
        Label24.setAlignment(Label.CENTER);
        addControl(this, Label24, 81, 567, 74, 25);

        Label23.setBackground(new Color(12648447));
        Label23.setForeground(new Color(0, 0, 0));
        Label23.setFont(new Font("Dialog", Font.PLAIN, 16));
        Label23.setAlignment(Label.CENTER);
        addControl(this, Label23, 81, 502, 58, 25);

        Label22.setBackground(new Color(12648447));
        Label22.setForeground(new Color(0, 0, 0));
        Label22.setFont(new Font("Dialog", Font.PLAIN, 13));
        Label22.setAlignment(Label.RIGHT);
        addControl(this, Label22, 259, 308, 187, 33);

        Label21.setBackground(new Color(12648447));
        Label21.setForeground(new Color(0, 0, 0));
        Label21.setFont(new Font("Dialog", Font.PLAIN, 13));
        Label21.setAlignment(Label.RIGHT);
        addControl(this, Label21, 194, 316, 179, 25);

        Label20.setBackground(new Color(12648447));
        Label20.setForeground(new Color(0, 0, 0));
        Label20.setFont(new Font("Dialog", Font.PLAIN, 13));
        Label20.setAlignment(Label.RIGHT);
        addControl(this, Label20, 122, 292, 204, 33);

        Label19.setBackground(new Color(12648447));
        Label19.setForeground(new Color(0, 0, 0));
        Label19.setFont(new Font("Dialog", Font.PLAIN, 16));
        Label19.setAlignment(Label.CENTER);
        addControl(this, Label19, 235, 219, 50, 25);

        Label18.setBackground(new Color(12648447));
        Label18.setForeground(new Color(0, 0, 0));
        Label18.setFont(new Font("Dialog", Font.PLAIN, 16));
        Label18.setAlignment(Label.CENTER);
        addControl(this, Label18, 178, 219, 50, 33);

        Label17.setBackground(new Color(12648447));
        Label17.setForeground(new Color(0, 0, 0));
        Label17.setFont(new Font("Dialog", Font.PLAIN, 16));
        Label17.setAlignment(Label.CENTER);
        addControl(this, Label17, 122, 219, 50, 33);

        Label16.setBackground(new Color(12648447));
        Label16.setForeground(new Color(0, 0, 0));
        Label16.setFont(new Font("Dialog", Font.PLAIN, 13));
        addControl(this, Label16, 41, 365, 276, 25);

        Label15.setBackground(new Color(12648447));
        Label15.setForeground(new Color(0, 0, 0));
        Label15.setFont(new Font("Dialog", Font.PLAIN, 16));
        addControl(this, Label15, 81, 219, 50, 25);

        Label14.setBackground(new Color(12648447));
        Label14.setForeground(new Color(0, 0, 0));
        Label14.setFont(new Font("Dialog", Font.PLAIN, 16));
        addControl(this, Label14, 81, 170, 42, 25);

        Label13.setBackground(new Color(12648447));
        Label13.setForeground(new Color(0, 0, 0));
        Label13.setFont(new Font("Dialog", Font.PLAIN, 13));
        addControl(this, Label13, 227, 16, 123, 42);

        Label12.setBackground(new Color(12648447));
        Label12.setForeground(new Color(0, 0, 0));
        Label12.setFont(new Font("Dialog", Font.PLAIN, 13));
        addControl(this, Label12, 178, 32, 106, 33);

        Label11.setBackground(new Color(12648447));
        Label11.setForeground(new Color(0, 0, 0));
        Label11.setFont(new Font("Dialog", Font.PLAIN, 13));
        addControl(this, Label11, 122, 0, 139, 33);

        Label10.setBackground(new Color(12648447));
        Label10.setForeground(new Color(0, 0, 0));
        Label10.setFont(new Font("Dialog", Font.PLAIN, 13));
        addControl(this, Label10, 41, 16, 244, 25);

        Label3[5] = new Label("117.5");
        Label3[5].setBackground(new Color(12648447));
        Label3[5].setForeground(new Color(0, 0, 0));
        Label3[5].setFont(new Font("Dialog", Font.PLAIN, 16));
        Label3[5].setAlignment(Label.CENTER);
        addControl(this, Label3[5], 437, 583, 82, 25);

        Label3[4] = new Label("194.5");
        Label3[4].setBackground(new Color(12648447));
        Label3[4].setForeground(new Color(0, 0, 0));
        Label3[4].setFont(new Font("Dialog", Font.PLAIN, 16));
        Label3[4].setAlignment(Label.CENTER);
        addControl(this, Label3[4], 437, 486, 82, 25);

        Label3[3] = new Label("96.8");
        Label3[3].setBackground(new Color(12648447));
        Label3[3].setForeground(new Color(0, 0, 0));
        Label3[3].setFont(new Font("Dialog", Font.PLAIN, 16));
        Label3[3].setAlignment(Label.CENTER);
        addControl(this, Label3[3], 437, 389, 82, 25);

        Label3[2] = new Label("1250.9");
        Label3[2].setBackground(new Color(12648447));
        Label3[2].setForeground(new Color(0, 0, 0));
        Label3[2].setFont(new Font("Dialog", Font.PLAIN, 16));
        Label3[2].setAlignment(Label.CENTER);
        addControl(this, Label3[2], 437, 186, 82, 25);

        Label3[1] = new Label("1263.3");
        Label3[1].setBackground(new Color(12648447));
        Label3[1].setForeground(new Color(0, 0, 0));
        Label3[1].setFont(new Font("Dialog", Font.PLAIN, 16));
        Label3[1].setAlignment(Label.CENTER);
        addControl(this, Label3[1], 437, 292, 82, 25);

        Label3[0] = new Label("1445.5");
        Label3[0].setBackground(new Color(12648447));
        Label3[0].setForeground(new Color(0, 0, 0));
        Label3[0].setFont(new Font("Dialog", Font.PLAIN, 16));
        Label3[0].setAlignment(Label.CENTER);
        addControl(this, Label3[0], 437, 89, 82, 25);

        Label2.setBackground(new Color(12648447));
        Label2.setForeground(new Color(0, 0, 0));
        Label2.setFont(new Font("Dialog", Font.PLAIN, 16));
        Label2.setAlignment(Label.CENTER);
        addControl(this, Label2, 437, 8, 74, 25);

        Label1.setBackground(new Color(12648447));
        Label1.setForeground(new Color(0, 0, 0));
        Label1.setFont(new Font("Dialog", Font.PLAIN, 16));
        Label1.setAlignment(Label.CENTER);
        addControl(this, Label1, 405, 8, 74, 25);

        lblG.setBackground(new Color(12632319));
        lblG.setForeground(new Color(0, 0, 0));
        lblG.setFont(new Font("Dialog", Font.BOLD, 16));
        lblG.setAlignment(Label.CENTER);
        addControl(this, lblG, 405, 575, 82, 25);

        lblINV.setBackground(new Color(12632319));
        lblINV.setForeground(new Color(0, 0, 0));
        lblINV.setFont(new Font("Dialog", Font.BOLD, 16));
        lblINV.setAlignment(Label.CENTER);
        addControl(this, lblINV, 405, 389, 82, 25);

        lblC.setBackground(new Color(12632319));
        lblC.setForeground(new Color(0, 0, 0));
        lblC.setFont(new Font("Dialog", Font.BOLD, 16));
        lblC.setAlignment(Label.CENTER);
        addControl(this, lblC, 405, 292, 82, 25);

        lblTAX.setBackground(new Color(12632319));
        lblTAX.setForeground(new Color(0, 0, 0));
        lblTAX.setFont(new Font("Dialog", Font.BOLD, 16));
        lblTAX.setAlignment(Label.CENTER);
        addControl(this, lblTAX, 405, 486, 82, 25);

        lblYD.setBackground(new Color(12632319));
        lblYD.setForeground(new Color(0, 0, 0));
        lblYD.setFont(new Font("Dialog", Font.BOLD, 16));
        lblYD.setAlignment(Label.CENTER);
        addControl(this, lblYD, 405, 186, 82, 25);

        lblY.setBackground(new Color(12632319));
        lblY.setForeground(new Color(0, 0, 0));
        lblY.setFont(new Font("Dialog", Font.BOLD, 16));
        lblY.setAlignment(Label.CENTER);
        addControl(this, lblY, 405, 89, 82, 25);

        Label9.setBackground(new Color(12648447));
        Label9.setForeground(new Color(0, 0, 0));
        Label9.setFont(new Font("Dialog", Font.PLAIN, 16));
        addControl(this, Label9, 373, 575, 106, 20);

        Label8.setBackground(new Color(12648447));
        Label8.setForeground(new Color(0, 0, 0));
        Label8.setFont(new Font("Dialog", Font.PLAIN, 16));
        Label8.setAlignment(Label.RIGHT);
        addControl(this, Label8, 373, 389, 80, 20);

        Label7.setBackground(new Color(12648447));
        Label7.setForeground(new Color(0, 0, 0));
        Label7.setFont(new Font("Dialog", Font.PLAIN, 13));
        Label7.setAlignment(Label.CENTER);
        addControl(this, Label7, 373, 292, 95, 20);

        Label6.setBackground(new Color(12648447));
        Label6.setForeground(new Color(0, 0, 0));
        Label6.setFont(new Font("Dialog", Font.PLAIN, 16));
        Label6.setAlignment(Label.CENTER);
        addControl(this, Label6, 373, 486, 44, 20);

        Label5.setBackground(new Color(12648447));
        Label5.setForeground(new Color(0, 0, 0));
        Label5.setFont(new Font("Dialog", Font.PLAIN, 13));
        Label5.setAlignment(Label.CENTER);
        addControl(this, Label5, 381, 186, 92, 16);

        Label4.setBackground(new Color(12648447));
        Label4.setForeground(new Color(0, 0, 0));
        Label4.setFont(new Font("Dialog", Font.PLAIN, 13));
        Label4.setAlignment(Label.CENTER);
        addControl(this, Label4, 381, 97, 76, 16);

    }


    // The paint() method is used to draw graphics.
    //--------------------------------------------------------------------------
    public void paint(Graphics g)
    {
    }


    // The update() method is automatically called to redraw the Applet. The
    // default implementation is to call paint().
    //--------------------------------------------------------------------------
    public void update(Graphics g)
    {
        paint(g);
    }


    // User defined functions derived from Visual Basic code.
    //--------------------------------------------------------------------------

    private void Command1_Click()
    {
        try
        {
        double a[] = new double[4+1];
        double aa = 0;
        double p = 0;
        double t = 0;
        double mltp = 0;
        double auto = 0;
        double y = 0;
        double yd = 0;
        double c = 0;
        double inv = 0;
        double g = 0;
        double tax = 0;
        double mpc = 0;
        double i0 = 0;
        double c0 = 0;
        double g0 = 0;
        double mpt = 0;
        double t0 = 0;
        double r = 0;
        String yy = new String();
        String yyd = new String();
        String iinv = new String();
        String ttax = new String();
        String cc = new String();
        String gg = new String();
        mpc = VB.CDbl(txtmpc.getText());
        i0 = VB.CDbl(txti0.getText());
        c0 = VB.CDbl(Txtc0.getText());
        g0 = VB.CDbl(gov0.getText());
        mpt = VB.CDbl(ProTax.getText());
        t0 = VB.CDbl(tax0.getText());
        r = VB.CDbl(rrate.getText());
        a[0] = 0.15;
        a[1] = 0.05;
        a[2] = -0.045;
        a[3] = 0.01;
        a[4] = 0.03;
        aa = 250;
        t = 1;
        p = 1;
        mltp = 1 / (1 - (mpc * (1 - mpt) + a[1] + a[3]));
        auto = c0 + i0 + g0 * (Math.exp((double)a[4] * t)) - mpc * t0;
        y = mltp * auto + a[0] * (aa / p) + a[2] * (r / p);
        yd = y - t0 - mpt * y;
        c = c0 + mpc * yd + a[0] * (aa / p);
        inv = i0 + a[1] * y + a[2] * (r / p);
        g = a[3] * y + g0 * Math.exp((double)a[4] * t);
        tax = t0 + mpt * y;
        yy = String.valueOf(y);
        yyd = String.valueOf(yd);
        ttax = String.valueOf(tax);
        cc = String.valueOf(c);
        iinv = String.valueOf(inv);
        gg = String.valueOf(g);
        lblY.setText((yy).substring(0, (6)));
        lblYD.setText((yyd).substring(0, (6)));
        lblTAX.setText((ttax).substring(0, (6)));
        lblC.setText((cc).substring(0, (6)));
        lblINV.setText((iinv).substring(0, (6)));
        lblG.setText((gg).substring(0, (6)));
        }
        catch (Exception ex)
        {
            // TODO: Exception Handling
        
            // Display Exception message in browser's status bar
            showStatus(ex.getMessage());
        }
    }




    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_rrate(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Txtc0(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_txti0(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_txtmpc(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_ProTax(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_tax0(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_gov0(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Command1(Event e)
    {
        boolean bReturn = false;

        if (e.id == Event.ACTION_EVENT)
        {
            Command1_Click();
            bReturn = true;
        }

        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label34(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label33(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label32(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label31(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label30(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label29(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label28(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label27(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label26(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label25(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label24(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label23(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label22(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label21(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label20(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label19(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label18(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label17(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label16(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label15(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label14(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label13(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label12(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label11(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label10(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label3(Event e, int Index)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label2(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label1(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_lblG(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_lblINV(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_lblC(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_lblTAX(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_lblYD(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_lblY(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label9(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label8(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label7(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label6(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label5(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }


    // The routeEvent() method is used to route user events to applet components
    //--------------------------------------------------------------------------
    private boolean routeEvent_Label4(Event e)
    {
        boolean bReturn = false;


        return bReturn;
    }
    
    
    // The routeEvent() method is used to route user events to this Applet
    //--------------------------------------------------------------------------
    private boolean routeEvent_ModelExe2(Event e)
    {
        boolean bReturn = false;
    

        return bReturn;
    }


    // The handleEvent() method is automatically called whenever the applet
    // receives an event.
    //--------------------------------------------------------------------------
    public boolean handleEvent( Event e )
    {
        boolean bReturn = false;

        if (e.target == rrate)
            bReturn = routeEvent_rrate(e);
        if (e.target == Txtc0)
            bReturn = routeEvent_Txtc0(e);
        if (e.target == txti0)
            bReturn = routeEvent_txti0(e);
        if (e.target == txtmpc)
            bReturn = routeEvent_txtmpc(e);
        if (e.target == ProTax)
            bReturn = routeEvent_ProTax(e);
        if (e.target == tax0)
            bReturn = routeEvent_tax0(e);
        if (e.target == gov0)
            bReturn = routeEvent_gov0(e);
        if (e.target == Command1)
            bReturn = routeEvent_Command1(e);
        if (e.target == Label34)
            bReturn = routeEvent_Label34(e);
        if (e.target == Label33)
            bReturn = routeEvent_Label33(e);
        if (e.target == Label32)
            bReturn = routeEvent_Label32(e);
        if (e.target == Label31)
            bReturn = routeEvent_Label31(e);
        if (e.target == Label30)
            bReturn = routeEvent_Label30(e);
        if (e.target == Label29)
            bReturn = routeEvent_Label29(e);
        if (e.target == Label28)
            bReturn = routeEvent_Label28(e);
        if (e.target == Label27)
            bReturn = routeEvent_Label27(e);
        if (e.target == Label26)
            bReturn = routeEvent_Label26(e);
        if (e.target == Label25)
            bReturn = routeEvent_Label25(e);
        if (e.target == Label24)
            bReturn = routeEvent_Label24(e);
        if (e.target == Label23)
            bReturn = routeEvent_Label23(e);
        if (e.target == Label22)
            bReturn = routeEvent_Label22(e);
        if (e.target == Label21)
            bReturn = routeEvent_Label21(e);
        if (e.target == Label20)
            bReturn = routeEvent_Label20(e);
        if (e.target == Label19)
            bReturn = routeEvent_Label19(e);
        if (e.target == Label18)
            bReturn = routeEvent_Label18(e);
        if (e.target == Label17)
            bReturn = routeEvent_Label17(e);
        if (e.target == Label16)
            bReturn = routeEvent_Label16(e);
        if (e.target == Label15)
            bReturn = routeEvent_Label15(e);
        if (e.target == Label14)
            bReturn = routeEvent_Label14(e);
        if (e.target == Label13)
            bReturn = routeEvent_Label13(e);
        if (e.target == Label12)
            bReturn = routeEvent_Label12(e);
        if (e.target == Label11)
            bReturn = routeEvent_Label11(e);
        if (e.target == Label10)
            bReturn = routeEvent_Label10(e);
        if (e.target == Label3[5])
            bReturn = routeEvent_Label3(e, 5);
        if (e.target == Label3[4])
            bReturn = routeEvent_Label3(e, 4);
        if (e.target == Label3[3])
            bReturn = routeEvent_Label3(e, 3);
        if (e.target == Label3[2])
            bReturn = routeEvent_Label3(e, 2);
        if (e.target == Label3[1])
            bReturn = routeEvent_Label3(e, 1);
        if (e.target == Label3[0])
            bReturn = routeEvent_Label3(e, 0);
        if (e.target == Label2)
            bReturn = routeEvent_Label2(e);
        if (e.target == Label1)
            bReturn = routeEvent_Label1(e);
        if (e.target == lblG)
            bReturn = routeEvent_lblG(e);
        if (e.target == lblINV)
            bReturn = routeEvent_lblINV(e);
        if (e.target == lblC)
            bReturn = routeEvent_lblC(e);
        if (e.target == lblTAX)
            bReturn = routeEvent_lblTAX(e);
        if (e.target == lblYD)
            bReturn = routeEvent_lblYD(e);
        if (e.target == lblY)
            bReturn = routeEvent_lblY(e);
        if (e.target == Label9)
            bReturn = routeEvent_Label9(e);
        if (e.target == Label8)
            bReturn = routeEvent_Label8(e);
        if (e.target == Label7)
            bReturn = routeEvent_Label7(e);
        if (e.target == Label6)
            bReturn = routeEvent_Label6(e);
        if (e.target == Label5)
            bReturn = routeEvent_Label5(e);
        if (e.target == Label4)
            bReturn = routeEvent_Label4(e);
        if (e.target == this) 
            bReturn = routeEvent_ModelExe2(e);
        
        if (bReturn == true)
            return true;
        else
            return super.handleEvent(e);
    }
}
