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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:32:24+00:00 2026-06-14T19:32:24+00:00

As I wrote in title, I want to drawLine additionally when Timer generates events.

  • 0

As I wrote in title,
I want to drawLine additionally when Timer generates events.

Line will be draw like

first time;

ㅡ

second time;

ㅡ
ㅡ
  1. I want line will be added on before’s maintained situation
  2. If first purpose cannot be done, (because I’m not good at Java yet, that’s just my idea) I want to draw N line in Nth events then i redraw new N+1 line in (N+1)th events.

Which could be done in Java?

P.S. How to stop the Swing Timer?

  • 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-14T19:32:26+00:00Added an answer on June 14, 2026 at 7:32 pm

    You’ll basically have to (not in order):

    • Build an event to happen on each tick of the timer
    • Pass it to a new timer (stopping the timer is in the documentation)
    • Set some sort of incrementing counter, either coordinate-based or tick-based
    • Override the paintComponent method in a component to draw the lines, based on the incrementing counter
    • From inside the event, call repaint() on your component (will happen on each timer tick)

    Work on each one of those tasks individually, and when you feel you’ve mastered each one, you can try putting them all together.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Database is like: table book: book_id, title table wrote: book_id, author_id, author_order table author:
Didn't really know how to title this. First time writing a gem so not
Like in title? have no idea how to do it I wrote something like
I have a title for a page, I want to have a line that
I hope the title actually describes what I wanted to ask... I wrote a
Some users like to write post title all in uppercase, which is completely annoying.
I wrote this code app = Tk() app.title('Myapp') app.geometry('260x100+50+50') labelText =StringVar() labelText.set('Insert the version
I want to test for object references held improperly and wrote a test that
I just want to create plugin that will when visitor(user,visitor,...) visit some post,remember what
I wrote the code in PHP like this and I need to delete the

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.