Why cant I draw an ellipse ontop of a MemoryImageSource?

Hi,
I'm using MemoryImageSource source to animate a background, but I want to draw some shapes on top. Below is my update() method, and I try to draw an ellipse, and it simply doesn't show up. Why is this? How can I draw on top of this screen?
public void update(Graphics g) {
source.newPixels(); //Source is of type MemoryImageSource
g.drawImage(img, 0, 0, width, height, null); // img was constructed from MemoryImageSource
g.setColor(Color.GREEN);
g.fillOval(20, 20, 10,10); //Not displayed?
Cheers,
Lloyd

Sorry, I could draw an ellipse it just wasn't visible on screen due to the co-ordinates!

Similar Messages

  • Why cant I draw an ellipse?

    Hi,
    I'm using MemoryImageSource source to animate a background, but I want to draw some shapes on top. Below is my update() method, and I try to draw an ellipse, and it simply doesn't show up. Why is this? How can I draw on top of this screen?
    public void update(Graphics g) {
    source.newPixels(); //Source is of type MemoryImageSource
    g.drawImage(img, 0, 0, width, height, null); // img was constructed from MemoryImageSource
    g.setColor(Color.GREEN);
    g.fillOval(20, 20, 10,10); //Not displayed?
    Cheers,
    Lloyd

    Sorry, I could draw an ellipse it just wasn't visible on screen due to the co-ordinates!

  • Why cant I add contacts on the iphone4? the mail contacts calendars button unders settings, the contacts button, the add a contacts button under message and the phone button will not work to add a contact.

    Why cant I add contacts on the iphone4? the mail contacts calendars button unders settings, the contacts button, the add a contacts button under message and the phone button will not work to add a contact.

    Have you attempted a restore?

  • HT1399 Why cant I create a playlist for my music/song videos? Continuous play is also not possible in the video app on the phone!!!! previously, prior to IOS 6, it was possible to have both music videos & songs mixed in the same playlist in the music app

    Why cant I create a playlist for my music/song videos? Continuous play is also not possible in the video app on the phone!!!! previously, prior to IOS 6, it was possible to have both music videos & songs mixed in the same playlist in the music app

    I am back with an update. I turned off Match on both the ipad and the iphone 5. By doing so I was able to sync my Iphone and ipad to itunes and store the music on my devices rather than the slow streaming.  So far this has fixed my problems with the iphone I have all my music, playlist, most of the album art and so on.  But the ipad is a different story.  I have the music and artist but not one playlist  I am sure Apple will have an upgrade soon that will address these issues they are usually very good about this. 
    Now have any of you experienced another problem that has existed as long as I have used faces in Aperture.
    I have over 200 faces and they are organized a-z problem is I have this going on A-Z folowed by a few that start over A-Z followed by another few A-Z and again a 4th time A-Z.  Imagine how difficult it is while I am showing someone the great features of my iphone, ipad and imac.  Which I do talk highly of all the time.  But how do I explain that even though their name starts with a or b or what ever they are not important enough to me to be in the first list of A-Z or even the 2nd or 3rd list of A-Z someohow they are in the 4th section of the list!!!!
    I have managed to get the Imac to fix this but for some reason the IOS devices do not.   Any ideas?
    Thanks Al

  • When i Log into instagram it say my account  is disable but when i log in on another iphone my instagram account log's in. when i try logging into another account it continue to say disable. Why cant i log into instagram or make another one on my iphone?

    When i Log into instagram it say my account  is disable but when i log in on another iphone my instagram account log's in. When i try logging into another account on my phone it continue to say disable. i also tried to make a new instagram on my phone but it wont let me. i deleted the app over and over again but it still wont let me log into any instagram account. Why cant i log into instagram or make another one on my iphone?
    Is is=t possable to have your phone banned from a app forever???
    HELP !!

    I just asked the same thing and did some research. Some people have said  that the UDID code is like banned from instagram, but your account isn't. I'm able to use it on my phone but not on my iPod.

  • How to develop/print a report wider than 8.5 inches, why cant we landscape

    Hi All Gurus,
    I am new to Oracle Reports. I have a problem, I have a report that has rows longer than normal A4, A5, A6 paper width, so report lines either tend to go on next page or on next line of the same page. Also Oracle Report is not allowing me to print report in landscape mode, why this limitation ? I am wondering, cuz in older character based tools (Foxpro, Informix-4GL), we could easily print wider reports on a line printer which always had a capacity of 132 characters (and in condensed mode, 224 characters). So only small (and very simple) reports were printed on regular paper of 80 characters (8.5 inches wide), but for almost all real use reports we were able to use 132 (224 in condensed) characters paper.
    How can we do this ith Oracle GUI report builder?. Why are we limited to 80 character paper size? why cant we print report in landscape mode? It is not, in any case, allowing me columns that go beyond 80 characters (8.5 inches) on a line. If this is an Oracle limitation, I would say Oracle Reports cannot be used for actual reporting, it is just a fancy with GUI and colors!!!!!
    Can anybody answer my questions? please tell me an immediate solution.
    Thanks in Advance

    You can go to Object Navigator, under Layout Model, click the Main Section icon to open the property, change to Width from 8.5 to 11 and Height from 11 to 8.5. Do the same for Header/Trailer Sections if needed.
    At report printing, choose Landscape Orientation.
    DC

  • HT1725 Why cant download from apple store? "There was an error in the App Store. Please try again later. (100)"

    Why cant i download application from apple store, they said :There was an error in the App Store. Please try again later. (100) and they suggest : Contact iTunes Support at http://www.apple.com/uk/support/itunes/ for assistance. pls help me

    Why cant i download application from apple store, they said :There was an error in the App Store. Please try again later. (100) and they suggest : Contact iTunes Support at http://www.apple.com/uk/support/itunes/ for assistance. pls help me

  • Why cant i download all of the itunes songs off my wifes purchased itunes account when using the family sharing? some songs i can and some it wont let me

    why cant i download all of the itunes songs off my wifes purchased itunes account when using the family sharing? some songs i can and some it wont let me

    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                          
    If recovery mode does not work try DFU mode.                         
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings         
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: How to back up
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • Why cant i have more than one movie at a time

    why cant i have more than one movie at one time

    It may be how much space is available on your iPad. The average movie is around 2.5 gigabytes. If you reach your space limit then you can't download anything until you clear space.

  • HT201343 My MBP is Early 2011 but dunno why cant use mirroring with apple TV, the icon cannot be found

    My MBP is Early 2011 but dunno why cant use mirroring with apple TV, the icon cannot be found. So cannot use mirroring.
    I have follow trouble shooting , they recommend to go system preference -> display , thus can find out the mirroring icon if no mean it doesnt support. But according to the web, Early 2011 MBP should be able to use, dunno why.

    Just realise I havent updated my OS to mountain lion and this is the reason why I cannot use mirroring before ^^
    Thanks all

  • I have $51.95 dollars in creidt, why cant I buy any music?? Whats going on

    What is going on?. I have $51.95 in credit ..Why cant I buy any music..And what about the money I have in credit. I only use this as my computer at home. I dont have a moblie!!.. I'm sick of this

    Perhpas if you were to explain why you can't buy, then someone could help.
    What happens when you try?

  • Why cant I call a getResultSet method more than 1

    Why cant I call the getRSS method more than 1 time from my page?
    I have a class called methods class, here is the code:
    public class methodsClass {
        public java.sql.Connection objConn = null;
        public String query = null;
        public java.sql.PreparedStatement statement = null;
        public java.sql.ResultSet objRS = null;
        /** Creates a new instance of methodsClass */
        public methodsClass() {}
         public ResultSet getRSS(String sql)
            String strSQL = sql;
            try
                Class.forName("oracle.jdbc.driver.OracleDriver");
                objConn = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:CCD","system", "Abcd1234");
                statement = objConn.prepareStatement(strSQL,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
                objRS = statement.executeQuery();
            catch (Exception e)
                System.err.println("Error in getRSS method");
                e.printStackTrace();
            return objRS;
        public void killConn()
            try
                    objRS.close();
                    System.out.println("Resultset is closed");
                    statement.close();
                    System.out.println("Statement is closed");
                    objConn.close();
                    System.out.println("Connection is closed");
                catch(Exception e)
                System.err.print("Unable to kill all objects");
                e.printStackTrace();
    //END OF CLASS***************************************** I call the method from the following jsp:
    <%
    String eqCat = "Tracked Vehicle";
    String strSQL = "SELECT DISTINCT * FROM robert WHERE eqcategory = '"+eqCat+"'";
    methodsClass mc = new methodsClass();
    ResultSet objRS = mc.getRSS(strSQL);
    java.lang.System.out.println(strSQL);
    %>
         <select name="selectBox">
         <% while(objRS.next()){
             out.println("<option value='"+objRS.getString("eqtype")+"'>"+objRS.getString("eqtype")+"</option>");
               mc.killConn();
    %> The above works fine.
    If I try to call the getRSS function again on this page I get the following error:javax.servlet.ServletException: Exhausted Resultset
    I tried to call it like so:
    newNameSQL = "Select * from robert where eqtypes = 'someVariable'";
    newNameRS = mc.getRSS(strSQL);
    <%=newNameRSS.getString("something");%>I cant understand why I get this error, I am closing the rs,conn and statement in the killConn method.
    TIA!

    I did that but still the same error. The problem is when I attempt to open up another resultset on the same page I get the Exhausted ResultSet error. I have even eliminated the class file altogether by doing this:
      String eqCat = "Tracked Vehicle";
      String strSQL = "SELECT DISTINCT eqtype FROM robert WHERE eqcategory = '"+eqCat+"'";
      Class.forName("oracle.jdbc.driver.OracleDriver");
      Connection objConn = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:CCD","system", "Abcd1234");
      PreparedStatement statement = objConn.prepareStatement(strSQL,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
      ResultSet objRS = statement.executeQuery();
      System.out.println(strSQL);
    //The above works fine and then below I add this and the error comes back
         <select name="cs_popup_name_1" onchange="CSURLPopupShow(/*CMP*/'cs_form_name_1', /*CMP*/'cs_popup_name_1', 'Main');">
         <% while(objRS.next()){
            String eq = objRS.getString("eqtype");
             out.println("<option value='"+eq+"'>"+eq+"</option>");
    objRS.close();
    objConn.close();
    statement = null;
    strSQL = null;
    strSQL = "SELECT * FROM robert";
      Class.forName("oracle.jdbc.driver.OracleDriver");
      objConn = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:CCD","system", "Abcd1234");
      statement = objConn.prepareStatement(strSQL,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
      ResultSet rs = statement.executeQuery();
      System.out.println(strSQL);
    //If I leave the field below commented out I get no errors, but if I comment it out I get the error
    <a href="#" onmouseover="showImg('<%=rs.getString("img1")%>')">                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Itunes says that the version of software on my ipod touch 3rd gen is up to date, but IOS 5 is avaliable. I have checked for software updates for days but it keeps saying that 4.2.1 is the current version. Why cant i get IOS 5?

    itunes says that the version of software on my ipod touch 3rd gen is up to date, but IOS 5 is avaliable. I have checked for software updates for days but it keeps saying that 4.2.1 is the current version. Why cant i get IOS 5?

    bradenfromwaikerie wrote:
    itunes says that the version of software on my ipod touch 3rd gen is up to date, but IOS 5 is avaliable. I have checked for software updates for days but it keeps saying that 4.2.1 is the current version. Why cant i get IOS 5?
    because you do not have a 3rd generation device. The OS Version says so , otherwise you would be at 4.3.5 minimum and also Itunes is also always correct in determining if you have the latest OS ( if not it fetches the newest from Apple's Servers ) . And because a 2nd generation iPod stops at 4.2.1 you can't get the newest OS, because your device is old. Buy a new iPod , they have iOS5 preinstalled.

  • Why cant i print from my ipad using airport express but i can print from my mac using the express

    why cant i print from my ipad using airport express but i can print from my mac using the express

    Because your printer has to be Airprint compatible and connected to WiFi. There are applications, such as Printopia, that will allow you to print through your computer.

  • Why cant itunes download songs from itunestore to my pc,windows seven,error msg says problem with connectivity,however the internet connection is working fine?

    why cant itunes download songs from the itunestore,the download fails and thr error msg says check your connectivity,however the internet is connected and working fine.I did reinstall itunes

    I have the same issue...I called Adobe and they said that Acrobat 8 is not compatible with Windows 7 ...so I tried installing the suite again without Acrobat and still the same issue....does anyone know if this issue is resolved by getting the new CS5 suite??? That is my only option it seems like...no one knows what's going on with the internet issue....even Adobe
    HELP

Maybe you are looking for

  • Messages not getting propagated?

    I'm using CDC and streams - distributed async auto-log. Things have been working fine for a while. We had a DB crash due to a bad disk and I rebuilt the DB. We had a major gap in our data and getting streams to work again has been hell. I'm seeing th

  • Want to allow designated clients to upload pdf files to a designated page on my cs4 website

    want to allow designated clients to upload pdf files to a designated page on my cs4 website. want those files to be live on that page when their upload is complete. this is so I dont have to receive their file and upload it myself. appreaciate the he

  • Quicktime hangs on download page.

    I just reinstalled my OS (XP Pro). I am trying to reinstall Quicktime. I go to the Quicktime homepage, then click on download. Several moments after this, the page stops responding and I have to go into Windows Task Manager in order to force shutdown

  • Dreamweaver crashing on OSX Lion

    Hello, I have had problems with DW crashing. I have tried a fresh install, without any 3rd party extensions or plugins and it is still crashing. Below is the crash dump. Process:         Dreamweaver [167] Path:            /Applications/Adobe Dreamwea

  • Strange RAW processing problem

    I've just jumped into the Mac world recently with a Mac Pro (which I absolutely love). I've been watching Aperture since it was announced. A friend of mine has been using it for a while. He has Cannon cameras and so he is golden. However, I was playi