Win a copy of Head First Go this week in the Go forum!

Jan Rad

Greenhorn
+ Follow
since Jan 01, 2019
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
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jan Rad

I have to provide a simulation of the train passing through stations and tracks o 100 and 1000 m respectively through threads figure is like shown below

|----Glasgow-12---||-----track-----||----Sterling----||-----track-----||----Perth----||-----track-----||---Iverness----|
|----Glasgow----||-12----track-----||----Sterling----||-----track-----||----Perth----||-----track-----||---Iverness----|
|----Glasgow----||-----track-----||--12--Sterling----||-----track-----||----Perth----||-----track-----||---Iverness----|
|----Glasgow----||-----track-----||----Sterling----||--12---track-----||----Perth----||-----track-----||---Iverness----|
|----Glasgow----||-----track-----||----Sterling----||-----track-----||--12--Perth----||-----track-----||---Iverness----|
|----Glasgow----||-----track-----||----Sterling----||-----track-----||----Perth----||----12-track-----||---Iverness----|
|----Glasgow----||-----track-----||----Sterling----||-----track-----||----Perth----||-----track-----||-12--Iverness----|

Now I am able to create a thread which can run this template but i am confused as to how to make a train move through this thread.....any help would be greatly appreciated.....
Provided below are the trains, station and tracks class:
1. Train


2.Track


3.Station




4.Route


5.Display



6.Main

Attached code for reference:

2 months ago
Thanks, that is working...but when i did my affine transform and set to values mentioned it is coming as shown below.Kindly help.
2 months ago
No, what i wanted as the output is a white rectangle inside the frame where we have the x axis and y axis ..something like the figure below:please check the attachment)

2 months ago
I have used the affine Transfer,but the issue is the graph has been shifted far away from the screen...is there a resolution for that...I have attached the code:




here, suppose I draw a white rectangle at (20,20,464,341), the axis does not sync with the same.Please help.
2 months ago
I have a graph with various points marked. These data are marked based on the various values i have in a CSV file.Now, when I click the mouse on one of the data points, the entire data with respect to the same is to be displayed;How to do that???

Provided below is the snippet for reference.The override in this code should come in The display which is another class.

2 months ago
Hi,

I tried creating a point under no axis consideration on a 100x 100 plot..just wanted to know is this what was intended as result?

The result what I am getting is a small ellipse based on the dimensions given...

Can you give me one sample example to try so that I can understand how it works?
No,I havent tried as I am unaware where the axes are actually.If I am able to create the axes in the initial stage , perhaps I can try on to the arithmetic,Could you advice on How to start as I think I have missed a point somewhere
The lines 31 and 32 are the shifting of the points with respect to the axis (both x and Y).I am unable to bring in a idea on how to shift and plot the same.If there is any idea in which I could bring in the plot with the same.
Hi

I have a CSV file as given below.I need to do scatter plot for the same without using JCharts or charting libraries.

CSV FILE is like shown below

YIELD         DAYS_TO_MATURITY      AMOUNT_CHF(000)
7.223                  1002                             250

I have provided a sample code what I have done,but apparently the plot is not getting displayed on the screen

Ideally, when I click the open button from the Frame class, after the file is been opened the graph should be displayed. There is a point class which has the attributes as the columns in the CSV file.So, as soon as I get the file name , the file is read and the values are stored in an arraylist of class Point type.And based on the values in the ArrayList, the data is to be plotted.


I have a CSV File containing bond trades which has 3 columns namely Yield, amount of maturity and days to maturity.I want a scatterplot to be generated using Graphics 2D, paint component.I took the entities in a class and created an object of the same and stored the contents in an arraylist.But when i am trying to plot the same, it doesnt work,throws a null point exception error .
I have a CSV file containing 3 entities,how do i create a scatterplot without JCharts??