1,105,585 Community Members

How to create moving points from right to left

Member Avatar
life4menu
Newbie Poster
1 post since Mar 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

I have a text file that has two columns one with time in milliseconds and the other with (x,y) coordinates.

I created a JFrame in a class that extends JPanel. It shows a model of constructed ladder that we use in our experiments.

Now I want to print some small ovals (4 at a time) at given x,y coordinates at given point of time. There should be only 4 ovals at a time on the screen from the beginning.

The text file looks like below for eg;

DateTime unitLabel
19:01:22.074 (x,y)
19:01:22.093 (x,y)
19:01:22.189 (x,y)
19:01:22.232 (x,y)
19:01:22.310 (x,y)
19:01:22.317 (x,y)
19:01:22.429 (x,y)
19:01:22.497 (x,y)
19:01:22.504 (x,y)
19:01:22.531 (x,y)

So, I have to read the text file with my program, take the time point and x,y coordinates. The time points in milliseconds is the duration for how long the oval should appear in the JFrame.

Please help me...

Member Avatar
NormR1
Posting Sage
7,723 posts since Jun 2010
Reputation Points: 563 [?]
Q&As Helped to Solve: 793 [?]
Skill Endorsements: 16 [?]
Team Colleague
 
0
 
Member Avatar
dennysimon
Junior Poster
114 posts since Mar 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

create a point object at the left location
using certain interval ,change the x position a litle to the right
just idea,

denny

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article