how to make a graph ?
1st :-i wanto make a graph according to a values which we are gatting on runtime.
sow how can i do that. can any one help me.
2nd :- can we do like this
if we have a xml file which contain Q & A.
suppose we r getting info from that file & display on Frame . now we can display only one q at a time . now i wan to do that when user click on nect button the frame will refress & Display Next quaction on the same Frame. did not need to create New Frame for New Q. ?
Can we do that ?
1. This depends a lot on what kind of graph you are making. A pie chart and
a bar diagram is quite easy to do just by painting. A scatter diagram is more
complex, since in java coordinates start from upper left corner and in scatter
diagram they start from bottom left corner, hence you have to reverse the y
values. I've done this type of thing once, it's actually quite easy once you get
the hang of it. There are also some ready made libraries for this, just google
around for them.
2. No, you don't have to create a new frame. Just update the question text.
kari-matti
How can i pudate a question text. Pl give me a Sample pl
> 1. This depends a lot on what kind of graph you are
> making. A pie chart and
> a bar diagram is quite easy to do just by painting. A
> scatter diagram is more
> complex, since in java coordinates start from upper
> left corner and in scatter
> diagram they start from bottom left corner, hence you
> have to reverse the y
> values. I've done this type of thing once, it's
> actually quite easy once you get
> the hang of it. There are also some ready made
> libraries for this, just google
> around for them.
>
> 2. No, you don't have to create a new frame. Just
> update the question text.
>
> kari-matti
In the frame you will be using some component such as a JLabel (in the simplest case) to display the question right
all you have to do is set the text of the label to the neq question using setText method.
If you are using some other more complicated component you will have to find a way to chage its content.
LRMKa at 2007-7-14 1:22:48 >
