I don't know what to do anymore! Background Image is not displayed???!!!

Hey there!
I'm just trying to show a simple jpg in the Background Layer and it does not seem to work! I really need this for my diploma and i do not know where i made the mistake and it is compiling without errors!! Yet the picture is not shown.. Could somebody help me please? Any answer would be very helpful for me for i don't know what to do anymore..I am testing my Xlets with XletView 3.6..
Here is the code i tried:
public class BackgroundImage extends HComponent implements Xlet, Runnable{
private HScene scene;
private Image image;
private HaviBackgroundController backgroundManager;
private XletContext context;
private Thread myWorkerThread;
     public BackgroundImage()
public void initXlet(XletContext context) throws
javax.tv.xlet.XletStateChangeException
          this.context = context;
public void startXlet() throws javax.tv.xlet.XletStateChangeException
     myWorkerThread = new Thread(this);
          myWorkerThread.start();
public void pauseXlet()
          pause();
public void destroyXlet(boolean unconditional) throws javax.tv.xlet.XletStateChangeException
          if (unconditional) {
               destroy();
public void run()
          getResources();
          showBackgroundImage();
public void getResources() {
HSceneFactory factory = HSceneFactory.getInstance();
HSceneTemplate hst = new HSceneTemplate();
hst.setPreference(
HSceneTemplate.SCENE_SCREEN_DIMENSION,
               new org.havi.ui.HScreenDimension(1,1),
               HSceneTemplate.REQUIRED);
          hst.setPreference(
HSceneTemplate.SCENE_SCREEN_LOCATION,
               new org.havi.ui.HScreenPoint(0,0),
               HSceneTemplate.REQUIRED);
scene = factory.getBestScene(hst);
Rectangle rect = scene.getBounds();
setBounds(rect);
setVisible(true);
setBackground(Color.black);
scene.add(this);
scene.setVisible(true);
this.requestFocus();
public void showBackgroundImage() {
MediaTracker tracker = new MediaTracker(this);
image = Toolkit.getDefaultToolkit().getImage("background.jpg");
tracker.addImage(image, 0);
try{
               tracker.waitForAll();
          catch(InterruptedException e) {
               image = null;
          backgroundManager = new HaviBackgroundController();
          if (backgroundManager.init()) {
     backgroundManager.display("background.jpg");
public void pause()
scene.setVisible(false);
     backgroundManager.dispose();
public void destroy()
scene.setVisible(false);
scene.remove(this);
image.flush();
image = null;
backgroundManager.dispose();
HSceneFactory.getInstance().dispose(scene);
scene = null;
}

Sorry, i forgot about that..
I tried the HaviBackgroundController Class of Steve Morris (thanks a lot for that great Tutorial!). It is as follows:
class HaviBackgroundController implements ResourceClient{
private HBackgroundDevice backdevice;
private HStillImageBackgroundConfiguration backconfig;
public boolean init()
HScreen screen = HScreen.getDefaultHScreen();
HBackgroundDevice backdevice = screen.getDefaultHBackgroundDevice();
HBackgroundConfigTemplate backgroundConfigurationTemplate = new
          HBackgroundConfigTemplate();
backgroundConfigurationTemplate.setPreference(
HBackgroundConfigTemplate.FLICKER_FILTERING,
               HBackgroundConfigTemplate.REQUIRED);
          HBackgroundConfiguration backconfig;
          backconfig = backdevice.getBestConfiguration(
               backgroundConfigurationTemplate);
          if (backdevice.reserveDevice(this))
               try
                    backdevice.setBackgroundConfiguration(backconfig);
               catch (Exception ex)
                    System.out.println("Can't initialise the background device");
                    backdevice.releaseDevice();
                    return false;
               if(backconfig instanceof HStillImageBackgroundConfiguration)
                    this.backconfig = (HStillImageBackgroundConfiguration)backconfig;
                    this.backdevice = backdevice;
                    return true;
               else
                    backdevice.releaseDevice();
          return false;
     public void dispose()
          if (backdevice != null)
               backdevice.releaseDevice();
               backdevice = null;
               backconfig = null;
     public void display(String filename)
          if(backconfig != null) {
               HBackgroundImage backimage = new HBackgroundImage("background.jpg");
               try {
                    backconfig.displayImage(backimage);
               catch (java.io.IOException ioe) {
                    System.out.println("Can't display background image - IO exception");
                    ioe.printStackTrace();
               catch (HPermissionDeniedException hpde) {
                    System.out.println("Can't display background image - permission denied");
               catch (HConfigurationException hce) {
                    System.out.println("Can't display background image - configuration exception");
                    hce.printStackTrace();
     public boolean requestRelease(ResourceProxy proxy, Object requestData) {
          return false;
     public void release(ResourceProxy proxy) {
          backdevice.releaseDevice();
     public void notifyRelease(ResourceProxy proxy) {
          backdevice.releaseDevice();
}

Similar Messages

  • If you don't know what to do anymore(Written by Bas)

    If you don't know what to do anymore because drivers won't install, you might try this.
    Hi there,
    * This article is not really for newbies, but you might give it a try. *
    * Read it thru the end before you do anything!!!!!!!!!!!!!!!!!!!!!!!!!!!! *
    I was testing 3Dmark for the link Takki made, THANK YOU!!!!!
    I did the following:
    Tested with my MSI GF2Ti200 (patched to Quadra2Pro) and had a nice score....
    Then I removed the drivers and changed the card to a Hercules Prophet 4500 (KyroII chipset), installed the drivers and done the test again, no problems....I THOUGHT!!!!
    So I uninstalled the drivers again, and inserted the MSI GF2Ti200....
    After the reboot of Win2000+SP2+Directx8.1+VIA4.38, I installed the latest nVidia drivers again, it detected my card as a Quadra2Pro (as it should) and I rebooted....
    The DARN drivers wouldn't initialize!!! I had a nice ! in the driver....
    So I thought, well no problem, we uninstall them again and try it again, same result.....
    Then I thought, it must be the BIOS as I recently flashed the latest version, so I went back to 5.1 from 5.3 on my KT3-Ultra-ARU.....again nothing and the ! was there again.....
    At this point I really started to hate nVidia (still do BTW)....
    The next step I took, was refreshing the ACPI-compliant-system-driver (HAL), no problem you think? My idea exactly, but it told me that it could find some file or it was damaged.....no problem, we just reboot and it should be fine, again nada, njet, noppes, none....but now I had 2 of these damn !, one at the nVidia card and one at the HAL....
    We don't give up, so I started to delete all the OEM*.INF files in the C:\WINNT\INF directory that are not related to the cards I have, but I also deleted the nVidia related.....
    So I rebooted again, installed the nVidia drivers again (have tried old versions too) and again, nothing!, now I got really MAD
    I know, I know, I should have just reinstalled the entire freaking Win2000 at this time, but I hate reinstalling and I won't be beaten by Microsoft
    At this point, my brain was cooking now, I went to the hardware wizzard and choose to remove the ACPI-compliant-system-driver (translated from Dutch so it can differ a bit), and again another reboot.....
    Now Windows got MAD at me!?!?!, it started to load a new ACPI compliant drivers and installed all the hardware over again, except for the nVidia drivers as they where deleted.....
    Windows asked for the MSI CDrom a couple of times, but hey who am I to refuse this humbe request?
    A dozen more reboots and all the drivers where installed again and the time had come to give the nVidia drivers another go....
    After telling me to close the antivirus, don't know why? Never had any problems before! It asked me the same questions as you all get and seemed to install.....another reboot, yep Billy is very keen on rebooting
    What the ?????, they work!!!!!
    Gee man (woman), I have beaten the beast!
    I hope this description will help others who have problems switching cards, you can allway's try this approach.
    I learned from this experiance that the PnP in Windows is junk and you really need to remove the HAL to get it working again, next time I will go straight for this baby in order to get a good recognision of the hardware involved.
    As Windows does strange things when this happens, it will even tell you that files are damaged or missing, when they are not....
    I'm not sure if it will work in XP, but it does in Win2000.....give it a shot before you decide to reinstall....
    As I think reinstalling doesn't get you anywhere and won't solve your problems, I know this is hard stuff, but you really feel pleased afterwards when you managed to solve it.
    Bas.
    BTW, I still don't like APIC 1.1/1.4, never used it on a single CPU and never will as it's faking you on interrupts
    Check your BIOS start screen and you will find all the proof you need
    To remove the HAL, you first need to go to the hardware device listing, there you look under system how your system is listed.
    On my system this is ACPI Compliant System.
    Then you go to the hardware wizzard and choose the option remove a device, after that you get a screen with lot's of devices, there you find the same (allmost) devicename, then you choose to remove that one.
    After you reboot, wait a little as Windows seems to go nuts, just follow thru and you will have a brand new configured system.
    Then try to install the devices that didn't want to install in the first place, you might be so lucky that they do install then.
    Written by Bas

    Well, as far as I know the firmware v 1.03.0 is not the correct firmware for this router..so try to flash the firmware to the one available on the website and see whether it makes any difference….

  • I have a 2007 macbook that is stuck on the loading page and after a while it shuts down by itself. I don't know what to do anymore please help!!!

    I have a 2007 macbook that is stuck on the loading page and after a while it shuts down by itself. I don't know what to do anymore please help!!!

    Hello Sebas4224
    Start with the article below to troubleshoot issues with your MacBook starting up and staying on. Let me know how it goes in case it does not help and I or others can assist you further.
    Mac OS X: Gray screen appears during startup
    http://support.apple.com/kb/TS2570
    Regards,
    -Norm G.

  • I don't know what is happening anymore with the release of the new iPods?

    So they just now put an AD saying that is now availible.
    When i'm buying it online in the pick up option it says:
    Pick up:Visit an Apple Retail Store. Limited quantities may be available
    I had a chat with them and they said that they don't know anything about it.
    I called to a Retail Store and they said that they dont have it.
    I don't know what's happening i just want to buy it in a store but im so confused.
    Can someone help me?

    Can you show us a screen capture of this 2nd copy with a new WB in your Lightroom grid? Thanks
    Are these second copy photos by any chance photos that had been previously imported?

  • Don't know what to do anymore with this problem

    As it stands, I have upgraded my bios to 3.8 for the K7N2.  I am runnng the latest Nvidia Forceware drivers released in October.  I changed my powersupply to a CoolMax CT470 Smart PSU.  I'm running Wix XP ServicePack 1.  I still cannot get the Sapphire Radeon 9500 to work.  It just consistently causes the CPU to not initialize.  But my Nividia Geforce 2 MX-400 card works just fine.  And the Sapphire works just as well in other computers.

    Have you tryed BIOS 3.3. I have a friend with a Crucial Radeon 9800Pro & he was having the same problem. I told him to try flashing to BIOS 3.3 & it now works first time every time.
    If 3.3 dosn't work then try 3.2

  • Help I don't know what to do anymore

    Okay so i updated my Ipod to IOS6 And with in a few hours my iPod would freeze and then it would go to the apple screen and then turned pitch black i tried resetting it and it didn't solve the problem please help

    See if you can connect it to your computer and Restore it

  • The side scroll bar is locked and I don't know what to do.  Also video does not work.  I only get sound.

    The side scroll bar is locked so I can't read anything on the web.  Also, I cannot get any video on YouTube, etc.  It is a black screen.

    See the troubleshooting for a white-screen included here:
    iPod touch: Hardware troubleshooting

  • My iphone app store is downloading apps in french but my language is portuguese . I changed country and language  even though they were  already in portuguese and brazil. Don't konw what to do anymore . I bought some apps and they all are in french .

    Hi , my iphone app store is downloading apps in french instead of portuguese . I checked my country and language in settings and they are right . Don't know what to do anymore. I even bought some apps and they are also in french .

    Follow this link for the Bionic ICS user guide; if you have issues/questions, you may want to do a search on this forum as there are already several threads/remedies.  If a search doesn't answer your question, submit a post.
    https://community.verizonwireless.com/message/893011#893011

  • I am having a problem with pop pups and small windows with ads constantly opening up on my safari?? Thought that macs didn't get virus? this looks like one- any experts around? please help me fix it with your instructions? really don't know what to do...

    Hi everyone,
    I am having a problem with my Mac OS X 10.7.5 mac book air , there are constant pop pups and small windows with ads blinking constantly opening up on my safari in front of everything?? it is constantly interupting me and makes me mistakingly click on it then another new windows open behind the one im using..
    I am not too sure if thats a virus or trojan.. I always thought that macs didn't get virus? this looks like one to me… any experts around? please help me fix it with your instructions? really don't know what to do... thanks

    Those are not viruses. You have probably installed some malware:
    The Safe Mac » Adware Removal Guide
    Helpful Links Regarding Malware Protection
    An excellent link to read is Tom Reed's Mac Malware Guide.
    Also, visit The XLab FAQs and read Detecting and avoiding malware and spyware.
    See these Apple articles:
              Mac OS X Snow Leopard and malware detection
              OS X Lion- Protect your Mac from malware
              OS X Mountain Lion- Protect your Mac from malware
              About file quarantine in OS X
    If you require anti-virus protection Thomas Reed recommends using Dr.Web Light from the App Store. It's free, and since it's from the App Store, it won't destabilize the system. If you prefer one of the better known commercial products, then Thomas recommends using Sophos.(Thank you to Thomas Reed for these recommendations.) If you already use Sophos, then be aware of this if you are using Mavericks: OS X Mavericks- Sophos Anti-Virus on-access scanner versions 8.0 - 9.1 may cause unexpected restarts
    From user Joe Bailey comes this equally useful advice:
    The facts are:
    1. There is no anti-malware software that can detect 100% of the malware out there.
    2. There is no anti-malware that can detect anything targeting the Mac because there
         is no Mac malware in the wild, and therefore, no "signatures" to detect.
    3. The very best way to prevent the most attacks is for you as the user to be aware that
         the most successful malware attacks rely on very sophisticated social engineering
         techniques preying on human avarice, ****, and fear.
    4. Internet popups saying the FBI, NSA, Microsoft, your ISP has detected malware on
        your computer is intended to entice you to install their malware thinking it is a
        protection against malware.
    5. Some of the anti-malware products on the market are worse than the malware
        from which they purport to protect you.
    6. Be cautious where you go on the internet.
    7. Only download anything from sites you know are safe.
    8. Avoid links you receive in email, always be suspicious even if you get something
        you think is from a friend, but you were not expecting.
    9. If there is any question in your mind, then assume it is malware.

  • Hi , i tried to update my i pad few days ago with the ios 6 and after that the ipad is not switching on anymore the screen only gives me a picture of connecting the wire with the labtop i did that hundred times with no response don't know what to do now m

    hi,
    fewq days ago i updated my i pad to ios 6 by connecting it to the labtop , since that time my i pad is dead it doesn't want to switch on anymore the only message i get on the screen is a picture of wire connection with i tunes tried to connecting it hundred times with the labtop but without any response don't know what to do

    If force restarting doesnt work, and your computer cant recognize it, I would suggest bringing it to the genius bar at an apple store so they can run diagnostics. This seems to be the last step, because the issue seems pretty serious.
    Hope this helps!

  • Please help me I'm losing my mind! I can't sync any and i mean ANY Video! i tried everything! i read a lot of these tips and stuff but i can' sync anything! as in mo video syncing i don't know what is wrong! please help me! i'm begging

    I really don't know what else to do anymore i've tried everything! i saw i tried re installing itunes I downloaded quicktime but whatever i try i can't sync any videos into my itunes 11 as in there is nothing I click "Open" like how i usually sync things and then clicked on the video. after that the little window will just dissapear and nothing happens, i'm serious i tried looking for it in the recently added, in the music, in the movies, TV shows, home videos nothing i can't find it anywhere and i know that i SHOULD be able to synce those videos because i synced those videos before. please help me I'm losing my mind!

    Generally i found this thread because i've also got troubles with coax output my problem is in choppy sound with scratches and clipping in Windows 7, when i try to play Dolby Digital or DTS audio in movies or even test sounds from speaker control panel. In win xp all works fine - and in win7 only pcm stereo can normaly being output.
    I try with different drivers (official and from daniel) and nothing helps...
    yep...bios of my motherboard was configured to lower CPU ratio and voltage when idle (C1E option). I turn this option off and all works fine now)

  • On iTunes when i plug my iphone in, the bar at the bottom with contains the information about the capacity of my iphone, it has a bar called 'other' which has 4GB. I don't know what is taking up that space or how to get rid of it. please help :)

    On iTunes when i plug my iphone in, the bar at the bottom with contains the information about the capacity of my iphone, it has a bar called 'other' which has 4GB. I don't know what is taking up that space or how to get rid of it. please help

    You can reduce the size to normal, which is about 1GB, by restoring the phone.
    Backing Up, updating, and restoring your iPhone and iPod touch software
    The size of this part can increase when something goes wrong during a sync, or some files can't be read anymore by iTunes.

  • Bought the new MBP today, but don't know what to do now! Imperfect machine

    Ok. I ran down to my campus computer store today and bought a base model MacBook Pro. Then, I returned home with lots of excitement. But after I opened up the laptop, all my excitement disappear shortly after I found 3 imperfections on the new MBP.
    1.there is a dent on the edge of the front end (see pictures please). I'm so so disappointed and continued setting up the machine.
    2.After all the noisy installation from an external hard drive. I realized that the fan is making a unpleasant noise which can only be heard in a quite environment. (I assume they have no way to hear it in store)
    3.The speakers' wholes look very strange and looks like it's been used and covered with dust. -see in pictures
    So I'm wondering what are my options. Is it possible to get a exchange or refund at the store or through Apple support?
    Please help... I'm so screwed and don't know what to do now....
    see pictures here:
    http://gallery.me.com/epeng#100114
    Thanks for any input

    Hmmm, someone's "right" to be upset - and - the content over which they are upset, are two different things. I never questioned the Op's right to be upset - he/she can be as upset as they want to be, that is their right.
    I'm just saying that my perspective of aesthetic complaints around here has shifted - and they no longer cause me to call into question Apple's quality standards. I can understand wanting something to be perfect - but implicit in the complaint was the statement that Apple committed some harsh violation, which now I think they did not.
    So again, I was reading the board and getting quite upset (internally) with Apple - because I love them as a company and I want them to do well - because it's not often that you get "truly" innovative corporate entities in this world - most corporations just want to "homogenize" existence - distilling it down to a few basic variations which are easy to reproduce; all for the sake of the bottom line. The fact that Apple is forcing innovation into the market - causes a corporate strata that doesn't tolerate vanilla design ethics - and I think that is a good thing.
    I don't want to live in a neighborhood where the only choices I have for food are, McDonalds, Starbucks, Olive Garden, etc. anymore than I want to use the same old square black laptop with Windows on it.
    So now I see that there are imperfections in the manufacturing - but they aren't indicative of serious neglect on Apple's part, which is why said "whew..."

  • Need Hard Drive, Don't Know What To Do

    Thank you for reading.  Recently I purchased a new Seagate Momentus XT Solid-State Hybrid Hard Drive for my MacBook Pro.  I am down to only 10 gigs of free space in my internal drive and really need a new drive.  So I cloned my internal drive onto the Seagate drive and then booted off it.  No problems at all so I shut down my Mac and then switched the drive.  I booted up and all was well....for about 15 minutes.  Then my computer crashed hard and rebooting it did not solve the problem.  After a few boots, my Mac would not boot at all with the Seagate Harddrive. I pulled the drive and put the old one in, no problem at all. 
    Why would the Seagate drive work in an external enclosure but not inside my Mac?  Why would the original drive work just fine inside my Mac?  I NEED a new hard drive right away because I am traveling late next week.  The Seagate drive is hopeless and I dont want to throw more money away.
    Thank you so much for any help!

    dwb wrote:
    An observation and a question: 1) it is possible that the drive wasn't quite seated properly in your computer. I've had a similar experience and it resolved itself when I removed the drive and put it back in. 2) Have you put the drive back into the enclosure (or dock) and booted from it? That would give you a hint as to whether you got a bad drive or not.
    Thank you for your reply. Since this is the very first time I have ever done this, I am not sure exactly what "seated" means in this case.  From my point of view, the drive goes in very easily and rests on a platorm that does not allow for much error.  Plugging in the drive is a trival thing to do so hard to believe that an error can occur there.
    I pulled the Seagate drive 3 or 4 times, going back and forth between the original drive.  Each time the original drive worked OK, and the Seagate would not boot up.   When I booted up my computer using the old drive, but mounted externally, I found that the Seagate drive (inside the laptop at this point) would sometimes not mount, or if it did mount, would dismount spontaneously.   I took the laptop to the Apple store and they looked at it.  Their opinion was that the chord connecting the drive to the laptop was bad and they replaced that.  For a short time the Seagate drive worked, but back home, again it would crash the computer.  Replacing the internal drive fixed everything again.
    Such a huge problem, I just dont know what to do anymore, or how to get more hard drive space.

  • Too  long rebooting don't know what to do

    Hi I have a problem. I have an iPhone 4 with a 5gb ios 7 and I had erase all my data and contents from off of iCloud. My phone I think jailbroken. so after earsing it my phone had an loading bar underneath the apple logo which it completed, but now it has a black screen with a loading  circle. It has been this way for approximately 3 days now. I don't know what is wrong and what to do. To make matters worse , my phone sleep/lock button has been stuck for a month and my iTunes does now pick up the connection of the phone so I cant  get in to reboot or go in recovery mode. what should I do? Is this a problem that can be fixed? I live in a developing country so we don't have an apple store  anywhere in the country.

    Since the phone has been jailborken, Apple will not service the phone anymore and you'll have to search for a 3rd party repair shop to get your phone fixed, sorry.

Maybe you are looking for

  • Having active file links to text files in pdf

    Hi, I have a Word doc that has a number of embedded text files that are accessible by double-clicking the text icon. When I convert the Word doc to pdf these will not launch Notepad with the actual text file that is needed. Any suggestions on how to

  • Save me! Missing pics after import from CD? what the..?

    Hello Mac superstars, I'm on a macbook pro from late 2011, on lion so I think that I would then have iphoto 11? Here's my story: -  Imported some photos from disc & first event created. But after ejecting disc, couldn't view pictures in iphoto (thumb

  • Error when retrieving all backend systems SPS12

    After upgrade system to SPS12, there was a error in UME: "An unexpected error occurred when retrieving all backend systems available for user mapping." Does anyone given this error? #1.5 #003048323AFA006A0000004700005F10000438C0C2A59F50#1188300457345

  • My iPhone 4S is stuck in recovery mode after trying to update to 6.1

    I was given the option to update to to thenew 6.1, and upon my phone resetting after the download I got the (-1) error and my phone was thrown into recovery mode. I have tried to restore my phone 5 times and each time I keep getting the -1 error code

  • Process instructions

    Hi, I have maintained CONS_I as the Instruction category with scope of generation as 01 (for all reservation items) in customizing. When I create the process order and try to generate the control recipe I get the error that PPPI_RESERVATION_ITEM is n


HashFlare