Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6143261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:30:08+00:00 2026-05-23T18:30:08+00:00

I don’t know where to pinpoint the source of the errors in this code,

  • 0

I don’t know where to pinpoint the source of the errors in this code, hopefully someone can help. Errors are pasted after the source. It really was perfectly fine until maybe 2 seconds ago when I made a change that made eclipse want to terminate the currently running application.

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.Vector;

import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import javax.swing.JTree;


public class AnimationManager {


    private JFrame appFrame;
    private JPanel mainPanel;
    private JMenuBar menuBar;
    private JPanel filePanel;
    private JPanel indexPanel;
    private JPanel propsPanel;
    private JPanel dataPanel;

    private JTree index;

    public AnimationManager() {
        appFrame = new JFrame("Animation Manager v0.1 by Firstmate");
        appFrame.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent event) {
                //save file

        });
        appFrame.setContentPane(createContentPane());
        createMenuBar();
        appFrame.setSize(1024, 768);
        appFrame.setVisible(true);
    }
    private void createMenuBar() {
        menuBar = new JMenuBar();
    }
    private JPanel createContentPane() {
        mainPanel = new JPanel(new BorderLayout());
        mainPanel.setBorder(null);
        createFilePanel();
        createDataPanel();
        JSplitPane mainSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, filePanel, dataPanel);
        mainPanel.add(mainSplit, BorderLayout.CENTER);
        return mainPanel;
    }
    private void createFilePanel() {
        filePanel = new JPanel(new BorderLayout());
        filePanel.setPreferredSize(new Dimension(150, 700));
        indexPanel = new JPanel();
        indexPanel.setPreferredSize(new Dimension(150,350));
        Vector vector = new Vector();
        vector.add("One");
        vector.add("Two");
        index = new JTree(vector);
        index.setSize(300, 350);
        indexPanel.add(index);

        propsPanel = new JPanel();
        propsPanel.setPreferredSize(new Dimension(150, 350));
        JSplitPane fileSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true, indexPanel, propsPanel);
        filePanel.add(fileSplit, BorderLayout.CENTER);
    }
    private void createDataPanel() {
        dataPanel = new JPanel();
        dataPanel.setSize(724, 700);
    }
    public JFrame getAppFrame() {
        return appFrame;
    }
    public static void main(String[] args) {
        try {
              //UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
        } catch (Exception e) {
              e.printStackTrace();
        }
        AnimationManager am = new AnimationManager();
    }

}

Description Resource    Path    Location    Type
Syntax error on token "(", ; expected   AnimationManager.java   /AnimationManager/src   line 75 Java Problem
Syntax error on token "(", ; expected   AnimationManager.java   /AnimationManager/src   line 75 Java Problem
Syntax error on token ")", ; expected   AnimationManager.java   /AnimationManager/src   line 75 Java Problem
Syntax error on token ")", ; expected   AnimationManager.java   /AnimationManager/src   line 75 Java Problem
Syntax error on token "{", invalid Type AnimationManager.java   /AnimationManager/src   line 42 Java Problem
Syntax error on token "{", invalid Type AnimationManager.java   /AnimationManager/src   line 42 Java Problem
Syntax error on token "{", invalid Type AnimationManager.java   /AnimationManager/src   line 51 Java Problem
Syntax error on token "{", invalid Type AnimationManager.java   /AnimationManager/src   line 51 Java Problem
Syntax error on token "}", delete this token    AnimationManager.java   /AnimationManager/src   line 38 Java Problem
Syntax error on token "}", delete this token    AnimationManager.java   /AnimationManager/src   line 38 Java Problem
Syntax error on token "}", delete this token    AnimationManager.java   /AnimationManager/src   line 50 Java Problem
Syntax error on token "}", delete this token    AnimationManager.java   /AnimationManager/src   line 50 Java Problem
Syntax error on token "}", delete this token    AnimationManager.java   /AnimationManager/src   line 67 Java Problem
Syntax error on token "}", delete this token    AnimationManager.java   /AnimationManager/src   line 67 Java Problem
Syntax error on token "}", delete this token    AnimationManager.java   /AnimationManager/src   line 84 Java Problem
Syntax error on token "JFrame", @ expected  AnimationManager.java   /AnimationManager/src   line 72 Java Problem
Syntax error on token "JFrame", @ expected  AnimationManager.java   /AnimationManager/src   line 72 Java Problem
Syntax error on token "JPanel", @ expected  AnimationManager.java   /AnimationManager/src   line 42 Java Problem
Syntax error on token "JPanel", @ expected  AnimationManager.java   /AnimationManager/src   line 42 Java Problem
Syntax error on token "void", @ expected    AnimationManager.java   /AnimationManager/src   line 39 Java Problem
Syntax error on token "void", @ expected    AnimationManager.java   /AnimationManager/src   line 39 Java Problem
Syntax error on token "void", @ expected    AnimationManager.java   /AnimationManager/src   line 51 Java Problem
Syntax error on token "void", @ expected    AnimationManager.java   /AnimationManager/src   line 51 Java Problem
Syntax error on token "void", @ expected    AnimationManager.java   /AnimationManager/src   line 68 Java Problem
Syntax error on token "void", @ expected    AnimationManager.java   /AnimationManager/src   line 68 Java Problem
Syntax error on token(s), misplaced construct(s)    AnimationManager.java   /AnimationManager/src   line 39 Java Problem
Syntax error on token(s), misplaced construct(s)    AnimationManager.java   /AnimationManager/src   line 39 Java Problem
Syntax error on token(s), misplaced construct(s)    AnimationManager.java   /AnimationManager/src   line 68 Java Problem
Syntax error on token(s), misplaced construct(s)    AnimationManager.java   /AnimationManager/src   line 68 Java Problem
Syntax error, insert "}" to complete ClassBody  AnimationManager.java   /AnimationManager/src   line 25 Java Problem
Syntax error, insert "}" to complete ClassBody  AnimationManager.java   /AnimationManager/src   line 33 Java Problem
Syntax error, insert "}" to complete ClassBody  AnimationManager.java   /AnimationManager/src   line 33 Java Problem
Syntax error, insert "enum Identifier" to complete EnumHeaderName   AnimationManager.java   /AnimationManager/src   line 72 Java Problem
Syntax error, insert "enum Identifier" to complete EnumHeaderName   AnimationManager.java   /AnimationManager/src   line 72 Java Problem
Syntax error, insert "EnumBody" to complete BlockStatement  AnimationManager.java   /AnimationManager/src   line 72 Java Problem
Syntax error, insert "EnumBody" to complete BlockStatement  AnimationManager.java   /AnimationManager/src   line 72 Java Problem
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:30:09+00:00Added an answer on May 23, 2026 at 6:30 pm

    You’re missing a bracket.

    appFrame.addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent event) {
                    //save file
                **}** //Bracket here
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Don't know why but I can't find a solution to this. I have 3
I don't know if this question is trivial or not. But after a couple
Don't let below code scare you away . The question is really simple, only
Don't really know how to formulate the title, but it should be pretty obvious
(Don't know if this is strictly on-topic, but I don't see any better Stack
Don't know if this has been asked before, so point me to another question
I don't know how better to describe this. So take this example. var a
I don't understand why this code doesn't work: function Messages(type,text) { console.log(In function Message);
Don't know if this is the right place to ask this, but I will
Don't know why, but sometimes LocationManager is still working also after closing application. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.