Question about ArcMedia JavaScript Source Code 3000 Pro (gar448) for PC

1 Answer

Java source code

I want a java sourse code for systech transpotation service

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 1 Answer

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
//package optimalcluster;
/**
*
* @author CSEEXAM2008
*/
import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
public class GraphingData extends JPanel {
double[] data = {
0.504782921308152, 1.174144134378306, 2.0933754535558546,6.2625807939548823,8.8484441414277364,10.0000003,12.908978000,14.8906789456,12.9087654567 };
final int PAD = 20;
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
int w = getWidth();
int h = getHeight();
// Draw ordinate.
g2.draw(new Line2D.Double(PAD, PAD, PAD, h-PAD));
// Draw abcissa.
g2.draw(new Line2D.Double(PAD, h-PAD, w-PAD, h-PAD));
double xInc = (double)(w - 2*PAD)/(data.length-1);
double scale = (double)(h - 2*PAD)/getMax();
// Mark data points.
g2.setPaint(Color.red);

for(int i = 0; i < data.length; i++) {
double x = PAD + i*xInc;
double y = h - PAD - scale*data[i];
g2.fill(new Ellipse2D.Double(x-2, y-2, 4, 4));

}
g2.setPaint(Color.black);
for(int i = 0; i < data.length; i++) {
double x = PAD + i*xInc;
double y = h - PAD - scale*data[i];
g2.fill(new Ellipse2D.Double(x-2+4, y-2+4, 4, 4));
}
g2.setPaint(Color.blue);

for(int i = 0; i < data.length; i++) {
double x = PAD + i*xInc;
double y = h - PAD - scale*data[i];
g2.fill(new Ellipse2D.Double(x-2+6, y-2+6, 4, 4));
}
g2.setPaint(Color.pink);

for(int i = 0; i < data.length; i++) {
double x = PAD + i*xInc;
double y = h - PAD - scale*data[i];
g2.fill(new Ellipse2D.Double(x-2+8, y-2+8, 4, 4));
}

}
private double getMax() {
double max = -Integer.MAX_VALUE;
for(int i = 0; i < data.length; i++) {
if(data[i] > max)
max = data[i];
}
return max;
}
public static void main(String[] args) {
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.add(new GraphingData());
f.setSize(400,400);
f.setLocation(200,200);
f.setVisible(true);
}
}

Posted on Feb 11, 2009

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Source code for Hough Circle Detection on BufferedImage in java


That sounds a lot like homework so I am not surprised that you didn't get a response.

Did you pass the course?

Jul 30, 2012 | Sun Java Programming Language (cdj-275)

4 Answers

Java is not working


Hello there :
first you are going to want to ensure that your your current version of java is installed correctly and is not corrupted and if it needs to be reinstalled
download the latest java version and reinstall this . www.java.com
this should be able to take care of the problem that you are having ok?
best regards michael

Aug 23, 2009 | ArcMedia JavaScript Source Code 3000 Pro...

2 Answers

Source code in java that display bio data


program that display first name and second name

Jun 18, 2009 | Sun Java Programming Language (cdj-275)

1 Answer

I need java source code for chat application reply


Your answer is here:
Solution # 1
http://www.web-tech-india.com/software/jsp_chat.php

Solution # 2
http://www.topshareware.com/java-source-codes-for-chat-application/downloads/1.htm

Solution # 3
http://www.codeproject.com/KB/java/java_applet_chat_with_gui.aspx

Good luck

Feb 26, 2009 | Compilers & Programming Tools

1 Answer

Unable to View Java Applet


"load: class JFI.class not found."
Based on the console output, it means that it cannot find the java applet class. In other words, the applet is missing on the server side. There is nothing that you can do about it, unless you know the person who created the applet. Good luck :)

Dec 23, 2008 | ArcMedia JavaScript Source Code 3000 Pro...

Not finding what you are looking for?
ArcMedia JavaScript Source Code 3000 Pro (gar448) for PC Logo

Related Topics:

452 people viewed this question

Ask a Question

Usually answered in minutes!

Top ArcMedia Compilers & Programming Tools Experts

Robin Hill
Robin Hill

Level 3 Expert

1251 Answers

Michael Thomas
Michael Thomas

Level 3 Expert

3051 Answers

Mike

Level 3 Expert

4331 Answers

Are you an ArcMedia Compiler and Programming Tool Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...