Learn to use BufferedImage and Graphics2D. To save the image to a file, just use javax.imageio.ImageIO.write (bufferedImage, "png", new File ("output.png")).
You guys should get straight to the point for newbies to understand Graphics.drawLine(...) is all you need. Extends JPanel and overwrite its paintComponent, and call the drawLine() in it.
【在 c*****t 的大作中提到】 : Learn to use BufferedImage and Graphics2D. To save the image to : a file, just use javax.imageio.ImageIO.write (bufferedImage, "png", : new File ("output.png")).
w*r
6 楼
he need axis and lables, jfreechart is so far the easist solution ...
in
【在 g*****g 的大作中提到】 : You guys should get straight to the point for newbies to understand : Graphics.drawLine(...) is all you need. : Extends JPanel and overwrite its paintComponent, and call the drawLine() in : it.
c*z
7 楼
seems like a class project. just print out the numbers, do it into excel.
x*r
8 楼
基本搞定,多谢各位。
【在 c*****t 的大作中提到】 : Learn to use BufferedImage and Graphics2D. To save the image to : a file, just use javax.imageio.ImageIO.write (bufferedImage, "png", : new File ("output.png")).