Meghna ks

Ranch Hand
+ Follow
since Mar 15, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Meghna ks

Hi
You might want to try this link. It offers an evaluation version of all their charts which you can download from this link & build ur requirements on them. Good luck !
http://www.klgroup.com/software/jclass/
Meghna
23 years ago
Hi
I have a Vector X, which inturn has 2 Vector Y & Z. for eg;
X -> Y, Z
where Y = 1, 2, 3, 4
Z = 5, 6, 7, 8
Hence, X is a Vector of Size -> 2, Y & Z -> 4
Now, I need to change the size of the Vector X to 4. i.e
Y = 1, 5
Z = 2, 6
A = 3, 7
B = 4, 8
Hence, X would now be -> (Y, Z, A, B)
Thanks
Meghna

23 years ago
Yeah Paul
I just figured it out and found the solution. I did the following which is similar to what you've suggested :
for(int i = 0; i != xValues.size(); i++)
{
Double vectorValues = (Double)xValues.elementAt(i);
xArray[i] = vectorValues.doubleValue();
}
Thanks a lot for the suggestion.I appreciate all of your help.
Thanks
Meghna

23 years ago
Hi Gregg
Thanks for the prompt response, but my requirement demands I use
Vectors. So, I'm sticking with it. But if you happen to come across any help, please do let me know.
Thanks
Meghna
23 years ago
Hi
No offense, I did do my Homework on this, but since I could'nt figure out I was expecting some help. I did realise that I had committed a syntax problem in the soln. u've suggested, but the problem here is that my array is of the type primitive double. If I return a an object of type Double, I would'nt be able to store it back in the array.
I needed some help wrt the following statement :
xArray = (Double[])xValues.elementAt(i);
Here since the array declaration is double[], there would definitely be a casting problem. This is what I needed to analyse.
FYI : You don't have to be upset with my qn. I guess I do have my choice to put my question on JavaRanch and I have great respect for this site. I think I would'nt have posted this question without doing my Homework.So, please try to be a little more modest in your replies. It would definitely be a little encouraging. I'm sorry if I've misread your reply otherwise.
Thanks
Meghna
23 years ago
This is how I'm doing :
Vector xValues = new Vector();
double[] xArray = new double[10];
xValues.addElement(new Double(0));
xValues.addElement(new Double(1));
xValues.addElement(new Double(2));
xValues.addElement(new Double(3));
for(int i = 0; i != xValues.size(); i++)
{
xArray = (double[])xValues.elementAt(i);
}
But I'm getting a ClassCastException inside the for loop. All I need to do is store the elements of type double in the Vector since I don't know the size initially and copy it to an array of type double and pass it to one of my functions as an array. Any suggestions ? Please advise
Thanks
Meghna
23 years ago
Hi
I have an array like this :
double[]{2, 4, 6, 8}
How do I convert this array to a Vector & retrieve the elements back from the Vector into an array back again ?
Thanks
Meghna
23 years ago
Thanks a lot Manfred
I really appreciate your help. I'll try out the logic with my data Model and see if I can come up with good results. Once again, I appreciate your help a lot.
Thanks
Meghna
23 years ago
Hi Deeksha
I've been using the JClass Chart and I load the data to the Chart by using a TableModel by extending the AbstractTableModel class. But the problem I'm facing is that only the values for the Y axis are generated according to the requirement whereas the X axis values are generated randomly by the Chart. I happened to search for chart help on javaranch & I saw your suggestion about using JClass chart to one, Victoria.If you have experimented with this before or you have any suggestions to make wrt this, please do let me know.This is an important requirement and I'd greatly appreciate any help.
My ChartModel class is of the format :
ChartModel(columnTitles, rowData)
Thanks
Meghna
23 years ago
Hi
I've been using the JClass Chart and I load the data to the Chart by using a TableModel by extending the AbstractTableModel class. But the problem I'm facing is that only the values for the Y axis are generated according to the requirement whereas the X axis values are generated randomly by the Chart. If anyone has experimented with this before, please do let me know.This is an important requirement and I'd greatly appreciate any help.
Thanks
Meghna
23 years ago
Hi all
I guess this is the nth time, I would be posting this problem.
Okay, now the requirements for my chart is as follows :
1. It should be able to support multiple graphs.
2. Must support multiple Y-Axis Labels. If suppose, I need a particular coordinate value to be highlighted in the graph, a label displaying the same must be added to the graph.
3. Zoom in a particular selected area.
4. Display current X & Values as the user moves through the graph.
5. Ability to set the color for the grids
6. Display of units in defined steps(0, 5, 10 , etc)
I'm posting the API URL for the chart I'm using in my application. If anyone has done any similar application with similar requirements, I would kindly appreciate their help.
I did check out www.sitraka.com's evaluation version, they do have some good solutions, but again, I had problems merging all these requirments in one application. http://207.99.123.249/java_api/Symantec/sym3.0/symantec/com.symantec.itools.swing.JChart.html
Thanks
Meghna
23 years ago
Hi
Thanks Gregg & Luong
I did find a way out to make the TextField accept only integers. But, the problem is with the decimal numbers. I'm not able to alter my code for the same in overriding the insertString method for the decimal numbers. i did try the code sample Gregg had suggested, but the textfield still accepts Strings & other characters.
I'd really appreciate any help that can follow.
Thanks
Meghna
23 years ago
Hi Gregg
Thanks for the response. I tried your piece of code, but the textfield accepts strings also.
I tried this link too and the examples it offers. But the problem is that the textfield accepts strings also. It must be able to accept only numbers comprising a float value. How do I improvise the code in this link to overcome that problem ?!!
http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html#validation
Thanks
Meghna
23 years ago
Hi
How do I make a textfield to accept only decimal numbers ?!! Any sample/ standard code would help.
Thanks
Meghna
23 years ago
Yes, you could try this :
symantec.itools.awt.util.Calendar. You can get some help with the API & examples at this link :
http://207.99.123.249/java_api/Symantec/sym3.0/symantec/symantec.itools.awt.util.Calendar.html
Meghna
23 years ago