title: Java :Multiple markers at this line - Syntax error on token “)”, ; expected - Syntax error on token “(”, { expected
body: <p>I am unable to find the mistake. Eclipse is giving me this error. Every <code>{</code> <code>}</code> is matching. Please help. </p>
  
  <blockquote>
    <p>Multiple markers at this line - Syntax error on token “)”, ; expected
    - Syntax error on token “(”, { expected</p>
  </blockquote>
  
  <p>My code is as follows : </p>
  
  <pre><code>import javax.swing.*;
  
  import java.awt.Container;
  import java.awt.Dimension;
  import java.awt.FlowLayout;
  
  import javax.swing.JButton;
  import javax.swing.JFileChooser;
  import javax.swing.JFrame;
  import javax.swing.JTextField;
  
  import matlabcontrol.MatlabConnectionException;
  import matlabcontrol.MatlabInvocationException;
  
  import java.awt.*;
  import java.awt.event.*;
  import java.io.IOException;
  import java.lang.reflect.InvocationTargetException;
  
  class BackgroundImageJFrame1 extends JFrame {
  
  public BackgroundImageJFrame1() {
  
      JButton b1;
      JLabel l1;
      final JFileChooser fc = null;
      final JTextField textField;
      final JButton jb1 = null;
      setTitle("Parallel Session");
      setSize(400, 400);
      setLocationRelativeTo(null);
      setDefaultCloseOperation(EXIT_ON_CLOSE);
      setVisible(true);
  
      getContentPane().setLayout(new BorderLayout());
      setContentPane(new JLabel(new ImageIcon("giphy.gif")));
      getContentPane().setLayout(new FlowLayout());
  
      l1 = new JLabel("Parallel Simulation Model");
      l1.setForeground(Color.RED);
      l1.setFont(new Font("Palatino Linotype", Font.BOLD, 20));
      l1.setToolTipText("Getting Started");
      l1.setBounds(86, 54, 219, 45);
  
      b1 = new JButton("\n\n LET'S GO!");
      b1.setVerticalAlignment(SwingConstants.BOTTOM);
      b1.setFont(new Font("Microsoft Sans Serif", Font.PLAIN, 14));
      b1.setForeground(Color.BLUE);
      b1.setBackground(Color.YELLOW);
      b1.setToolTipText("To begin click here!");
      b1.setBounds(120, 210, 272, 186);
  
      JProgressBar progressBar = new JProgressBar();
      progressBar.setIndeterminate(true);
      progressBar.setToolTipText("Progress");
      progressBar.setBounds(130, 207, 146, 14);
  
      getContentPane().add(l1);
      getContentPane().add(b1);
      getContentPane().add(progressBar);
      // Just for refresh :) Not optional!
      setSize(399, 399);
      setSize(400, 400);
  
      b1.addActionListener(new ActionListener() {
  
          @Override
          public void actionPerformed(ActionEvent arg0) {
              JFrame Frame1 = new JFrame();
              final JPanel panel1 = new JPanel();
  
              JLabel j1 = new JLabel("Select your model");
              panel1.add(j1);
              JTextField jt1 = new JTextField();
              jt1.setPreferredSize(new Dimension(160, 20));
              panel1.add(jt1);
              new JButton("Browse");
              jb1.setPreferredSize(new Dimension(100, 20));
              panel1.add(jb1);
  
              JLabel label1 = new JLabel("Enter the number instances");
              Frame1.setVisible(true);
              Frame1.setSize(300, 300);
              Frame1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              panel1.add(label1);
              Frame1.getContentPane().add(panel1);
              panel1.setBackground(Color.CYAN);
  
              final JTextArea t1 = new JTextArea("Enter here");
              panel1.add(t1);
  
              JButton b11 = new JButton("SET");
              panel1.add(b11);
  
              jb1.addActionListener(new java.awt.event.ActionListener() {
                  @Override
                  public void actionPerformed(java.awt.event.ActionEvent evt) {
                      btnBrowseActionPerformed(null);
                  }
  
              });
              private void btnBrowseActionPerformed(java.awt.event.ActionEvent evt) {
                  if (fc == null) {
                      fc = new JFileChooser(".");
                  }
  
                  // Show it.
                  int returnVal = fc.showOpenDialog(null);
  
                  // Process the results.
                  if (returnVal == JFileChooser.APPROVE_OPTION) {
                      textField.setText(fc.getSelectedFile().getPath());
                  } else {
                      textField.setText("");
                  }
  
                  // Reset the file chooser for the next time it's shown.
                  fc.setSelectedFile(null);
  
              }
  
  
               //done
                  b11.addActionListener(new ActionListener() {
                  public void actionPerformed(ActionEvent arg0) {
                      String a = t1.getText();
                      System.out.println(" " + a);
                      try {
                          int itr = Integer.parseInt(a);
                          for (int i = 1; i &lt;= itr; i++) {
                              multi m = new multi();
  
                              JLabel l1 = new JLabel("MANUEVER DETAILS");
                              JTextArea p = new JTextArea(
                                      "Enter the manuever here");
                              panel1.add(l1);
                              panel1.add(p);
                          }
                      } catch (InvocationTargetException
                              | InterruptedException
                              | MatlabConnectionException
                              | MatlabInvocationException e) {
                          // TODO Auto-generated catch block
                          ((Throwable) e).printStackTrace();
                      }
  
                  }
              });
  
          }
      });
  }
  
  public static void main(String[] args) throws MatlabConnectionException,
          MatlabInvocationException, IOException {
  
      EventQueue.invokeLater(new Runnable() {
  
          @Override
          public void run() {
              try {
                  System.out.println("hey");
  
                  new BackgroundImageJFrame1();
              } catch (Exception e) {
                  e.printStackTrace();
              }
          }
  
      });
  
  }
  
  
  }
  </code></pre>