23rd April 2005, 4:26 PM
Well getting input from the command line isn't the hard part, it's drawing the graph of the interest that is tough because Java doesn't come with any standard classes for graphing. I wonder why that is? You would think that would be a relatively common use, especially among scientists. That's about the only thing Matlab can do well, that and gigantic matrix operations. I guess that's why my EE friends like Matlab. :)
Here's another thought. If you can find a way of using bar graphs, you could use JLabels pretty easily. Just set them each to opaque and set Maximum, Preferred, and Minimum Size for each as well with the values from your computations (for some reason you have to usually set all three size attributes to get it to actually use that size, and even that isn't 100%. Dumb Swing.).
Here's another thought. If you can find a way of using bar graphs, you could use JLabels pretty easily. Just set them each to opaque and set Maximum, Preferred, and Minimum Size for each as well with the values from your computations (for some reason you have to usually set all three size attributes to get it to actually use that size, and even that isn't 100%. Dumb Swing.).