Cant include picture in JButton

I wish to show a picture from this line instead of a yellow background !
if(plateau[j] == 0) terrainDeJeu.getComponent(i*7+j).setBackground(Color.yellow);
HOW DO I PROCEED?
public Container createContentPane()
plateau = new int[6][7];
for(int i=0; i<6; i++)
for(int j=0; j<7; j++)
plateau[j] = 0;
joueur = 1;
fin = false;
initComposants();
for ( int i=0 ; i<42 ; i++ )
JButton paneTmp = new JButton(iconJeu);
paneTmp.setEnabled(true);
paneTmp.setBackground(Color.orange);
terrainDeJeu.add(paneTmp);
return terrain;
private int plateau[][];
private JPanel terrainDeJeu;
private JPanel terrain;

can you elaborate your answer please, coz i dont know how to cast it Time to get a book on Java and do some reading. This is a very basic concept and is something you should be learning on your own.
Component c = terrainDeJeu.getComponent(i*7+j).
JButton button = (JButton)c;
button.setIcon("myImage.jpg");

Similar Messages

  • How can i find all included pictures which are not in a album? (only in the Library)

    How can i find all included pictures which are not in a album? (only in the Library)

    Hi there,
    I'm afraid I don't quite understand your question. All images are in your Library and only those you specifically select from that Library would be in an Album. What platform are you using? Revel Mac, Elements, web browser, etc?
    Here is a link with some helpful information:
    FAQ: File Basics: How do I Upload, Download, Share, and Delete files in Revel?
    Thank you,
    Glenyse

  • I just bought a new iPhone and accidentally backed it up with my old iPhone backup, I do not want this. I lost everything on my new phone and I need it back. PLEASE HELP! This includes pictures and texts, etc.

    I just bought a new iPhone and accidentally backed it up with my old iPhone backup, I do not want this. I lost everything on my new phone and I need it back. PLEASE HELP! This includes pictures and texts, etc.

    So just to be clear, when you say "just bought" how long ago was that? Is it on this new iPhone that you had pictures, texts, etc that you want? Were you backing up to iCloud or onto iTunes?
    This may not help for everything but if you go to iCloud.com and log in, are you able to find your pictures there?

  • My camera  icon is not working on my sms so i cant send picture with sms? what to do?

    My camera  icon is not working on my sms part?
    so i cant send picture with sms? what to do?

    Double tap Home button, delete Camera app in multitask-bar.
    Do a
    Reset: Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Note: You will not lose any data
    By the way, picture go through as MMS not SMS, do you have a SMS/MMS plan with your carrier?
    Have you spoken with them?

  • How can i find all included pictures in the Online-Library which are not in a album?

    Hi
    I use Adobe Photoshop Elements 13 with (Revel). My question ist how can i find all included pictures in the Online-Library which are not in a album? I would like only to have pictures in Library which are included in a online album.

    Hi there,
    I'm afraid I don't quite understand your question. All images are in your Library and only those you specifically select from that Library would be in an Album. What platform are you using? Revel Mac, Elements, web browser, etc?
    Here is a link with some helpful information:
    FAQ: File Basics: How do I Upload, Download, Share, and Delete files in Revel?
    Thank you,
    Glenyse

  • Hi i've just signed up for lightroom and when i go into the develop screen i get a blue screen with a cross through it and it says cant load picture. any idea how to get around this?

    hi i've just signed up for lightroom and when i go into the develop screen i get a blue screen with a cross through it and it says cant load picture. any idea how to get around this?

    I'm having same problem in develop module which is laggy as hell compared to LR5.8
    Library module is fine but develop module is slow as hell....5 seconds to make ANY adjustment.

  • IPhone 4,include pictures to spotlight

    Hi there and good day,I have an iPhone 4 with iOS 4.2.1 ,I need to know if there is a way to include pictures to spotlight! It would be very useful for my work to be able to search through my pictures(not the pictures that I took with the phone,but those that I've synchronized) with the spotlight,I know that with this version of iOS it is not bossible,but it would be useful to knows if this feature would be included in some future version of iOS,or if there is an external application thAt can do it.thank you

    yes i saw that,but i wonder if i can find an external app that can do the job,or if there is another way to do it

  • Cant downlown pictures from iphone to my computer

    cant download pictures from my iphone to my computer

    What pics?
    Pics taken with/saved from iphone are imported as with any digital camera.
    All other pics ( pics synced to iphone fropm computer) are synced one way only - computer to iphone.

  • Hey good day. i recently made a back up on my phone. then i took some pictures and videos. i accidentally restored the phone. some pictures and videos including pictures from my third party application were all gone. can i still have those back?

    hey good day. i recently made a back up on my phone. then i took some pictures and videos. i accidentally restored the phone. some pictures and videos including pictures from my third party application were all gone. can i still have those back?

    No. If you restored the device to an older backup, then the device was brought back to that date and time, which was before those photos were taken. When you restored the device, it deleted everything off the phone and replaced it with the earlier information.

  • I cant see pictures on my macbook air every since i updated it to the new update i cant see pictures people send me through i message.

    i have a macbook air that i recently updated and every since then I cant see pictures my friends, teachers, classmates, etc. send me  I cant get the bottom of the problem can someone please help me these pictures are very important

    Try a reset ...
    Reset the device:
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    If that doesn't help, tap Settings > General > Reset > Reset All Settings

  • The camera icon is missing when i take a video,i cant take pictures on my iphone 4s and itouch 5th gen.it started when i updated it to ios 6.0.1

    The camera icon is missing when i take a video,i cant take pictures on my iphone 4s and itouch 5th gen.it started when i updated it to ios 6.0.1

    Sorry I'm so late responding; I've been away.
    http://support.apple.com/kb/TS3694#error1611
    The error means that your antivirus or firewall is blocking the update process.

  • I pay $3.99 a month for 200gb storage and in my settings it says I have 166gb left, however I keep geting popup messages on my iphone5 that im out of storage and I cant take pictures etc, any suggestions?

    I pay $3.99 a month for 200gb storage and in my settings it says I have 166gb left, however I keep geting popup messages on my iphone5 that im out of storage and I cant take pictures etc, any suggestions?

    The money you are spending is for iCloud storage. The warning you are getting is in reference to storage on the iPhone. You cannot increase the storage on the iPhone except to delete content on the device. If you want to take more pictures, you need to remove some content from the device to create room on the iPhone.

  • Why i cant send pictures

    after i upgrated to the 6.0 i cant send pictures. Why is that?

    troubleshooting message http://support.apple.com/kb/ts2755
    also go to settings - message - make sure everyting is correct.

  • URGENT!!! Cant send pictures on BBM

    Hello everyone,
    My bbm was working fine for a year, but since last month, i cannot send pictures ... I tried to google it alot, normally the things that come up suggest that I need to resize the image etc etc ... but my problem is different ... When i choose a picture to send it ... there r two buttons i m supposed to choose from ... "Send" and "Cancel" ... I keep moving my trackpad but it never goes to the "send", it only highlights the cancel button ... Its like its not even an option ... I used to send pictures just fine before, dont know whats up with it now ... I cant even highlight "send" apart from choosing it as an option ... Plz help ... I have tried deleting bbm, re installing it, everything worked fine but still, cant send pictures ...
    Plz help ...

    Do a simple reboot on the BlackBerry in this manner: With the BlackBerry device POWERED ON, remove the battery for a minute, and then reinsert the battery to reboot. A reboot in this manner is prescribed for most glitches and operating system errors, and you will lose no data on the device doing this.
    Now, try the send option again.
    If it still does not work, you need to call the technical support for your mobile carrier and tell them to have this issue escalated to RIM level tech support.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • HT1688 i have at&t pre pay and i cant send pictures to friends  using iphone 4

    i have at&t pre pay...i cant send pictures on my iphone 4?

    AT&T does not permit the use of iPhones or any other smart-phones on pre-paid plans. You will have to pony up for a post paid plan that can be properly provisioned for an iPhone.

Maybe you are looking for

  • Use InCopy CS4 with InDesign CS5? Or Upgrade to CS 5.0?

    Client has InCopy CS4; project is in InDesign CS5. Can they upgrade to InCopy CS5 (not 5.5)? I don't imagine they can open an InDesign CS5 file with InCopy CS4, can they? We're both on Macs Thanks for your help!

  • Implications of Changing Posting date of parked document.

    Hi, I have changed the posting date, document date & translation date to current period of an already parked document in a closed period. (e.g) Document parked in month of 28.04.2009(closed period) & i have changed the dates to        28.05.2009(curr

  • Can I read the dd file without the device

    Hello, Is it possible to read the DD file in Configurator 3.1 without connecting to the device?  The short version of the story......  I have only used the configurator a few times and was walked through the process.  Now I need to figure out how to

  • HT5037 Why doesn't my iphoto open now after the upgrade?... big bummer!

    Why doesn't my iphoto open now after the upgrade?... big bummer

  • Function  giving numeric overflow

    When i call this function with parameter- 6244628707 i get this error-numeric overflow. CREATE OR REPLACE FUNCTION TATA_ICR.isprime (p_number NUMBER) RETURN NUMBER IS BEGIN IF p_number = 3 or p_number=1 THEN RETURN 1; END IF; FOR i IN 3 .. p_number -