Win a copy of Securing DevOps this week in the Security forum!

since Jun 11, 2013

South America, Guyana

Cows and Likes

Cows

Total received

0

In last 30 days

0

Total given

0

Likes

Total received

0

Received in last 30 days

0

Total given

0

Given in last 30 days

0

Forums and Threads

Scavenger Hunt

Ranch Hand Scavenger Hunt

Greenhorn Scavenger Hunt

I want to move a circle along the path in the pic, but the height of the path would be dynamic. Also along a specific point (the green dot) in the path I would like to change the circle color as it pass that point.

The number of circles that would move would be dynamic as well. When the circle moves in the rectangle it should be in rows of four.

Any ideas of what to use to do this would be helpful.

This is what I have so far but the circle do not move in the same path it moves the same path design but a different translation.

The number of circles that would move would be dynamic as well. When the circle moves in the rectangle it should be in rows of four.

Any ideas of what to use to do this would be helpful.

This is what I have so far but the circle do not move in the same path it moves the same path design but a different translation.

4 years ago

Ranganathan Kaliyur Mannar wrote:Specifically, create a small runnable program that replicates your issue and post it. This is called SSCCE.

I follow your instructions and I found the problem by just eliminating parts of my code. It was a translation was freezing everything up.

Thanks a lot Mannar.

But I am still stuck with the path transitions.

4 years ago

Ranganathan Kaliyur Mannar wrote:Remember that people here are volunteers spending their time to try & help...you should EaseUp

My apologies for giving that perception.

Ranganathan Kaliyur Mannar wrote:In the code that you have posted, we have no idea about 'rect' and 'path' variables, so, it is hard for me to tell just by looking at the code.

Path variables are really a prescribe path that you would like a object to move through with a span duration.

My aim is to move an existing circle from its current location to a new location. I did some research and found Path Transition from Javadocs and other places but when I try the sample code pathTransition.setNode(), pathTransition.setPath() and the others, they do not exist. So I am stuck and not sure what other route to take.

4 years ago

Ranganathan Kaliyur Mannar wrote:Hi Ghansham,

Welcome to the Ranch!

You have provided good amount of details, but, you also need to show us the code.

Specifically, create a small runnable program that replicates your issue and post it. This is called SSCCE.

What that does is, whoever is trying to help you can then simply paste your code, run it and then provide you ideas/hints/solutions.

Thanks for your response.

I will reduce my code that depict my issue.

But in the meantime does this code work here javafx.animation.PathTransition

These especially

For some reasons they do not work in Netbeans IDE 7.3.

Thanks for your prompt response as I am press for time. I feel a lot less frustrated someone reply.

Ghansham.

4 years ago

Hi Guys,

I am a newbie to javafx and been having lots of issues in developing an application to animate multiplication and division with negative and positive numbers.

I hope you guys would go easy on me.

This is what I aim to achieve.

There are two text box that accept negative and positive numbers. When you enter X number in the first text box, X circles would animate with a green for positive and red for negative. Next you select an operation (multiplication or division). If multiplication, the second textbox accepts the number to be multiply Y. Y circles with respective color is then added to the set of X circles earlier. Then you will click on the answer button; the circles will then move in groups of Y units to a rectangle until there are no circles left. When the circles cross the border of the rectangle it would change the circles colors into the color representation of the result of the said operation (multiplication).

The process for division is the opposite, where the circles are first drop into the the rectangle and then remove by units based on the number being divided by. Also no circles are drop when its division for the second text box.

Currently when you enter a positive number in the first textbox green circles would drop down and negative numbers would give red.

Find attached of what it would look like.

The problems I am having are,

1. After entering a number in the text box the other components seem to freeze and you can't click on it

2. In the second text box I want to add X amount of balls to the existing set from the first text box. I tried storing the coordinates in a array and update the coordinates and draw it back but only the last set gets drawn.

3. I am not able to move the balls from the existing position to move them by units into the rectangle. i tried the same array idea in number 2 but same problem.

In summary I am not able to move the balls again after its drawn, along with updating it with more balls to the panel and the other components freeze after entering a number in the textbox.

Also pathTransition.setDuration() does not exist or I don't know how that is not working. I am using Netbeans IDE 7.3

Any ideas would be great of what else to try am out of ideas of what else to try and research online.

Thank you if anyone can guide me in what steps to take to resolve the issues I am facing.

Ghansham.

I am a newbie to javafx and been having lots of issues in developing an application to animate multiplication and division with negative and positive numbers.

I hope you guys would go easy on me.

This is what I aim to achieve.

There are two text box that accept negative and positive numbers. When you enter X number in the first text box, X circles would animate with a green for positive and red for negative. Next you select an operation (multiplication or division). If multiplication, the second textbox accepts the number to be multiply Y. Y circles with respective color is then added to the set of X circles earlier. Then you will click on the answer button; the circles will then move in groups of Y units to a rectangle until there are no circles left. When the circles cross the border of the rectangle it would change the circles colors into the color representation of the result of the said operation (multiplication).

The process for division is the opposite, where the circles are first drop into the the rectangle and then remove by units based on the number being divided by. Also no circles are drop when its division for the second text box.

Currently when you enter a positive number in the first textbox green circles would drop down and negative numbers would give red.

Find attached of what it would look like.

The problems I am having are,

1. After entering a number in the text box the other components seem to freeze and you can't click on it

2. In the second text box I want to add X amount of balls to the existing set from the first text box. I tried storing the coordinates in a array and update the coordinates and draw it back but only the last set gets drawn.

3. I am not able to move the balls from the existing position to move them by units into the rectangle. i tried the same array idea in number 2 but same problem.

In summary I am not able to move the balls again after its drawn, along with updating it with more balls to the panel and the other components freeze after entering a number in the textbox.

Also pathTransition.setDuration() does not exist or I don't know how that is not working. I am using Netbeans IDE 7.3

Any ideas would be great of what else to try am out of ideas of what else to try and research online.

Thank you if anyone can guide me in what steps to take to resolve the issues I am facing.

Ghansham.

4 years ago