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

  • Home
  • SEARCH
  • 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 7986685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:55:33+00:00 2026-06-04T11:55:33+00:00

I initially start with a circle and when the start button is pressed the

  • 0

I initially start with a circle and when the start button is pressed the circle must shrink to a point and if the stop button is pressed during that process, it should stop the shrink process. If the start button is then pressed it must continue shrinking..

Once it has shrunk to a point, it must grow back to a circle and the buttons must respond similarly when clicked.

I am not sure on how to implement the Grow() and Shrink() using action performed in JAVA.

  • 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-04T11:55:34+00:00Added an answer on June 4, 2026 at 11:55 am

    If you are using Swing in you can draw your circles as if they were a box. This means you can just change the size and draw them with an offset to the centre stays in the same place:

    public Circle {
    
        private int x;
        private int y;
        private int size;
    
        public void paint(Graphics g) {
            g.drawOval(x + size/2, y + size/2, size, size);
        }
    
        public void grow(){
            size++;
        }
    
        public void shrink(){
            size--;
            size = Math.max(size,1);
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some views that start off the screen and then slide in and
I have a process that's going to initially generate 3-4 million PDF files, and
I have a table with unique constraint that marked as DEFERRABLE INITIALLY DEFERRED; Then
When I start my application initially, I get a black screen which stays for
Initially I had a method in our DL that would take in the object
I'm going to start a new project which is going to be small initially
I have a table with start and finish datetimes that I need to determine
I used objdump -d a.out to get the following. I initially assumed that the
I have 8 JLabels that i initially want to be invisible . The jlabels
I have a jQuery plugin that uses a needle gauge. Upon initially loading a

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.