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...

Recommended Answers

All 2 Replies

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


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.