Is Apple allow core plot framework to draw Pie chart in iPhone application?

Is Apple allow core plot framework to draw Pie chart in iPhone application?
http://code.google.com/p/core-plot/wiki/AppsUsingCorePlot

Wrong forum. Ask in the developer's forum.

Similar Messages

  • Is apple allow core plot framework to draw graph in iPhone app?

    is apple allow core plot framework to draw graph in iPhone app?

    Wrong forum. Ask in the developer's forum.

  • Plot line, bar and pie chart

    Anyone can let me know where can i learn or tutorial on how to plot line, bar and pie chart by using java2D... (no third-party software)....
    thanks in advance.

    Here's a pie chart app I made for an earlier question:
    import java.awt.*;
    import java.awt.font.*;
    import java.awt.geom.*;
    import javax.swing.*;
    public class PieChart {
      public static void main(String[] args) {
        int[] data = {
          18, 95, 102, 87
        PieCharter pie = new PieCharter();
        pie.enterData(data);
        JFrame f = new JFrame("Pie Chart");
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.getContentPane().add(pie);
        f.setSize(400,300);
        f.setLocation(300,300);
        f.setVisible(true);
    class PieCharter extends JPanel {
      int[] data, percents;
      int dataTotal;
      final int
        PAD = 25,
        R_PAD = 5;
      public PieCharter() {
        setBackground(Color.white);
      public void paintComponent(Graphics g) {
        super.paintComponent(g);
        Graphics2D g2 = (Graphics2D)g;
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                            RenderingHints.VALUE_ANTIALIAS_ON);
        Font font = new Font("lucida sans unicode", Font.PLAIN, 16);
        g2.setFont(font);
        FontRenderContext frc = g2.getFontRenderContext();
        int width = getWidth();
        int height = getHeight();
        int cx = width/2;
        int cy = height/2;
        int dia = (int)Math.min(width, height) - 2*PAD;
        g2.draw(new Ellipse2D.Double((width - dia)/2, (height - dia)/2, dia, dia));
        // draw zero datum
        double radians = 0;
        int x = cx + (int)((dia/2) * Math.cos(radians));
        int y = cy - (int)((dia/2) * Math.sin(radians));
        g2.draw(new Line2D.Double(cx, cy, x, y));
        String s;
        int dataWidth, dataHeight, deltaR, rXInc, rYInc;
        for(int i = 0; i < data.length; i++) {
          radians += 2*Math.PI * data/dataTotal;
    x = cx + (int)((dia/2) * Math.cos(radians));
    y = cy - (int)((dia/2) * Math.sin(radians));
    g2.draw(new Line2D.Double(cx, cy, x, y));
    s = String.valueOf(percents[i]) + "%";
    dataWidth = (int)font.getStringBounds(s, frc).getWidth();
    dataHeight = (int)font.getLineMetrics(s, frc).getAscent();
    deltaR = (int)Math.sqrt(dataWidth*dataWidth + dataHeight*dataHeight)/2 + R_PAD;
    rXInc = (int)(deltaR * Math.cos(radians));
    rYInc = (int)(deltaR * Math.sin(radians));
    x += rXInc;
    y -= rYInc;
    x -= dataWidth/2;
    y += dataHeight/2;
    g2.drawString(s, x, y);
    s = String.valueOf(data[i]);
    dataWidth = (int)font.getStringBounds(s, frc).getWidth();
    dataHeight = (int)font.getLineMetrics(s, frc).getAscent();
    x = cx + (int)((dia/4) * Math.cos(radians - 2*Math.PI * data[i]/(2*dataTotal)));
    y = cy - (int)((dia/4) * Math.sin(radians - 2*Math.PI * data[i]/(2*dataTotal)));
    x -= dataWidth/2;
    y += dataHeight/2;
    g2.drawString(s, x, y);
    private void prepareData() {
    for(int i = 0; i < data.length; i++)
    dataTotal += data[i];
    percents = new int[data.length];
    int dataPlus = 0;
    for(int i = 0; i < data.length; i++) {
    dataPlus += data[i];
    percents[i] = Math.round(100 * dataPlus/dataTotal);
    public void enterData(int[] data) {
    this.data = data;
    prepareData();
    repaint();

  • Drawing pie chart in applet

    Hi,
    The following is an applet I've written as an assignment in school. The applet runs well on appletviewer (here I mean drawing the pie chart). But when I run it on my browser, the pie chart is not drawn. Hope you can help me. Thanks in advance.
    import java.applet.*;import java.text.*;import java.awt.*;import java.awt.event.*;import java.awt.Graphics;public class x2 extends Applet implements ActionListener {               private Button draw,reset;        private TextField thigh,tmedium,tlow,tno;     private Label banner,l1, l2, l3, l4;     double rhigh,rmedium,rlow,rno;     double high, medium, low, no, total, high2=0, medium2=0, low2=0, no2=0,low3, no3;     String something="";          public void paint(Graphics g){     setBackground(Color.white);               if(something=="in"){     try {               rhigh=Double.parseDouble(thigh.getText());     rmedium=Double.parseDouble(tmedium.getText());     rlow=Double.parseDouble(tlow.getText());     rno=Double.parseDouble(tno.getText());     } catch (NumberFormatException nfe) {     }     total=rhigh+rmedium+rlow+rno; high=(rhigh/total)*100; medium=(rmedium/total)*100; low=(rlow/total)*100; no=(rno/total)*100; high2=high*360/100;     medium2=medium*360/100;     low2=low*360/100;     no2=no*360/100;          low3=high2+medium2;     no3=low3+low2;               g.setColor(Color.red);     g.fillArc(100,100,200,200,0,(int)high2);     g.setColor(Color.blue);     g.fillArc(100,100,200,200,(int)high2,(int)medium2);     g.setColor(Color.green);     g.fillArc(100,100,200,200,(int)low3,(int)low2);     g.setColor(Color.pink);     g.fillArc(100,100,200,200,(int)no3,(int)no2);     }     }          public void init(){          draw=new Button("Draw pie chart");     reset=new Button("Reset");     thigh=new TextField("",10);     tmedium=new TextField("",10);     tlow=new TextField("",10);     tno=new TextField("",10);     l1=new Label("High Risk  :$");     l2=new Label("Medium Risk:$");     l3=new Label("Low Risk   :$");     l4=new Label("No Risk    :$");     banner=new Label("Welcome");           add(banner);           add(l1);     add(thigh);          add(l2);     add(tmedium);     add(l3);     add(tlow);     add(l4);     add(tno);                         add(draw);     add(reset);                   draw.setActionCommand("Draw");     draw.addActionListener(this);        reset.setActionCommand("Reset");     reset.addActionListener(this);     }          public void actionPerformed(ActionEvent e){          if(e.getActionCommand() == "Draw") {               something="in";               repaint();                    } else if(e.getActionCommand()== "Reset") {               something="";               thigh.setText("");               tmedium.setText("");               tlow.setText("");               tno.setText("");               repaint();          }     }}

    <code>
    import java.applet.*;
    import java.text.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Graphics;
    public class x2 extends Applet implements ActionListener {
         private Button draw, reset;
         private TextField thigh, tmedium, tlow, tno;
         private Label banner, l1, l2, l3, l4;
         double rhigh,rmedium,rlow,rno;
         double high, medium, low, no, total, high2=0, medium2=0, low2=0, no2=0,low3, no3;
         String something="";
         public void paint(Graphics g) {
              setBackground(Color.white);
              if(something=="in"){
                   try {
                        rhigh=Double.parseDouble(thigh.getText());
                        rmedium=Double.parseDouble(tmedium.getText());
                        rlow=Double.parseDouble(tlow.getText());
                        rno=Double.parseDouble(tno.getText());
                   catch (NumberFormatException nfe) { }
                   total=rhigh+rmedium+rlow+rno; high=(rhigh/total)*100;
                   medium=(rmedium/total)*100;
                   low=(rlow/total)*100;
                   no=(rno/total)*100;
                   high2=high*360/100;
                   medium2=medium*360/100;
                   low2=low*360/100;
                   no2=no*360/100;
                   low3=high2+medium2;
                   no3=low3+low2;
                   g.setColor(Color.red);
                   g.fillArc(100,100,200,200,0,(int)high2);
                   g.setColor(Color.blue);
                   g.fillArc(100,100,200,200,(int)high2,(int)medium2);
                   g.setColor(Color.green);
                   g.fillArc(100,100,200,200,(int)low3,(int)low2);
                   g.setColor(Color.pink);
                   g.fillArc(100,100,200,200,(int)no3,(int)no2);
         public void init(){
              draw=new Button("Draw pie chart");
              reset=new Button("Reset");
              thigh=new TextField("",10);
              tmedium=new TextField("",10);
              tlow=new TextField("",10);
              tno=new TextField("",10);
              l1=new Label("High Risk :$");
              l2=new Label("Medium Risk:$");
              l3=new Label("Low Risk :$");
              l4=new Label("No Risk :$");
              banner=new Label("Welcome");
              add(banner);
              add(l1);
              add(thigh);
              add(l2);
              add(tmedium);
              add(l3);
              add(tlow);
              add(l4);
              add(tno);
              add(draw);
              add(reset);
              draw.setActionCommand("Draw");
              draw.addActionListener(this);
              reset.setActionCommand("Reset");
              reset.addActionListener(this);
         public void actionPerformed(ActionEvent e) {
              if(e.getActionCommand() == "Draw") {
                   something="in";
                   repaint();
              } else if(e.getActionCommand()== "Reset") {
                   something="";
                   thigh.setText("");
                   tmedium.setText("");
                   tlow.setText("");
                   tno.setText("");
                   repaint();
    </code>

  • Drawing pie chart

    import java.applet.*;
    import java.text.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Graphics;
    public class x2 extends Applet implements ActionListener {
         private Button draw,draw2,reset;
         private TextField thigh,tmedium,tlow,tno;
         private Label banner,l1, l2, l3, l4;
         double rhigh,rmedium,rlow,rno;
         double high, medium, low, no, total, high2=0, medium2=0, low2=0, no2=0,low3=0,no3=0;
         String something="";
         public void paint(Graphics g){
         setBackground(Color.white);
         if(something=="pie"){
              try{
    rhigh=Double.parseDouble(thigh.getText());
    rmedium=Double.parseDouble(tmedium.getText());
                   rlow=Double.parseDouble(tlow.getText());
                   rno=Double.parseDouble(tno.getText());
    if(rhigh<0||rmedium<0||rlow<0||no<0){
         throw new NumberFormatException();
              total=rhigh+rmedium+rlow+rno;
         high=(rhigh/total)*100;
         medium=(rmedium/total)*100;
         low=(rlow/total)*100;
         no=(rno/total)*100;
         high2=high*360/100;
              medium2=medium*360/100;
              low2=low*360/100;
              no2=no*360/100;     
              low3=high2+medium2;
              no3=low3+low2;
              DecimalFormat F=new DecimalFormat("###.000");
    g.setColor(Color.black);
    g.drawString("THE INVESTMENT ARE:",250,100);
    g.drawString("Pie Chart",450,100);
    g.setColor(Color.red);
    g.drawString(F.format(high)+" "+"% High Risk",250,140);
    g.setColor(Color.blue);
    g.drawString(F.format(medium)+" "+"%High Risk",250,180);
    g.setColor(Color.green);
    g.drawString(F.format(low)+" "+"% Low Risk",250,220);
    g.setColor(Color.pink);
    g.drawString(F.format(no)+" "+"% No Risk",250,260);
    g.setColor(Color.red);
    g.fillArc(500,80,200,200,0,360-(int)(medium2+low2+no2));
    g.setColor(Color.blue);
    g.fillArc(500,80,200,200,(int)high2,360-(int)(high2+low2+no2));
    g.setColor(Color.green);
    g.fillArc(500,80,200,200,(int)low3,360-(int)(high2+medium2+no2));
    g.setColor(Color.pink);
    g.fillArc(500,80,200,200,(int)no3,360-(int)(high2+medium2+low2));
    g.setColor(Color.red);
    g.fillRect(450,300,60,30);
    g.setColor(Color.blue);
    g.fillRect(450,330,60,30);
    g.setColor(Color.green);
    g.fillRect(450,360,60,30);
    g.setColor(Color.pink);
    g.fillRect(450,390,60,30);
    g.setColor(Color.red);
    g.drawString("High Risk Investment",520,320);
    g.setColor(Color.blue);
    g.drawString("Medium Risk Investment",520,350);
    g.setColor(Color.green);
    g.drawString("Low Risk Investment",520,380);
    g.setColor(Color.pink);
    g.drawString("No Risk Investment",520,410);
         catch(NumberFormatException e){
    g.drawString("Invalid value click the reset button and reenter your value",300,200);
              else if(something=="bar") {
              try{
    rhigh=Double.parseDouble(thigh.getText());
    rmedium=Double.parseDouble(tmedium.getText());
    rlow=Double.parseDouble(tlow.getText());
    rno=Double.parseDouble(tno.getText());
    if(rhigh<0||rmedium<0||rlow<0||no<0){
         throw new NumberFormatException();
         total=rhigh+rmedium+rlow+rno;
         high=(rhigh/total)*100;
         medium=(rmedium/total)*100;
         low=(rlow/total)*100;
         no=(rno/total)*100;
    DecimalFormat F=new DecimalFormat("###.000");
    g.setColor(Color.black);
    g.drawString("THE INVESTMENT ARE:",250,100);
    g.drawString("Bar Chart",530,100);
    g.setColor(Color.red);
    g.drawString(F.format(high)+" "+"% High Risk",250,140);
    g.setColor(Color.blue);
    g.drawString(F.format(medium)+" "+"% High Risk",250,180);
    g.setColor(Color.green);
    g.drawString(F.format(low)+" "+"% Low Risk",250,220);
    g.setColor(Color.pink);
    g.drawString(F.format(no)+" "+"% No Risk",250,260);
    g.setColor(Color.red);
    g.fillRect(480,250-(int)high,40,(int)high);
    g.setColor(Color.blue);
    g.fillRect(530,250-(int)medium,40,(int)medium);
    g.setColor(Color.green);
    g.fillRect(580,250-(int)low,40,(int)low);
    g.setColor(Color.pink);
    g.fillRect(630,250-(int)no,40,(int)no);
    g.setColor(Color.black);
    g.drawLine(450,250,700,250);
    g.drawLine(450,130,450,250);
    g.drawLine(445,150,450,150);
    g.drawString("Hight",485,265);
    g.drawString("Medium",535,265);
    g.drawString("Low",585,265);
    g.drawString("No",635,265);
    g.drawString("Percentage%",425,125);
    g.drawString("Risks",710,250);
    g.drawString("100",420,150);
    g.setColor(Color.red);
    g.fillRect(450,300,60,30);
    g.setColor(Color.blue);
    g.fillRect(450,330,60,30);
    g.setColor(Color.green);
    g.fillRect(450,360,60,30);
    g.setColor(Color.pink);
    g.fillRect(450,390,60,30);
    g.setColor(Color.red);
    g.drawString("High Risk Investment",520,320);
    g.setColor(Color.blue);
    g.drawString("Medium Risk Investment",520,350);
    g.setColor(Color.green);
    g.drawString("Low Risk Investment",520,380);
    g.setColor(Color.pink);
    g.drawString("No Risk Investment",520,410);     
         catch(NumberFormatException e){
    g.drawString("Invalid value click the reset button and reenter your value",300,200);
         public void init(){
         setLayout (null);
         draw=new Button("Draw pie chart");
         draw2=new Button("Draw bar chart");
         reset=new Button("Reset");
         thigh=new TextField("",10);
         tmedium=new TextField("",10);
         tlow=new TextField("",10);
         tno=new TextField("",10);
         l1=new Label("High Risk :$");
         l2=new Label("Medium Risk:$");
         l3=new Label("Low Risk :$");
         l4=new Label("No Risk :$");
         banner=new Label("Welcome");
         banner.setBounds(new Rectangle(200,50,100,20));
         add(banner);
    l1.setBounds(new Rectangle(20,100,100,20));
    add(l1);
    thigh.setBounds(new Rectangle(120,100,100,20));
    add(thigh);
    l2.setBounds(new Rectangle(20,140,100,20));
    add(l2);
    tmedium.setBounds(new Rectangle(120,140,100,20));
    add(tmedium);
    l3.setBounds(new Rectangle(20,180,100,20));
    add(l3);
    tlow.setBounds(new Rectangle(120,180,100,20));
    add(tlow);
    l4.setBounds(new Rectangle(20,220,100,20));
    add(l4);
    tno.setBounds(new Rectangle(120,220,100,20));
    add(tno);
    draw.setBounds(new Rectangle(20,260,100,20));
    add(draw);
    draw2.setBounds(new Rectangle(120,260,100,20));
    add(draw2);
    reset.setBounds(new Rectangle(20,290,100,20));
    add(reset);
    draw.addActionListener(this);
    draw2.addActionListener(this);
    reset.addActionListener(this);
         public void actionPerformed(ActionEvent e){
              if(e.getSource()==draw) {
                   something="pie";
                   repaint();
              }else if(e.getSource()==draw2) {
                   something="bar";
                   repaint();
              if(e.getSource()==reset) {
                   something="";
                   thigh.setText("");
                   tmedium.setText("");
                   tlow.setText("");
                   tno.setText("");
                   repaint();

    import java.applet.*;
    import java.text.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Graphics;
    public class x2 extends Applet implements ActionListener
         private Button draw,draw2,reset;
         private TextField thigh,tmedium,tlow,tno;
         private Label banner,l1, l2, l3, l4;
         double  rhigh,rmedium,rlow,rno;
         double  high, medium, low, no, total, high2=0, medium2=0, low2=0, no2=0,low3=0,no3=0;
         String something="";
         Double  d1;
    public void paint(Graphics g)
         setBackground(Color.white);
         if(something=="pie")
              try
    //          rhigh=Double.parseDouble(thigh.getText());
    //          rmedium=Double.parseDouble(tmedium.getText());
    //          rlow=Double.parseDouble(tlow.getText());
    //          rno=Double.parseDouble(tno.getText());
                   rhigh   = get_double(thigh.getText());
                   rmedium = get_double(tmedium.getText());
                   rlow    = get_double(tlow.getText());
                   rno     = get_double(tno.getText());
                   if(rhigh<0||rmedium<0||rlow<0||no<0)
                        throw new NumberFormatException();
                   total=rhigh+rmedium+rlow+rno;
                   high=(rhigh/total)*100;
                   medium=(rmedium/total)*100;
                   low=(rlow/total)*100;
                   no=(rno/total)*100;
                   high2=high*360/100;
                   medium2=medium*360/100;
                   low2=low*360/100;
                   no2=no*360/100;
                   low3=high2+medium2;
                   no3=low3+low2;
                   DecimalFormat F=new DecimalFormat("###.000");
                   g.setColor(Color.black);
                   g.drawString("THE INVESTMENT ARE:",250,100);
                   g.drawString("Pie Chart",450,100);
                   g.setColor(Color.red);
                   g.drawString(F.format(high)+" "+"% High Risk",250,140);
                   g.setColor(Color.blue);
                   g.drawString(F.format(medium)+" "+"%High Risk",250,180);
                   g.setColor(Color.green);
                   g.drawString(F.format(low)+" "+"% Low Risk",250,220);
                   g.setColor(Color.pink);
                   g.drawString(F.format(no)+" "+"% No Risk",250,260);
                   g.setColor(Color.red);
                   g.fillArc(500,80,200,200,0,360-(int)(medium2+low2+no2));
                   g.setColor(Color.blue);
                   g.fillArc(500,80,200,200,(int)high2,360-(int)(high2+low2+no2));
                   g.setColor(Color.green);
                   g.fillArc(500,80,200,200,(int)low3,360-(int)(high2+medium2+no2));
                   g.setColor(Color.pink);
                   g.fillArc(500,80,200,200,(int)no3,360-(int)(high2+medium2+low2));
                   g.setColor(Color.red);
                   g.fillRect(450,300,60,30);
                   g.setColor(Color.blue);
                   g.fillRect(450,330,60,30);
                   g.setColor(Color.green);
                   g.fillRect(450,360,60,30);
                   g.setColor(Color.pink);
                   g.fillRect(450,390,60,30);
                   g.setColor(Color.red);
                   g.drawString("High Risk Investment",520,320);
                   g.setColor(Color.blue);
                   g.drawString("Medium Risk Investment",520,350);
                   g.setColor(Color.green);
                   g.drawString("Low Risk Investment",520,380);
                   g.setColor(Color.pink);
                   g.drawString("No Risk Investment",520,410);
              catch(NumberFormatException e)
                   g.drawString("Invalid value click the reset button and reenter your value",300,200);
         if(something=="bar")
              try
    //     rhigh=Double.parseDouble(thigh.getText());
    //     rmedium=Double.parseDouble(tmedium.getText());
    //  rlow=Double.parseDouble(tlow.getText());
    //  rno=Double.parseDouble(tno.getText());
                   rhigh   = get_double(thigh.getText());
                   rmedium = get_double(tmedium.getText());
                   rlow    = get_double(tlow.getText());
                   rno     = get_double(tno.getText());
                   if(rhigh<0||rmedium<0||rlow<0||no<0)
                        throw new NumberFormatException();
                   total=rhigh+rmedium+rlow+rno;
                   high=(rhigh/total)*100;
                   medium=(rmedium/total)*100;
                   low=(rlow/total)*100;
                   no=(rno/total)*100;
                   DecimalFormat F=new DecimalFormat("###.000");
                   g.setColor(Color.black);
                   g.drawString("THE INVESTMENT ARE:",250,100);
                   g.drawString("Bar Chart",530,100);
                   g.setColor(Color.red);
                   g.drawString(F.format(high)+" "+"% High Risk",250,140);
                   g.setColor(Color.blue);
                   g.drawString(F.format(medium)+" "+"% High Risk",250,180);
                   g.setColor(Color.green);
                   g.drawString(F.format(low)+" "+"% Low Risk",250,220);
                   g.setColor(Color.pink);
                   g.drawString(F.format(no)+" "+"% No Risk",250,260);
                   g.setColor(Color.red);
                   g.fillRect(480,250-(int)high,40,(int)high);
                   g.setColor(Color.blue);
                   g.fillRect(530,250-(int)medium,40,(int)medium);
                   g.setColor(Color.green);
                   g.fillRect(580,250-(int)low,40,(int)low);
                   g.setColor(Color.pink);
                   g.fillRect(630,250-(int)no,40,(int)no);
                   g.setColor(Color.black);
                   g.drawLine(450,250,700,250);
                   g.drawLine(450,130,450,250);
                   g.drawLine(445,150,450,150);
                   g.drawString("Hight",485,265);
                   g.drawString("Medium",535,265);
                   g.drawString("Low",585,265);
                   g.drawString("No",635,265);
                   g.drawString("Percentage%",425,125);
                   g.drawString("Risks",710,250);
                   g.drawString("100",420,150);
                   g.setColor(Color.red);
                   g.fillRect(450,300,60,30);
                   g.setColor(Color.blue);
                   g.fillRect(450,330,60,30);
                   g.setColor(Color.green);
                   g.fillRect(450,360,60,30);
                   g.setColor(Color.pink);
                   g.fillRect(450,390,60,30);
                   g.setColor(Color.red);
                   g.drawString("High Risk Investment",520,320);
                   g.setColor(Color.blue);
                   g.drawString("Medium Risk Investment",520,350);
                   g.setColor(Color.green);
                   g.drawString("Low Risk Investment",520,380);
                   g.setColor(Color.pink);
                   g.drawString("No Risk Investment",520,410);
              catch(NumberFormatException e)
                   g.drawString("Invalid value click the reset button and reenter your value",300,200);
    private double get_double(String s)
         try
              d1 = d1.valueOf(s);
              return(d1.doubleValue());
         catch (NumberFormatException nfe)
              return(-1);
    public void init()
         setLayout (null);
         draw    = new Button("Draw pie chart");
         draw2   = new Button("Draw bar chart");
         reset   = new Button("Reset");
         thigh   = new TextField("",10);
         tmedium = new TextField("",10);
         tlow    = new TextField("",10);
         tno     = new TextField("",10);
         l1      = new Label("High Risk :$");
         l2      = new Label("Medium Risk:$");
         l3      = new Label("Low Risk :$");
         l4      = new Label("No Risk :$");
         banner = new Label("Welcome");
         banner.setBounds(200,50,100,20);
         add(banner);
         l1.setBounds(20,100,100,20);
         add(l1);
         thigh.setBounds(120,100,100,20);
         add(thigh);
         l2.setBounds(20,140,100,20);
         add(l2);
         tmedium.setBounds(120,140,100,20);
         add(tmedium);
         l3.setBounds(20,180,100,20);
         add(l3);
         tlow.setBounds(120,180,100,20);
         add(tlow);
         l4.setBounds(20,220,100,20);
         add(l4);
         tno.setBounds(120,220,100,20);
         add(tno);
         draw.setBounds(20,260,100,20);
         add(draw);
         draw2.setBounds(120,260,100,20);
         add(draw2);
         reset.setBounds(20,290,100,20);
         add(reset);
         draw.addActionListener(this);
         draw2.addActionListener(this);
         reset.addActionListener(this);
    public void actionPerformed(ActionEvent e)
         if(e.getSource()==draw)
              something="pie";
         if(e.getSource()==draw2)
              something="bar";
         if(e.getSource()==reset)
              something="";
              thigh.setText("");
              tmedium.setText("");
              tlow.setText("");
              tno.setText("");
         repaint();
    Noah

  • Drawing pie charts

    ive constructed a pie chart using fillArc's but i want my arcs to have a border.
    how could i achieve this and make it look good.
    also, is their any way i could make diagnol lines not so jaggedy.
    cheers

    ive constructed a pie chart using fillArc's but i want
    my arcs to have a border.
    how could i achieve this and make it look good.Use Graphics2D methods:
    void draw(Shape shape) //Stroke border around shape
    void fill(Shape shape) //Fill interior of shape>
    also, is their any way i could make diagnol lines not
    so jaggedy.Antialiasing blurs jaggies. Here's how to set the rendering hint of a Graphics2D object to do this:
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);Unless you're just dabbling in the 2D API, it's a good idea to buy a book on it. Jonathan Knudsen's "Java 2D Graphics" (O'Reilly) is an easy introduction.
    --Paul

  • Urgent! Drawing Pie Chart

    Hi , i am trying to produce a pie chart to display the data I have. Is anyone have an example (simple code) on how a pie chart can be drawn?
    Thank you very much.

    Search this forum for "JFreeChart". I'm surprised that Dave Gilbert hasn't responded to this already. There was a time where he was posting links to his project thick and fast...

  • Is iPad2 capable of running Siri, if Apple allows it?

    My question to the communiy: is the iPad 2 processor and RAM good enough to run Siri, (suppose if Apple allows it to after he iOS 6 upgrade) ??
    Or is Apple not allowing it to run purely on commercial considerations ?

    This is an iPad user to user forum, and Apple does not participate. So we have no way of knowing.
    It's probably due to the RAM and processor limitations.
    iPad 2: RAM - 512MB, Processor - 1GHz dual-core Apple A5
    iPad 3: RAM 1024MB, Processor - 1GHz dual-core Apple A5X
     Cheers, Tom

  • Do Apple allows the use of ''Free My Apps''?

    Do Apple allows the use of ''Free My Apps''?

    To have the definitive answer you must contact Apple.
    Apple - How to Contact Us
    As an opinion, unless they have specifically blocked it, I cannot see why not.  If it is a worthwhile program is a different matter, remember, here's no such thing as a free lunch.

  • Apple's Core Audio drivers have been corrupted?

    Since upgrading to Leopard, my Alesis USB Multimix8 mixer has been increasingly getting more and more static output and has become about useless. After trying everything I could think of, I wrote to Alesis and this is what their support said...
    "With Apple’s latest updated OS Leopard, it seems Apple’s Core Audio drivers have been corrupted and affects many class compliant devices such as the Multimix 8 USB which relies on these drivers. Until Apple addresses this with a fix, the best workaround is to back-down to 10.4.10, especially if this will be used in a professional studio."
    Does this sound correct to anyone? Is theAudio Core drivers that bad on Leopard and is this something that Apple even plans to address?
    Thanks!

    Hi, everyone.
    Alesis is VERY quick to point the finger at Apple for all their woes, but after my last experience, I'm thinking this is Alesis' problem.
    At one time I was running my Alesis MultiMix8 FireWire and getting constant kernel panics while working on audio and video deadlines. As this was the famed 8-core (rolling off the assembly lines in May and all that) I was banging my head against the wall. It finally came down to me bringing in all of my office into Apple's Genius Bar at Tysons Corner, VA and trying to duplicate the occurrence.
    The culprit was the Alesis driver.
    When I upgraded to Leopard and the new Alesis FireWire driver, I have encountered no KPs or odd audio issues. Confident, I decided to try out the Alesis iMultiMix8 USB for the Second Edition of Podcasting for Dummies. I got a high-pitched whine/static when I tried working with the audio mixing between iPod and mixer. I returned the mixer and exchanged it for another one. Same problem. I then went and tested the iMultiMix on my PowerBook G4 running 10.4.11. Problem still existed. I wrote to Alesis and told them about the iMultiMix, asking them if this was a common issue.
    No response.
    While Leopard has solved the issues of the KP and continues to perform like a champ, I have been talking to other friends working on both 10.5 and 10.4 having issues with Alesis mixers and USB-powered pre-amps. It sounds less of an Apple issue and more of an Alesis issue.
    I think all we can do is wait for Alesis to resolve the problem they are failing to acknowledge is theirs. Not much of an answer, but apparently this the way things appear to be.

  • Why does not Apple allows iPhone to be sync by two different computers ?

    I have a pc at home and one in office. But I can only sync it with my home pc. Why does not apple allow iPhones to be sync by atleats two pcs as having different pc for work and home is very general.

    It is possible to sync from multiple libraries manually on other devices (iPads & iPods) so blanket statements that 'it's DRM' don't really make sense to me.
    If it is the only reason why can't non DRM'd content be copied?
    Manage content manually on your iPhone, iPad, and iPod - Apple Support
    See step 6, iPods & iPads have fewer restrictions compared to iPhones.
    Perhaps we would have a better idea if it wasn't all wrapped up in thousands of words spread between the multiple terms & conditions agreements.
    https://www.apple.com/legal/internet-services/itunes/
    https://www.apple.com/legal/internet-services/icloud/ww/
    You will need to read those terms & get legal help if you can't work it out titan_sifu, good luck.

  • How to install osx 10.6 on Apple iMac "Core Duo" 1.83 with 1 gb ram

    Apple iMac "Core Duo" 1.83 with 1GM Ram and Preinstalled Tiger 10.4.11,
    How can i Install leopard 10.6 on this imac, please give me the link also to osx 10.6

    You can purchase 10.6 from the Apple on-line store for $30.  Also, OWC, www.macsales.com sells it for $26.
    You would be better off with more memory, 2-4 GB would be important.

  • Does Apple allow a price reduction for just one week?

    Does Apple allow a price reduction for just one week?
    I can't seem to get a definitive answer from their web site.
    A one week Spring Sale for two books ~ it it OK with Apple?
    Thanks
    Bruce

    Thanks very much vinnvg ~ I was just checking in case Apple had a policy about not allowing a temporary price cut.
    Thanks for the reminder on how to do it.
    Bruce

  • Does Apple allow Franchise Apple stores?  (Barbados, West Indies)

    I have a question.
    Does Apple allow persons to work with them to open a store as a Franchise?
    In the former British West Indies region we could really use an Apple store, especially here in Barbados. (I know Apple does not like the unlocked iPhones) but they were selling like hotcakes after people were able to got them working on our Digicel or bMobile carriers.
    Anyway, Microsoft has started to become very chummy with the Barbados Government and I feel the time could be right for some competition in this right. Microsoft has since announced the Caribbean as a whole is a very profitable region for them and Paul Allen has even brought his yacht the "Octopus" down here a few times.
    The Barbados Government has a computers programme for school age children it is completely Microsoft geared currently but again I think there could be stand to be at least some Apple machines.
    The Barbados government programme is called Edutech 2000.
    http://unpan1.un.org/intradoc/groups/public/documents/CARICAD/UNPAN009517.pdf
    http://www.fujitsu.com/caribbean/news/casestudies/brb-edutech.html
    http://www.caribbeannetnews.com/2005/02/14/programme.shtml
    http://www.barbados.gov.bb/opsr/docs/edutech_brief.doc
    http://www.mes.gov.bb/
    The capital city Bridgetown would probably be the best spot on the island. Among schools colleges and universities include the Barbados campus of the University of the West Indies ( http://cavehill.uwi.edu/ ), the Barbados Community College ( http://www.bcc.edu.bb/) + The Samuel Jackson Prescod Polytechnic ( http://www.sjpp.edu.bb/ )
    Message was edited by: CaribDigita

    Apple Stores are not franchised, they're owned by Apple, Inc., but general information on becoming an authorized Apple reseller, consultant or service provider (including in the Caribbean) is here:
    http://channelprograms.apple.com/channel/
    Follow the links to learn about specific programs.
    Good luck!

  • TS1702 I just paid ten dollars for an app called flash detect. It is a total scam ... I want my ten dollars back. How can apple allow these apps on their store???

    I just paid ten dollars for an app called flash detect. It is a total scam ... I want my ten dollars back. How can apple allow these apps on their store???

    You can try the 'report a problem' link from your purchase history : log into your account on your computer's iTunes via Store > View My Account and you should then see a Purchase History section with a 'see all' link to the right of it ; click on that and you should see a list of your purchases ; find that app and use the 'Report a Problem' link.

Maybe you are looking for

  • What determines how a PDF or EPS file is opened??????

    Hi I was wondering if anyone can tell, what determines how a PDF or EPS is opened in Photoshop. If I open a PDF in photoshop, the first thing that pops up is the settings for which you want it to open. i.e., color mode, resolution, you choose what yo

  • Problem with Nokia N73 -- Camera is not working

    Recently i have purched Nokia N73. Some times my camera is not working ,means it's stuck. but after some time or after a day it's working fine. what is the reason ? is there any setting? Plz let me know the same. Wating for your positive reply ASAP.

  • Bad Sound in Windows 7 (32 bit) with bootcamp 3.1 on iMac 8,1

    I have the following sound issues in windows 7: I have a strange noise in the background of the sound. On low volume it is more notice able then on high volume. The noise seems to come from the left side only, when i mute the left side the sound seem

  • How to STARTUP multiple Oracle Databases, using sqlplus (SOLARIS)

    Hi guys, I am pretty new at solaris and oracle, right now i have oracle 11gr2 installed in my Solaris 10 machine. I managed to create 2 databases with 2 different ORACLE_SID, (e.g. A & B) my question is, is it possible to have both of this Databases

  • ADS+Terminal Services on a Single Physical Server running Windows Server 2008 R2

    We have a Dual Processor Server (2 x Intel Xeon E5-2620v2 + 32GB RAM) running on Windows Server 2008 R2. This has ADS configured. We now wish to add a VDI Setup with NComputing Zero-Clients. We have to run Terminal Services with User RDS CAL + User C