I just want to make a pie chart

I've been assigned to make a pie chart in class (with each section a different color), and I've loaded the javax.swing.JApplet and java.awt.*
I've only gotten as far as drawing the circle. I know how to create lines, but I can't figure out what I'm supposed to do to fill in the sections of the pie chart with different colors.
Could anyone help me with this simple project? Like what method I should look at?

Have you looked at the link?
public abstract void fillArc(int x,
                             int y,
                             int width,
                             int height,
                             int startAngle,
                             int arcAngle)So, let us guess at how to draw a circle, and 300 x 400, Mmm the x would be 300, and the y 400. It wants to have a radius of 100px, so thats the width & hieght sorted. Do you want it to be a complete circle? If so that is from 0-360 degrees . So that is the start & end angle.
Actually, do you know draw to the screen?
http://java.sun.com/docs/books/tutorial/2d/index.html

Similar Messages

  • I want to take remote access from an iTunes library off of my iPad ...when I hit edit from the remote app it pulls that library up ..if I delete it I just want to make sure that I'm not remotely wiping out the library, just access to it from my iPad ?

    I want to take remote access from an iTunes library off of my iPad ...when I hit edit from the remote app it pulls that library up ..if I delete it I just want to make sure that I'm not remotely wiping out the library, just access to it from my iPad ?

    Call the apple store you got it from and ask them. Sometimes in the past they've extended the 'no questions asked return' but only Apple can tell you for sure.

  • I am pulling my hair out! I am using adobe indesign and just want to make a text box 'autofit text' as I change fonts a lot and want the font to automatically re-size as I change it. help help help please - I have latest version of indesign - thanks

    I am pulling my hair out! I am using adobe indesign and just want to make a text box 'autofit text' as I change fonts a lot and want the font to automatically re-size as I change it.
    Is it not possible to create a text box, fill it with dynamic (data driven) text, but make the font size either scale up or down automatically, so that the entire text box is filled? This is a feature in PrintShop Mail Pro called COPY FIT. but no such feature in Indesign??
    help help help please - I have latest version of indesign - thanks, DJ

    lol... it seems to work, but I have another huge problem!
    Apparently .CSV files cannot contain page breaks in the data! The data I am trying to merge is a 'letter', with paragraphs, line breaks, etc.,
    But, after data merging, it ignores page breaks and only merges the first paragraph of each letter. (sigh)
    Solution? Hopefully, an EASY solution. lol as we have thousands of records.
    Is there a third party indesign plugin that will allow .xml, or .xls data merge import??
    Thx,
    DJ

  • I need to delete all my pictures off of my iPhone because I have run out of storage.  I have downloaded all pics to my mac but is my entire camera roll backed up on iCloud as well? I just want to make sure before I delete them from the phone.

    I need to delete all my photos off my iphone because I have run out of local storage.  I have synced with my Mac but also wanted online backup.  Are all my photos from the camera roll uploaded to iCloud?  I just want to make sure I can retrieve them after I erase from the phone and in case my Mac crashes.

    Import photos through iPhoto. (You will prompt to delete from iPhone when import competes).
    Backup your Mac. (At least the iPhoto Library)
    Backup to iTunes.
    Backup to iCloud. (Check in Settings>iCloud>Storage and Backup>Manage Storage>your device name>Camera Roll ON).

  • Can i scan my mcbook pro? how? i just want to make sure it is still free form viruses.

    can i scan my mcbook pro? how? i just want to make sure it is still free form viruses.

    Yes. Download and use ClamXav or Sophos.
    (80264)

  • Is this good usage? i just want to make sure

    i just want to make sure if this is good usage or avreage usage?
    i do want to note that i have been using my iphone none stop since i unplugged it.
    these are the apps ive been on
    messages < alot of this
    Kik < alot of this aswell not much
    facebook < some not much
    instagram < some not much
    app store < once the whole day
    pandora < minimal
    camera < once or twice barley
    apps open are only messages and kik the rest i have them closed

    There is no such thing as "good" or "average" usage.
    Does the battery life meet your needs, if it does, dont' worry about it.
    If it doesn't, a search of the forums will reveal dozens if not hundreds of postings about battery life.

  • I just want to make it go back to spry tabs default like when I started.

    I am new with spry tabs and I was messing around with the css changing things " this is how I learn trial and error" well I clicked something and it messed up my tabs and so I though no prob I will just start over but when I go to put the spry tabs in default it stays with the error it wont revert to default tabs. I just want to make it go back to like when I started.

    I don't understand, DWCC 2014 doesn't have Spry in it.
    Spry was abandoned by Adobe in 2012.
    Are you talking about the jQuery UI Tabs in DWCC 2014?

  • I just want to make a genius bar appointment!

    I hate this new interface! I just want to make a genius bar appointment and they have made it so dang difficult if not nearly impossible. I don't want to wait on the phone for an hour to talk to someone and I don't want to talk to someone on the phone! I just want to make an appointment at the store!!!!!!

    Go to: http://www.apple.com/retail/storelist/.  Click the store you want, then on Genius bar and you can make an appointment that way.

  • I imported a 17' MiniDV piece into iMovie and it's lost synch. How can that be? I have done no editing, I just want to make it into a DVD.

    imported a 17' MiniDV piece into iMovie and it's lost synch. How can that be? I have done no editing, I just want to make it into a DVD.

    Hi
    Do You mean miniDV tape (interlaced video PAL or NTSC) ?
    If so - iMovie'08 or 09 or 11 - are not tools of Choise if You want a DVD as result - They all discards every second line resulting in less quality.
    Sync. Problem - If miniDV tape - How was it recorded -
    Audio mode - Is Camera set to record in 12-bit 32kHz - Should be 16-bit 48kHz
    Recording mode - SP (60 min on a 60 min tape) or LP (90 min on 60 min tape)
    If LP-mode - Then You need - Same Camera as recorded - tolerances is to small even for a Camera of same brand and type to play-back.
    I would use FinalCut Express and a setting of PAL/N TSC and 32kHz audio if Camera is set to record in 12-bit
    If LP-mode - iMovie HD6 is more tolerant in Captuing than FinalCut and Imediatly after Import/Capture - Extract Audio
    And set iM HD6 to NOT IMPORT AS INDIVIDUAL Clips - to many drop outs to work.
    Yours Wildly Guessing Bengt W

  • Just got a new 80gb ipod Just want to make sure its suposed to do this(help

    ok so i was at the movies last night and i turned my ipod off by holding the play button and it turned off like it has before but before it would turn right on
    and when i turned it on today i saw an apple logo
    is it ok
    its my first ipod just want to make sure its fine
    thanks

    After 14 hours of inactivity your iPod goes into hibernation. It's nothing to worry about. Also see this article: http://docs.info.apple.com/article.html?artnum=60945

  • "C" drive & Profile crash-so all attachments are in crashed profile? Just want to make sure?

    1-had C drive crash a few days ago and am rebuilding on new C drive > NEW copy of TB 24.6.0
    2-Had Local Folders on a separate drive > in Tools – Account Settings – Local Folders > set to previous location
    3-After studying many support responses is it correct that the actual attachments are still in the Profile on the crashed "C" drive?
    4-Searched all drives on "new" system and found no "Profile" or "*.mbox" files - where are they?
    Just want to make sure cause the mozmsgs/wdseml on the "separate drive" only have message text when imported. If this is TRUE then I've got to focus my effort on recovering the Profile from the crashed disk. Yes, I did not have a backup - my bad for sure.
    Thank you,
    Tom

    In Thunderbird, messages are stored as they are received, along with all headers and all attachments.
    In your profile, there will be folders with no extension, such as ''Inbox''. These are mailbox files. Each has an accompanying index file, in this example ''Inbox.msf''. You don't need the msf files.
    The profile folder is hidden, so to find it you'll need to enable displaying of hidden files.
    mozmsgs is provided just to make the message contents available to Windows' searching mechanisms, so these files are not important to your restoration task.
    I really don't like the business of setting mail account folder locations using the Local Directory option. It removes the particular folder from your profile and makes maintenance very much harder, since now only ''you'' will know where the re-located data lives. None of the usual techniques or tools for working with profiles will work with the detached data.

  • Can you make a 'pie chart' with Lingo ?  or Java

    Question pretty much like the subject above says. Just a basic pie chart from two numbers
    Alright, I want a pie chart to give a visual of a percentage.  The percentage would be a value of 1-100 in a field cast member

    I do hope you realise that it takes more than two numbers (or one single value from a #field member, as you've supplied) to display anything representing a pie chart. For example what exactly to you want that #field value to represent? Radius? Circumference? Portion of 100%?, etc... And what is this mysterious 2nd number you hint at, but do not define?
    Please understand that while nobody would deny the integrity of any of Valentin's scripts/Xtras, you surely know that it takes much more than two numbers to represent a pie chart - or even a single slice of a given pie chart.
    But, I'll bet that his class can get you there. Just wanting you to think about what you are asking for here.
    BTW, what on earth does Java have to do with your question? Were you thinking about JavaScript when you typed the subject? You are aware that Java <> JavaScript (or even EMCA syntax), right? Were you serious about Java?
    Not a slam, just wanting you to think out loud.
    Mark "Cheers II, SD" Boyd
    Keep-On-Learnin' :-)
    .sigFile addressed at myself, but if the shoe fits...

  • PSE 10 Can't edit read-only layer groups (a.k.a.  I just want to make a custom DVD menu in Elements)

    A little background: I wanted to make a custom menu so I opened a copy of one of the canned menu.PSD files in PS Elements 10.  It opened up with all layers and their sublayers showing.  So far, so good.  I did a bunch of editting and had my menu just about right, saved it and burned a DVD with it.  I saw some corrections that I needed to make so I opened the same .PSD file and it showed all the main layers (with the folder icon) but not the attached layers. 
    I double-clicked to open these layers and got:
    "You are attempting to open a group, which is not supported in Photoshop Elements.  The layers in this group will be simplified into a single layer.  Simplify the layers? Yes No."
    I was just editing these things the day before yesterday.  All I've done since then is register my software online. I have seen it stated in this forum that "Elements doesn't support layer group/sets" but it was referring to an earlier version I'm guessing.
    Question 1:  Is this still true of PSE 10?
    Question 2:  If so, how was I editing them the other day? 
    Thanks in advance for any help you can offer.
    Joe

    If you haven't uninstalled premiere elements then it should work, but there are a few things that will not work when editing the dvd templates:
    (it only works on certain dvd templates and only on a machine with premiere elements installed)
    *If you change the document dimensions either larger or smaller. (not the size of the elements in the template but the overall size such as using
    Image>Resize>Image Size or Canvas Size)
    *If you delete any of the layer groups
    *Changing the name of the document
    There are probably other causes and they may know more on the premiere elements forum:
    http://forums.adobe.com/community/premiere_elements?view=discussions
    MTSTUNER

  • I just want to make a call to a contact, after log...

    How do I get from my log in on Skype.com, to my Skype contacts , videophone etc. All I want to do is make a phone call, after logging on to Skype .com! I don't want wifi, etc., BS! I just want to go from Skype.com, to my contacts list

    Download and install Skype program on your computer.
    http://www.skype.com/en/download-skype/

  • Need help to make a Pie Chart

    I am trying to draw a pie chart for the Uptime Report.
    I have the Following table definition.
    create table downtime_detail ( env_code number, down_start date, down_end date );
    insert into downtime_detail values (1,to_date('26-JAN-2008 02:00:00','DD-MON-YYYY HH24:MI:SS'),to_date('26-JAN-2008 03:00:00','DD-MON-YYYY HH24:MI:SS') );
    insert into downtime_detail values (2,to_date('26-JAN-2008 02:00:00','DD-MON-YYYY HH24:MI:SS'),to_date('26-JAN-2008 03:00:00','DD-MON-YYYY HH24:MI:SS') );
    insert into downtime_detail values (2,to_date('01-FEB-2008 02:00:00','DD-MON-YYYY HH24:MI:SS'),to_date('03-FEB-2008 03:00:00','DD-MON-YYYY HH24:MI:SS') );
    insert into downtime_detail values (2,to_date('15-FEB-2008 02:00:00','DD-MON-YYYY HH24:MI:SS'),to_date('15-FEB-2008 03:00:00','DD-MON-YYYY HH24:MI:SS') );
    insert into downtime_detail values (2,to_date('26-FEB-2008 02:00:00','DD-MON-YYYY HH24:MI:SS'),to_date('28-FEB-2008 03:00:00','DD-MON-YYYY HH24:MI:SS') );
    Now the Below Query returns me the values val1 and val2 on the basis of which I need to draw a Pie Chart.
    ==========================================================
    select round((DOWN/TOTAL)*100,2) val1 , round(100-((DOWN/TOTAL)*100),2) val2
    from
         (select sum((DOWN_END - DOWN_START)*24) DOWN from DOWNTIME_DETAIL where ENV_CODE=2 ) a ,
         (select ((sysdate - to_date('01-JAN-2008','DD-MON-YYYY')) * 24) TOTAL from dual ) b
    VAL1 VAL2
    3.64 96.36
    ==========================================================
    Can someone help me try do this ?
    Actually I tried but I couldnt put my custom query to get this Pie chart. Or if there is any other better approach please let me know.

    nikhilskamik,
    I believe all that you are missing in your sql is a NULL. Below is the help text for creating a Flash pie chart.
    Specify the SQL query that will populate your chart, for example:
    select null, ename, sal
    from emp
    Alternatively you can write a PL/SQL function return a SQL query, for example:
    begin
    return 'select null, ename, sal from emp';
    end;
    Your query should then read:
    select null,round((DOWN/TOTAL)*100,2) val1 , round(100-((DOWN/TOTAL)*100),2) val2
    from
    (select sum((DOWN_END - DOWN_START)*24) DOWN from DOWNTIME_DETAIL where ENV_CODE=2 ) a ,
    (select ((sysdate - to_date('01-JAN-2008','DD-MON-YYYY')) * 24) TOTAL from dual ) b
    Jeff

Maybe you are looking for

  • Replaced hard drive in dv6 but doesn't complete installati​on phase

    I replaced my hard drive with one of the disks recommended by an HP expert in this forum, and it seemed to go well. After booting with my #1 recovery disc and loading each one when prompted, I got the final prompt/message: "Recovery Preparation is co

  • Firefox 29 crashes on Solaris 10

    I recently downloaded both the "pkg" and "tar" packages for Firefox 29 for Solaris 10 from "http://download-origin.cdn.mozilla.net/pub/mozilla.org/firefox/releases/29.0/contrib/". On two different Solaris 10 servers after either install, I find that

  • Each message shows same date and time for sent and received.

    Each of the thousands of messages in Mail shows that the message was sent and received at the same time. Somehow, Mail is displaying incorrect information. In other words, the "date sent" and "date received" columns are identical. What can I do to Ma

  • Which computer sets the time stamp of a shared variable?

    Which computer sets the time stamp of a shared variable? The computer that hosts the variable or the computer writing the variable? (This is important when the system clocks differ.) Greetings, shb Solved! Go to Solution.

  • Unable to create JAR in eclipse

    Hello everyone, I am using eclipse 3.2 . I am new to eclipse. I created a swing application which uses an external jar file. I added the external jar file in ProjectProperties-->JavaBuildPath-->Add JARs.. The external jar file is inside the project f