finishAction() method.

Component Java
Build Wizards Quickly Using a Swing-Based Wizard Framework
Chang Sau Sheong
Listing 10. finishAction() method.


. . .

    public void finishAction() {
        super.finishAction(); // 1

        WizardData data = getData(); // 2
        Enumeration enum = data.keys();
        CodeGenerator gen = new CodeGenerator(); // 3

        String classname = (String)data.get("classname"); // 4
        gen.addValue("package",(String)data.get("packagename"));
        gen.addValue("classname", classname);
        gen.addValue("primarykey",(String)data.get("primarykey"));

        Vector variables = (Vector)data.get("variables");
        gen.addVariables(variables);

        gen.generate(classname,CodeGenerator.SPAFOBJECT); // 5

    }
. . .

About the Author

Chang Sau Sheong is vice president of product engineering at elipva Ltd. (formerly known as sstarfire.com). He can be contacted at sschang@elipva.com.

Featured

Most   Popular
Upcoming Events

AppTrends

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.