Bugfixing

This commit is contained in:
simono41 2016-11-21 01:35:01 +01:00
parent b0e97c247e
commit 70ece9ee3d
3 changed files with 39 additions and 36 deletions

View file

@ -1,7 +1,13 @@
Vokabeln: Vokabeln:
Vokabel training
Vokabel Ausbildung
Vokabel qualification
Vokabel1 Abschluss
Vokabel apprenticeship
Vokabelawdawdawd Lehre
apprentice
Auszubildener
decision
Entscheidung
chef
Koch

View file

@ -186,7 +186,7 @@
</Component> </Component>
<Component class="javax.swing.JLabel" name="jLabel7"> <Component class="javax.swing.JLabel" name="jLabel7">
<Properties> <Properties>
<Property name="text" type="java.lang.String" value="Eingabe = "/> <Property name="text" type="java.lang.String" value="Loesung = "/>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="jLabel8"> <Component class="javax.swing.JLabel" name="jLabel8">

View file

@ -27,23 +27,6 @@ public class GUI extends javax.swing.JFrame {
public static String vokabel2; public static String vokabel2;
public static int richtig; public static int richtig;
public static int falsch; public static int falsch;
private JTextField jTextField1;
private JTextField jTextField2;
private JLabel jLabel1;
private JLabel jLabel2;
private JButton jButton1;
private JButton jButton2;
private JLabel jLabel3;
private JLabel jLabel4;
private JLabel jLabel5;
private JLabel jLabel6;
private JLabel jLabel7;
private JLabel jLabel8;
private JButton jButton3;
private JButton jButton4;
private JLabel jLabel9;
private JLabel jLabel10;
private JButton jButton5;
/** /**
* Creates new form GUI * Creates new form GUI
@ -116,7 +99,7 @@ public class GUI extends javax.swing.JFrame {
jLabel6.setText("0"); jLabel6.setText("0");
jLabel7.setText("Eingabe = "); jLabel7.setText("Loesung = ");
jLabel8.setText("n"); jLabel8.setText("n");
@ -268,6 +251,7 @@ public class GUI extends javax.swing.JFrame {
private void vokabeln() { private void vokabeln() {
new Vokabeln().setVisible(true); new Vokabeln().setVisible(true);
} }
private void vokabel() { private void vokabel() {
this.aktualisieren(); this.aktualisieren();
vokabeln0.add(this.jTextField1.getText()); vokabeln0.add(this.jTextField1.getText());
@ -277,8 +261,7 @@ public class GUI extends javax.swing.JFrame {
write a = new write(); write a = new write();
try { try {
a.write(); a.write();
} } catch (IOException ex) {
catch (IOException ex) {
Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, ex); Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, ex);
} }
} }
@ -287,12 +270,11 @@ public class GUI extends javax.swing.JFrame {
if (this.jTextField2.getText().equals(vokabel1)) { if (this.jTextField2.getText().equals(vokabel1)) {
System.out.println("Richtig"); System.out.println("Richtig");
++richtig; ++richtig;
this.jLabel8.setText("Richtig");
} else { } else {
System.out.println("Falsch"); System.out.println("Falsch");
++falsch; ++falsch;
this.jLabel8.setText("Falsch");
} }
this.jLabel8.setText(vokabel1);
this.zufall(); this.zufall();
this.jTextField2.setText(""); this.jTextField2.setText("");
} }
@ -331,17 +313,32 @@ public class GUI extends javax.swing.JFrame {
read a = new read(); read a = new read();
try { try {
a.read(); a.read();
} } catch (FileNotFoundException ex) {
catch (FileNotFoundException ex) {
System.out.println("Datei wird neu Angelegt!"); System.out.println("Datei wird neu Angelegt!");
} } catch (IOException ex) {
catch (IOException ex) {
Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, ex); Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, ex);
} }
this.jLabel5.setText(Integer.toString(richtig)); this.jLabel5.setText(Integer.toString(richtig));
this.jLabel6.setText(Integer.toString(falsch)); this.jLabel6.setText(Integer.toString(falsch));
} }
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JButton jButton4;
private javax.swing.JButton jButton5;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables
} }