You are not logged in.
![]() |
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
import java.awt.*; import java.applet.Applet; import java.awt.event.*; public class SpannungUI extends Applet implements ActionListener { private spannung S1 = new SpannungCalc(); private Button ButtonRechne = new Button ("Rechne"); private TextField TextFieldStrom = new TextField (15); private TextField TextFieldLeistung = new TextField (15); private Label LabelSpannung = new Label ("Spannung"); private Label LabelStrom = new Label ("Strom"); private Label LabelLeistung = new Label ("Leistung"); public void init() { this.add (LabelSpannung); this.add (LabelStrom); this.add (TextFieldStrom); this.add (LabelLeistung); this.add (TextFieldLeistung); this.add (ButtonRechne); ButtonRechne.addActionListener(this); } public void actionPerformed( ActionEvent e) { } } |
![]() |
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
public class Spannung { private float fSpannung; public void Calc(float fLeistung, float fStrom) { fSpannung = fLeistung / fStrom; } public int getSpannung( ) { return fSpannung; } |
crushcoder
God
Gott hat die Welt ja nur in sieben Tagen erschaffen können, weil es keine installierte Basis gab.
This post has been edited 1 times, last edit by "Y0Gi" (Jan 22nd 2013, 4:07am)
crushcoder
God
Quoted from "Y0Gi"
Kleinschreibung am Anfang, aber mixedCase ist OK. Wird sonst etwas unleserlich und underscore_separated ist bei Java meines Wissens sehr wenig verbreitet.
Gott hat die Welt ja nur in sieben Tagen erschaffen können, weil es keine installierte Basis gab.
-