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 8323973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:53:26+00:00 2026-06-08T23:53:26+00:00

Any ideas ? line 66 is a curly bracket u will see it down

  • 0

Any ideas ? line 66 is a curly bracket u will see it down below i show it with // below.
In eclipse it keeps coming up with an error and idk how to get rid of it. any ideas? Thanks!
It is write after the action listener, did i forget to close it?

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class operation extends JFrame{
    private JTextField monday;
    private JTextField tuesday;
    private JTextField wednesday;
    private JTextField thursday;
    private JTextField friday;
    private JTextField saturday;
    private JTextField sunday;
    private JButton finalize;

    public operation(){
        super("Weekly Total Calculator");
        setLayout(new FlowLayout());

        monday = new JTextField("How much you spent Monday", 20);
        monday.setFont(new Font("Ariel", Font.PLAIN, 14));
        add(monday);

        tuesday = new JTextField("How much you spent Tuesday", 20);
        tuesday.setFont(new Font("Ariel", Font.PLAIN, 14));
        add(tuesday);

        wednesday = new JTextField("How much you spent Wednesday", 20);
        wednesday.setFont(new Font("Ariel", Font.PLAIN, 14));
        add(wednesday);

        thursday = new JTextField("How much you spent Thursday", 20);
        thursday.setFont(new Font("Ariel", Font.PLAIN, 14));
        add(thursday);

        friday = new JTextField("How much you spent Friday", 20);
        friday.setFont(new Font("Ariel", Font.PLAIN, 14));
        add(friday);

        saturday = new JTextField("How much you spent Saturday", 20);
        saturday.setFont(new Font("Ariel", Font.PLAIN, 14));
        add(saturday);

        sunday = new JTextField("How much you spent Sunday", 20);
        sunday.setFont(new Font("Ariel", Font.PLAIN, 14));
        add(sunday);

        finalize = new JButton("Calculate!");
        add(finalize);

        finalize.addActionListener(new ActionListener(){
               public void actionPerformed(ActionEvent ae){

                    double mon = Double.parseDouble(monday.getText());
                    double tues = Double.parseDouble(tuesday.getText());
                    double wed = Double.parseDouble(wednesday.getText());
                    double thurs = Double.parseDouble(thursday.getText());
                    double fri = Double.parseDouble(friday.getText());
                    double sat = Double.parseDouble(saturday.getText());
                    double sun = Double.parseDouble(sunday.getText());

                    private double sum = mon + tues + wed + thurs + fri + sat + sun;

                    JOptionPane.showMessageDialog(null, "Your total is " + sum + "!", "Total", JOptionPane.PLAIN_MESSAGE);

               }
        }
        //THIS IS THE ERROR^

    }



}

Please help! any ideas will work. I really have no idea what the deal is 🙁

  • 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-06-08T23:53:27+00:00Added an answer on June 8, 2026 at 11:53 pm

    You’re creating an anonymous object inside a method call – make sure you close the method call at the end:

    finalize.addActionListener(new ActionListener(){
           public void actionPerformed(ActionEvent ae){
               // all your stuff
           }
    }); // you were missing the ");"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Any ideas why I am getting the below error in my MVC2 project, even
Anyone have any ideas why the following code would produce an error, see additional
This line gives me a syntax error: if @array.include?('cat') && not @array.include?('dog') Any ideas?
I THINK this line is causing a 3.5K Byte memory leak, any ideas why?
Any ideas given the code below why the highlight is being triggered to run
I've encountered the following error while trying to create a blogging application. Any ideas
bit of a curly one here let me know if you have any ideas..
Any ideas how I can fix this? Line 58, Column 72: Bad value fancybox2
Any ideas how I can install RTidyHTML when I get the following error message?
Any ideas why I'm getting .... Fatal error: Allowed memory size of 33554432 bytes

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.