title: Java: Please insert "}" to complete classbody
body: <p>I wrote a little test program but I'm experiencing a syntax error in my closing tags...</p>
  
  <p>Here's the code</p>
  
  <pre><code>public class Test 
  {
      AudioFile file = null;
      String vbb = "";
      File f;
  
      public Test()
      {
          openFile();
      }   
  
      public File openFile()
      {
          JFileChooser fc = new JFileChooser();
          fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
          int result = fc.showOpenDialog(fc);
          if(result == JFileChooser.CANCEL_OPTION)
          {
              return null;
          } else {
              f = fc.getCurrentDirectory();
              return f;
          }
      }
  
      f = new File(openFile());
      File[] files = f.listFiles();
  
      for(File fi : files)
      {
          try {
              file = (AudioFile) AudioFileIO.read(new File(fi.getAbsolutePath()));
              MP3AudioHeader ah = (MP3AudioHeader) file.getAudioHeader();
              String time = ah.getTrackLengthAsString();
              String rate = ah.getBitRate();
              boolean vb = ah.isVariableBitRate();
              if(vb == false)
              {
                  vbb = "Nee";
              } else {
                  vbb = "Ja";
              }
              Tag tag = file.getTag();
              String artist = tag.getFirst(FieldKey.ARTIST);
              String title = tag.getFirst(FieldKey.TITLE);
              String album = tag.getFirst(FieldKey.ALBUM);
              String genre = tag.getFirst(FieldKey.GENRE);
              String temo = tag.getFirst(FieldKey.BPM);
              String path = fi.getAbsolutePath();
  
              System.out.println("Duur: " + time + "\nVariabele bitrate: " + vbb + "\nArtiest: " + artist +"\nTitel: " + title
                      + "\nAlbum: " + album + "\nGenre: " + genre + "\nBPM: " + temo + "\nBitrate: " + rate + " kbps\nPad: " + path);
  
          } catch (Exception e)
          {
              System.err.print("FOUT");
          }
      }
  }
  </code></pre>
  
  <p>The compiler gives an error at the LATEST closing accolade:
  "Please insert } to complete classbody"
  And also at the last accolade of the "openFile()" method...</p>
  
  <p>Any suggestions?</p>