Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2008
    Rep Power

    Default Having trouble understanding Class Graphic

    Ok, i am trying to draw circles with a circle object on a jFrame with the input of the user taken with the scan.nextDouble() method, I am in way over my head sadly and I am doing things without fully understanding them. I have only just begun doing graphic, when i say begun we just learned how to make a jFrame. So am i here to ask you for help in understanding
    A. how do use an can i use an Abstract class like Graphic with initializing it. i need to use the method circle.getAbscisse() getRadius etc...Any help would be appreciated.

    Most of this code comes from reading forums and wikis, i understand most of it but I am just confused on how to apply my circles to these methods. Thank you for taking the time to read
    Java Code:
     * @(#)
     * MyCanvas application
     * @author 
     * @version 1.00 2009/3/1
    import java.util.Scanner;
    import java.awt.*;
    import javax.swing.*;
    public class MyCanvas extends Canvas
    	public static void main(String[] args)
        	//System.out.println("Enter the x,y an radius values");
        	//Scanner scan = new Scanner(;
        	//Cercle cerc = new Cercle(scan.nextDouble(),scan.nextDouble(),scan.nextDouble());
            MyCanvas canvas = new MyCanvas();
            JFrame frame = new JFrame();
            frame.setSize(800, 800);
            //Graphics graphics;
            //graphics.drawLine(10, 20, 300, 310);
        public MyCanvas()
        public void paint(Graphics graphics)
    Last edited by Bernard Robitaille; 03-02-2009 at 05:23 PM. Reason: mistakes

  2. #2
    Incinsnodgigh Guest

    Default No more hassles for Internet Shoppers!

    VeriSupport has launched the world's first SUPPORT RANKING PROGRAM

    And it is available now! You can choose to buy from stores which are VeriSupport certified and ranked ensuring that you are protected from online breeches and fraudulent organizations. Look for the VeriSupport seal when you buy from an online store, as VeriSupport seal in a website tells you, the organizations ability to provide support like live customer service, technical support and other helpdesk functions before, during and after the sale; the ability to handle customer feedback and their reliability as a company.

    VeriSupport's Support Ranking Program provides a number of benefits to you including:

    1. You can be confident that there is a support channel for addressing your issues and concerns
    2. You have the power to comment and rate in real-time about your experience
    3. You can be confident that you are dealing with a reliable business
    4. Assurance that transactions are secure

    VeriSupport helps your visualize support levels of the organization that you could deal with! and now its your decision choose VeriSupport certified organization for a hassle free experience!

    Look for the VeriSupport seal provided by VeriSupport.Com, every time!

Similar Threads

  1. Understanding this recursive function
    By LifeWithJava in forum New To Java
    Replies: 3
    Last Post: 12-30-2008, 05:26 AM
  2. [SOLVED] Trouble understanding or expressions
    By hungdukie in forum New To Java
    Replies: 1
    Last Post: 11-23-2008, 01:24 AM
  3. [SOLVED] Help with understanding nullpointexcepion
    By soxfan714 in forum New To Java
    Replies: 4
    Last Post: 11-11-2008, 04:51 AM
  4. Replies: 3
    Last Post: 10-06-2008, 11:03 PM
  5. Understanding Vectors
    By cbrown08 in forum New To Java
    Replies: 7
    Last Post: 11-05-2007, 06:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts