★ wanayoo — archive 1999 http://www.webtechniques.com/sourcecode/1998/10/java/java.lstNouvelle recherche | Portail wanayoo


 
| HOME | CURRENT ISSUE | ARCHIVES | SOURCE CODE | EVENTS | CUSTOMER SERVICE | ADVERTISING | AUTHOR GUIDELINES | EDITORIAL CALENDAR | SEARCH | JOBS | ABOUT

S O U R C E   C O D E / 1998 / 10 / java / java.lst

"Java@Work"
by Al Williams
Web Techniques, October 1998

Web Techniques grants permission to use these listings (and code) for
private or commercial use provided that credit to Web Techniques and 
the author is maintained within the comments of the source. For 
questions, contact editors@web-techniques.com. 


[LISTING ONE}

/** The Original Connection Code **/
/**
 * conn6:  (Button1.action.actionPerformed(java.awt.event.ActionEvent) -->
Inductance.text)
 * @param arg1 java.awt.event.ActionEvent
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private void conn6(java.awt.event.ActionEvent arg1) {
        try {
                // user code begin {1}
                // user code end
                getInductance().setText(new String());
                // user code begin {2}
                // user code end
        } catch (java.lang.Throwable ivjExc) {
                // user code begin {3}
                // user code end
                handleException(ivjExc);
        }
}




[LISTING TWO]

/** The Modified Connection Code **/
/**
 * conn6:  (Button1.action.actionPerformed(java.awt.event.ActionEvent) -->
Inductance.text)
 * @param arg1 java.awt.event.ActionEvent
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private void conn6(java.awt.event.ActionEvent arg1) {
        try {
                // user code begin {1}
                float vf;
                vf=1.0F/(2*3.1415F/(getF().floatValue()*10e6F));
                vf=vf*vf;
                vf=vf/(getC().floatValue()/10e6F);
                Float v=new Float(vf*10e6F);
                // user code end
                getInductance().setText(v.toString());
                // user code begin {2}
                // user code end
        } catch (java.lang.Throwable ivjExc) {
                // user code begin {3}
                // user code end
                handleException(ivjExc);
        }
}


| HOME | CURRENT ISSUE | ARCHIVES | SOURCE CODE | EVENTS | CUSTOMER SERVICE | ADVERTISING | AUTHOR GUIDELINES | EDITORIAL CALENDAR | SEARCH | JOBS | ABOUT





Entire contents copyright 1996-2000 CMP Media Inc.
Read our privacy policy.