| Author |
Help with graphing program
|
Bill Cappoli
Greenhorn
Joined: Oct 27, 2007
Posts: 3
|
|
I have a program that requests a series of numbers from the user. Once everything is inputted the frequency of each number within a range is supposed to be graphed in a JFrame. The graph basically would show on the y-axis the ranges, ie 10-19, 0-9, and the x-axis would show the number falling into each range using a rectangle coming out of the location of the range on the y-axis. I have been able to program everything from the input to the actual bar graph. My problem is I have been unable to put the finishing touches on the graph which are the title, the axis labels, and the labels for the data. I have tried some things with Swing and AWT but with my newbie understanding of Java the results were not good. Here is the code I already have:
|
 |
marc weber
Sheriff
Joined: Aug 31, 2004
Posts: 11343
|
|
"SilentCodingOne," Welcome to JavaRanch! Please check your private messages by clicking on My Private Messages. Thanks!
|
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
|
 |
marc weber
Sheriff
Joined: Aug 31, 2004
Posts: 11343
|
|
Originally posted by Bill Cappoli: ... My problem is I have been unable to put the finishing touches on the graph which are the title, the axis labels, and the labels for the data...
Currently, your JFrame contains only a JPanel. It sounds like you want to add some JLabels alongside your JPanel. In doing this, you might want to look at Laying Out Components Within a Container from the Swing Tutorial.
|
 |
 |
|
|
subject: Help with graphing program
|
|
|