Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

want to make a distribution graph~~~

 
Alex cordes
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just wonder is there any way to make a distribution graph of a data?
just searched for it on the net, cant get a code or example... ...
anyone know how to make it?
many thanks~~~
 
Scott Selikoff
author
Saloon Keeper
Posts: 4020
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, I recommend converting the data to some simplistic format like XML so it can be made uniform and easy to read. For Java graphing, there's a ton of SourceForge projects as well as proprietary chart programs, and some are better than others.

The reason I recommend the XML is that at least if you pick a particular format you can more easily migrating it to something else later.
 
Alex cordes
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, thanks for ur reply... ...it seems too hard for me~~~
do u know how to make a table for a data? whats its code?
 
Ben Wood
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alex,

Firstly, if you want to make a graph you can use Java2D, I'm sure if you search around you will be able to find a basic tutorial to get you started.

If you want to put data ina table take a look at javax.swing.JTable. You can construct one of those by passing in two arrays for example



where data is a two dimensional array of your data values (like a grid of rows and columns), and columnNames is a 1 dimension array of column names.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic