View Single Post
  #9 (permalink)  
Old 04-25-2008, 09:00 PM
iamchoilan iamchoilan is offline
Member
 
Join Date: Apr 2008
Posts: 9
iamchoilan is on a distinguished road
Thanks a lot, I think the first Question solved now when I click on the button it pop up a graph, but I need it to get my data and plot according to it.


But for Question 2, I think I did not make it clear enough, I want the image behind the grid of my program, but not the graph...

About the grid of my program, here is it.

Code:
public void paint(Graphics g) { g.setColor(Color.white); //Here it draw the white background sheet of it, and I want to change this to an image. g.fillRect(0, 0, getWidth(), getHeight()); g.setColor(Color.gray); //Here it put in the gray grids. if (fpPoints != null && fpPoints.length > 0) { for (int i = 0; i < fpPoints.length; i++) { g.drawLine(0, pix_grid * i, getWidth(), pix_grid * i); } for (int j = 0; j < fpPoints[0].length; j++) { g.drawLine(pix_grid * j, 0, pix_grid * j, getHeight()); } }

I don't know if this is clear enough, sorry that I am pretty new to java. I attached the whole thing I am working on here, please have a look.

Thanks a lot.
Attached Files
File Type: zip Simulation_tool.zip (79.2 KB, 3 views)
Reply With Quote