Can someone help me with this error message?

I am very new to java and I am trying to write a memory game but, when I try to compile I get this message
incompatible types
java.awt.Image
required int
my code is below:
import java.applet.*;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.JOptionPane;
public class mem1 extends JApplet
int CardPlace[];
int CardFace[];
Image img1;
Image img2;
Image img3;
Image CardBack;
private int mX = 0;
private int mY = 0;
boolean turned;
int flip = 0;
int pos;
int Position;
public void init()
int choice;
int cd1=0;
int cd2=0;
int cd3=0;
int counter=0;
CardPlace=new int[6];
CardFace=new int[6];
cd1 = getImage(getDocumentBase(),"Heart.gif");
cd2 = getImage(getDocumentBase(),"Happy.gif");
cd3 = getImage(getDocumentBase(),"Phone.gif");
CardBack = getImage(getDocumentBase(),"safari.gif");
while (counter<6)
choice = 1 + (int)(Math.random() * 3);
     switch(choice)
     case 1:
          if(cd1<2)
          { CardPlace[counter] = 1;
          counter++;
          cd1++;
          break;
          case 2:
          if(cd2<2)
          { CardPlace[counter] = 2;
          counter++;
          cd2++;
          break;
          case 3:
          if(cd3<2)
          { CardPlace[counter] = 3;
          counter++;
          cd3++;
          break;
addMouseListener(new MouseHandler());
public void paint(Graphics g)
int xposition = 0;
int yposition = 0;
int i = 0;
turned = false;
if ((mX>=0 && mX < 150) && (mY >=0 && mY<150))
Position = 0;
else if((mX >150 && mX < 300) && (mY>=0 && mY < 150))
          Position = 1;
     else if((mX >=300 && mX < 450) && (mY>=0 && mY < 150))
          Position = 2;
     else if((mX >=0 && mX < 150) && (mY>=150 && mY < 300))
          Position = 3;
     else if((mX >150 && mX < 300) && (mY>=150 && mY < 300))
          Position = 4;
     else if((mX >300 && mX < 450) && (mY>=150 && mY < 300))
          Position = 5;
CardFace[Position]=CardPlace[Position];
if (flip == 0)
     flip = Position;
else if(flip != Position)
     if(CardFace[flip] != CardFace[Position])
     CardFace[flip]=0;
     CardFace[Position]=0;
     flip = 0;
while (i<6)
if (xposition==450)
yposition=150;
xposition = 0;
switch(CardFace){
case 0:
g.drawImage(CardBack, xposition, yposition, this);
break;
case 1:
g.drawImage(img1,xposition,yposition,this);
break;
case 2:
g.drawImage(img2,xposition,yposition, this);
break;
case 3:
g.drawImage(img3,xposition,yposition,this);
break;
xposition = xposition + 150;
i++;
private class MouseHandler extends MouseAdapter
public void mousePressed(MouseEvent evt)
mX = evt.getX();
mY = evt.getY();
turned = true;
repaint();

Hi,
Can u indicate the exact lines in which the
error message is thrown.
Raja

Similar Messages

  • Can anyone help me with this error message?

    I managed to succesfully transfer files from my old iMac G3 to my new iMac G5 using a crossover ethernet cable. I connected from the G5 to the G3.
    BUT, when I start my G5 I now get the following message
    Connection failed. The server may not exist or is not operational at this time.
    It's not causing any problems just annoying. Is the G5 looking for itself perhaps? Can someone help me?

    Take a look at System Preferences, Accounts, Startup Items to see if the G3 got added to the list.

  • Can anybody help me with this error message I keep getting

    When I try to export my document as a pdf I keep getting this error message...  "The document “Client Invoice_TMC copy” could not be exported as...."

    What version of Numbers?What version of Mac OS X?
    Have you tried restarting Numbers?
    Have you tried restarting your computer?
    Can you export other documents to pdf?
    Have you tried printing the docmment to pdf using the built-in print dialog?  To do this select the menu item "File > Print", then click the print button, then select the "Open in Preview" select from the PDF button in the bottom left corner:

  • Can anyone help me with this error message? I have run a permissions repair but it didn't solve the problem.

    No permissions to write to /System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/Home/lib/ext
    This is the error message I get when trying to update a 3D viewer plugin for the IMAGE J (FIJI) software. This is a brand new system running Mountain Lion 10.8.2. has anyone else gotten this error message, and could you give me any advice?
    Thanks
    Leah

    You need root privileges to modify that system folder. Actually, it shouldn't be modified at all, except by Apple. Whatever installer you're using is defective.

  • Can someone help me with this Error ?

    When I start up my Thinkpad 600E it shows 301 on the first screen and then it goes to the diagnostic/Test screen.
    I run a test on the system board and it comes up with this :
    FRU 0086
                 22
             0010
    I know that there is some issue with the Harddisk. The trackpoint is broke so I have disabled and use an external mouse.
    When I do the keyboard test, the key for F8 keeps blinking (even without pressing it). Could this be an issue ? Is there a work around like disabling the keyboard and using an external one ?
    Or could it be because of the hard disk ?
    Pls help
    Thanks
    Alex

    Is your datacontrol being called? I'd pad it with logs and see if maybe that's throwing an exception and causing a jsf error stack to be generated.

  • Can someone help me with this error i keep geting?

    hello, ive been using photoshop for a while and then today i try to open it ad get this error:
    can anyone help me?

    Is there any chance you've copied plug-ins or any other components from an older version of Photoshop into your current installation?
    Do you have 3rd party plug-ins installed, and have you made a change in plug-ins recently?
    It might be helpful if you'd go into Help - System Info, copy that data, and paste it in a post here.
    -Noel

  • HT201210 Can someone help me with an error message I get when updating to itunes version 6?

    I get the error message 'itunes could not back up the iphone because the back up was corrupt or not compatible with the iphone' when trying to update my iphone 4 to itunes v6.0.
    What do I do?
    HELP!
    Thank you

    Read http://www.justanswer.com/cell-phones/6izkg-restore-corrupted-iphone-backup-file .html

  • Can someone help me with this error 2001 problem ?

    i have a problem with my iphone 4s that my doesnt work at all unless i plug it to  the charger cable, and then once i plug it, it shows on the screen that the battery is 100%  and i cant turn on the wifi. Once i unplug the cable the iphone turns off immedately! so i tried to restore my iphone, and then when i try to restore it, it says that there is an error called "2001".. so what should i do ?? thanks.

    Hi Randomkilla,
    If you are getting a 2001 error when trying to restore you iPhone, you may find the troubleshooting in the following article helpful:
    Apple Support: Resolve specific iTunes update and restore errors
    http://support.apple.com/kb/TS3694
    Regards,
    - Brenden

  • Can someone help me decode this error message.

    Error: 500
    Location: /MonteCarlo/jsp/monte.jsp
    Internal Servlet Error:
    javax.servlet.ServletException
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:386)
         at jsp._0002fjsp_0002fmonte_0002ejspmonte_jsp_1._jspService(_0002fjsp_0002fmonte_0002ejspmonte_jsp_1.java:121)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174)
         at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
         at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
         at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
         at java.lang.Thread.run(Thread.java:484)
    Root cause:
    java.lang.NullPointerException
         at MonteCarlo.createBuckets(MonteCarlo.java:64)
         at jsp._0002fjsp_0002fmonte_0002ejspmonte_jsp_1._jspService(_0002fjsp_0002fmonte_0002ejspmonte_jsp_1.java:90)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174)
         at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
         at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
         at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
         at java.lang.Thread.run(Thread.java:484)

    You have something like the following line (obviously since I don't have your code I made something up.)
    xxx.getStuff(other.myMethod(myString));
    You need to modify it to look like this
    if (myString == null) System.out.println("MyString is null");
    if (other == null) System.out.println("other is null");
    if (xxx == null) System.out.println("xxx is null");
    xxx.getStuff(other.myMethod(myString));
    Keep adding if/thens and println() until you figure what object is null.

  • I have iOS 7. When I go to the itunes store on my ipod touch it gives me a blank screen with nothing on it. I restarted my ipod touch and it didn't work. Can someone help me with this?

    I have iOS 7. When I go to the itunes store on my ipod touch it gives me a blank screen with nothing on it. I restarted my ipod touch and it didn't work. Can someone help me with this?

    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Go to Settings>iTunes and App stores and sign out and sign back in
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                                                                
    - Restore to factory settings/new iOS device.      

  • The calender on my iPhone 4 with iOS 6 no longer syncs with iCal 4.0.4 on my mac OS 10.6.8. However it is syncing with my iCloud account. Can someone help me with this?

    The calender on my iPhone 4 with iOS 6 no longer syncs with iCal 4.0.4 on my mac OS 10.6.8. However it is syncing with my iCloud account. Can someone help me with this?

    FYI: It seems it was a network problem with my WinXP PC. After complete deletion and new installation of XP and iTunes my iPhone will be recognized correctly, Wifi synchronization works (mostly) fine.

  • I have a problem with my blackberry 9360, I bought it last 2months, and now when I use video camera or camera I saw a red and blue line. Can someone help me with this issue?

    I have a problem with my blackberry 9360, I bought it last 2months, and now when I use video camera or camera I saw a red and blue line. Can someone help me with this issue?

    Hello zukafu, 
    Welcome to the forums. 
    In this case we can try to reload the software on the BlackBerry® smartphone to make sure it is running the latest version and there are no issues with the OS.
    Here is how to backup your BlackBerry smartphone http://bbry.lv/oPVWXc
    Once you have backed up your BlackBerry smartphone please follow the link below to complete a clean reload of the BlackBerry smartphone software.
    Link: http://www.blackberry.com/btsc/KB03621
    Once completed test it and proceed with a selective restore, here is how to restore http://bbry.lv/qgQxLo
    Thank you
    -SR
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • HT5655 I followed all the instructions to update Flash Player, but the installation fails at around 90%, it says that there is an Application running (Safari) bit I actually close all Apps. already. can someone help me with this issue ?? Thanks

    I have followed the instructions to update Flash Player, the Installation Fails at about 90%, it says that there is an Application running (Safari) and it says to close all the apps. and start again ... but I already close all the Applications ... none is running ... can someone help me with this issue ??? Thanks ...

    Dear Dominic
    Brilliant reply. Simple English. Simple to follow instructions. And it worked immediately, first time.
    Why couldn't the Apple and Adobe corporations get their programming right first time? We spend billions of UK pounds and US dollars with them. They reply with incompetent programming such as this, and arrogance to their customers in issuing faulty systems without doing the most rudimentary checks.
    Anyway, I certainly shan't be buying another Apple as this is the most unreliable, most incomprehensible, most illogical and downright thoughtless shoddy piece of computer kit which I have ever owned. And all of it is rubbish ~ emails disappear, photos can't be organised properly, spreadsheets don't work, Pages is laborious… the list goes on and on...
    But thanks to you Dominic, I have been able to load Adoble Flashj… maybe eyou should get  a job at Apple, and set them all on the right course to how to work simply and correctly with customers.
    Thanks again,
    David

  • After the OS 6 update my speaker does not work. My music plays but no sound comes out. Can someone help me with this issue? I currently have the 4S.

    After the OS 6 update my speaker does not work. Volume control on the side does not adjust the volume either. My music plays but no sound comes out. Can someone help me with this issue? I've tried rebooting my phone but still no sound comes out. I currently have the 4S.

    try to activate and desactivate the airplne switch a couple of time

  • Can someone help me with this 201435 Error during Signal Express signal generating?

    I built this signal generation tast to generate a voltage waveform. The wave form is loaded from a lvm file. (as shown in attachment pic). The waveform can be correctly viewed in preview window, so i suppose nothing wrong with the file. but when i clkick the run button, error 201435 pops up, tell me "no samples provided to DAQmx Write to initialize buffered generation".
    i dont know what step do i missed in this task. can anyone help me with this problem?

    the attachment picture
    Attachments:
    task.PNG ‏9 KB

Maybe you are looking for

  • Error to install Add-On BI Content (TCode SAINT)

    I am trying to install "BI Content" from Tx SAINT but I get the following message The installation was stopped, since an error occurred during the phase CHECK_REQUIREMENTS, which the Add-On Installation Tool is unable to resolve without your input. A

  • Sales employee wise report

    Hi, I need a report to see total sales by sales employee wise. We are using HR module and I am able to select sales employee in my sales order from the HR master. However when I run the report MCTI, I am not able to select the sales employee (no drop

  • Using files stored on remote web server/cdn as content repository

    Hello, Is it possible to create a document/asset in WCC that does not have it's physical file stored within the local file system/database but instead is stored in a CDN? We want to develop a system whereby files that are stored in a CDN are searchab

  • Symbian Belle update bug

    I have problem with my N8 software after update to Belle. My software somethimes totaly frozen. I can not do something with my phone at frozen time. I can just wait to empty battery. Have you some idea  How to fix it? Thanks Honza

  • MBAM Options for Non TPM Machines

    Hi there, We have just installed MBAM 2.5. We also have SCCM 2012 R2 in our environment. We are looking to use Bitlocker on around 500 laptops which are currently a mixture of Windows 7 and Windows 8.1 but with no TPM. (we should begin receiving TPM