Bugfixing

This commit is contained in:
simono41 2016-11-21 01:24:10 +01:00
parent 3c7457f9e1
commit b0e97c247e
4 changed files with 15 additions and 16 deletions

View file

@ -1,3 +1,7 @@
Vokabeln: Vokabeln:
Vokabel Vokabel
Vokabel Vokabel
Vokabel
Vokabel1
Vokabel
Vokabelawdawdawd

View file

@ -24,5 +24,7 @@ public class main {
java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} }
new GUI().setVisible(true); new GUI().setVisible(true);
GUI a = new GUI();
a.aktualisieren();
} }
} }

View file

@ -266,16 +266,6 @@ public class GUI extends javax.swing.JFrame {
}//GEN-LAST:event_jButton5ActionPerformed }//GEN-LAST:event_jButton5ActionPerformed
private void vokabeln() { private void vokabeln() {
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
new Vokabeln().setVisible(true); new Vokabeln().setVisible(true);
} }
private void vokabel() { private void vokabel() {
@ -336,7 +326,7 @@ public class GUI extends javax.swing.JFrame {
this.jLabel10.setText("" + zufallszahl + "." + gerade); this.jLabel10.setText("" + zufallszahl + "." + gerade);
} }
private void aktualisieren() { public void aktualisieren() {
vokabeln0.clear(); vokabeln0.clear();
read a = new read(); read a = new read();
try { try {

View file

@ -69,13 +69,16 @@ public class Vokabeln extends javax.swing.JFrame {
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
// TODO add your handling code here: // TODO add your handling code here:
DefaultListModel<String> dim = new DefaultListModel<>(); this.aktualisieren();
for (int i = 0; i < GUI.vokabeln0.size(); ++i) {
dim.addElement(GUI.vokabeln0.get(i) + " = " + GUI.vokabeln0.get(i++));
}
this.jList1.setModel(dim);
}//GEN-LAST:event_jButton1ActionPerformed }//GEN-LAST:event_jButton1ActionPerformed
public void aktualisieren() {
DefaultListModel<String> dim = new DefaultListModel<>();
for (int i = 0; i < GUI.vokabeln0.size();) {
dim.addElement(GUI.vokabeln0.get(i++) + " = " + GUI.vokabeln0.get(i++));
}
this.jList1.setModel(dim);
}
// 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 jButton1;
private javax.swing.JList<String> jList1; private javax.swing.JList<String> jList1;