Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners plotting a graph
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


girish
plotting a graph
1 Answer(s)      6 years and 4 months ago
Posted in : Java Beginners



Advertisement
View Answers

August 25, 2008 at 7:43 PM


Hi friend,

import java.awt.*;
import java.applet.*;

public class example1 extends Applet {
Button button1;
public void init() {
}

public void paint(Graphics g) {
Button button1 = new Button("Plot");
add(button1);
g.setColor(Color.blue);
g.drawLine(600,0,600,1000); // x-axis
g.drawLine(0,350,1400,350);// y-axis

for (int i=0;i<=1000;i++){
g.drawLine(i,(int)Math.sin(i),i + 2,(int)Math.sin(i));
//even tho at random location
}
}
}

--------------------------------------

<HTML>
<BODY>
<div align = "center">
<APPLET CODE = "example1.class" WIDTH = "500" HEIGHT = "400"></APPLET>
</div>
</BODY>
</HTML>

-----------------------------



Read for more information.

http://www.roseindia.net/java/

Thanks.



Related Tutorials/Questions & Answers:
plotting a graph - Java Beginners
plotting a graph  pls help me out regarding plotting a graph. I have done that through LiveGraph API. but now i required the graph to be displayed on the gui- window. and whatever inputs i will pass it must change the graph
reading data from excel file and plotting graph
reading data from excel file and plotting graph  I am doing a project using NetBeans in which i have to take input an excel file and then using... excel to plot on an axis in graph
Advertisements
Plotting equations on a cartesian Plane
Plotting equations on a cartesian Plane  Hey, Im sort of a beginner of java, and i at the moment of working on a program that takes the input... struggling to figure out how to plot a line graph after the user has input his
to show graph
to show graph  by clicking on submit button how to show the graph by fetching data in mysql?   Please visit the following link: JSP graph by fetching data in mysql
line graph
line graph  I have developed an application and in that i have to compare 2 reports using line graph from the data taken from ms access database?please help
Applet Graph
columns-names by using check box and click on graph button, 3..then i have to get a graph between those columns in a applet plz send me the code thank u
Autoupdating graph
Autoupdating graph  Hey Anyone who might help me making a XY graph, that autoupdates lets say every 5th minute. All the datasets comes from an mySQL database, and the dataset in the database, comes from a txt file and are being
Graph in JAVA SWING
Graph in JAVA SWING  Hi, How to draw a simple GRAPH in JAVA SWING ?  ..., Please visit the following link: Bar Graph in Java Swing Thanks
about graph - Applet
about graph  How to draw a graph in applet and that should be display in web browser? How to make a running applet in our browser? for example ticker
plot a graph in Java
plot a graph in Java   I need to plot a graph in Java but the samples are not known in advance. The samples keep on coming through callback and I... and the final graph may be quite congested. So please guide me on this. Thanks
datewise/monthwise bar graph
datewise/monthwise bar graph  How to make a datewise/monthwise bar graph using the values from the ms access database? please help its urgent
Create Bar graph
Create Bar graph  hi............. In my project i want to create a BAR GRAPH to display the result. I HAVE certain values that want to show in graph form. Can u help me plzzzzzzz i require a very simple code in java swings were
Changing 2D graph using slider.
Changing 2D graph using slider.  Code for changing a 2d graph with help of slider
To display the bar graph
To display the bar graph  hi........ I am able to get the output of bar graph. but now i want that to be displayed on my own form. The code which i am having in that the output is displayed in another form, its creating new form
statistical graph in jsp - JSP-Servlet
statistical graph in jsp  how to create a statistical graph to show the highest mark and the lowest mark of a table named test which consist of two... by a graph without hard coding the id's and the scores
radar graph in java
radar graph in java  Hi All I am developing a java application. In this application i need to show a radar grap.when some body assigne rating then each rating should show on x y z axis. please suggest me some good way to do
How to show database values into graph using jsp?
How to show database values into graph using jsp?  How to show database values into graph using jsp
How to show database values into graph using jsp?
How to show database values into graph using jsp?  How to show database values into graph using jsp
Draw graph using jsp without database connection
Draw graph using jsp without database connection  Draw graph using jsp code without database connection
How to show database values in Graph.(Like Cricket score board Graph)
How to show database values in Graph.(Like Cricket score board Graph)  Hi, Can Any one help out! How to show database values in Graph. i mean while....(Like Cricket score board Graph)   import java.sql.*; import
java-graph help - Java Beginners
java-graph help  sir/madam I wanted to design a shortest path Algorithm. i wanted to show the shortest path in graphical format in the way it looks in the books.I have drawn circlec and lines between the circles but am not able
java + excel data +graph - JDBC
a graph with the facility of drawing a trendline(in the graph)...also i need to be able to select points in the graph and draw the graph again between those...(" "); final XYSeries series1 = new XYSeries("Graph"); for(int i=0;i  
draw the running or moving graph using database in jsp
draw the running or moving graph using database in jsp  hi my question is how to draw the running or moving graph using jsp and take x and y co-ordinate value from database
draw the running or moving graph using database in jsp
draw the running or moving graph using database in jsp  hi my question is how to draw the running or moving graph using jsp and take x and y co-ordinate value from database
PHP GD line graph
,'Line Graph by: Roseindia Technologies',$red); imagepng($im); ?> After
Multi line graph - Java Beginners
Multi line graph  Hi, I want a multi line graph on a single chart using jfree in java.... Can you please let me know the code... thanks in advance  Hi Friend, Loginto the below mentioned URl & download the file
graph generation from xml design file
graph generation from xml design file  how to search words in XML file with javascript. i have copied contents of XML file into word file. using searched keywords i would like to draw graph
How to export chart(graph) generated by jsp into a excel?
How to export chart(graph) generated by jsp into a excel?  How to export chart(graph) generated by jsp into a excel? I have a jsp page which generates charts . Now I need those charts to be exported into an excel.please help
An Applet program for Drawing picture & graph - Applet
An Applet program for Drawing picture & graph  How can I write an Applet program for drawing picture and graph having various colours and tools provided
hybrid graph (jfree chart) - Swing AWT
hybrid graph (jfree chart)  hello i have a problem related to jfree chart.I want to display hybrid graph (Stacked Area and Line ).combination.... Thanks.   Hi, Plz what the requirement of hybrid graph
 

 

 

DMCA.com