Having problems with this, can you help?

Hello everyone, I'm currently making a j2me game, I'm still a newbie to it tho.
I'm currently making the splash screen and I've followed a tutorial and intended to make my own, problem now is that there is something wrong with the code and is not working as I thought it would. Can you guys check what's wrong with my code? And please advise me on what's wrong and how do I fix it. Thanks alot. The code is below. The Sscreen.java is the one responsible for making and showing the splash screen while the Main.java is the main midlet and calls Sscreen.java.
// Sscreen.java
import java.util.Timer;
import java.util.TimerTask;
import javax.microedition.lcdui.*;
public final class Sscreen extends Canvas
     private Display dis;
     private Displayable nxt;
     private Timer tmer;
     private Image im;
     public Sscreen(Display dis,Displayable nxt,Image im)
          tmer=new Timer();
          this.dis=dis;
          this.nxt=nxt;
          this.im=im;
          dis.setCurrent(this);
     private void dismiss()
          tmer.cancel();
          dis.setCurrent(nxt);
     protected void keyPressed(int keyC)
          dismiss();
     protected void paint(Graphics g)
          g.setColor(0x00000000);
          g.fillRect(0, 0, getWidth(), getHeight());
          g.setColor(0x00000000);
          g.drawImage(im,getWidth()/2,getHeight()/2-5,3);
     protected void showNotify()
          tmer.schedule(new Counter(), 3000);
     private class Counter extends TimerTask
          public void run()
               dismiss();
// Main Class
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
public class Main extends MIDlet
     private Display dis;
     private Image im;
     private boolean Splash=true;
     public Main(){}
     protected void destroyApp(boolean arg) throws MIDletStateChangeException {
          notifyDestroyed();     
     protected void pauseApp() {     }
     protected void startApp() throws MIDletStateChangeException {
          dis=dis.getDisplay(this);
          if(Splash)
               Splash=false;
               try
                    im=Image.createImage("/bg.png");
                    new Sscreen(dis,new Temp(),im);
               catch(Exception e)
                    System.out.println("Prob 2");
     class Temp extends Form implements CommandListener
          private Command exitCommand = new Command("Exit", Command.EXIT, 1 );
          public Temp()
               super("Main");
               addCommand( exitCommand );
     setCommandListener( (CommandListener) Main.this );
          public void commandAction(Command arg0, Displayable arg1) {
               notifyDestroyed();
}

i think problem is here
*setCommandListener( (CommandListener) Main.this );*instead use
setCommandListener(this );

Similar Messages

  • Problem with http, can you help me about this exception(JSPX)?

    Somwone could tell me what's this http error when i try to get data from jspx aplication?
    HTTP Status 500 -
    exception
    javax.servlet.ServletException: Problem accessing the absolute URL "http://localhost:8080/livros/people.jspx". java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/livros/people.jspx
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:827)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:763)
         org.apache.jsp.Resposta_jsp._jspService(Resposta_jsp.java:95)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    root cause
    java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/livros/people.jspx
         sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1133)
         org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireReader(ImportSupport.java:331)
         org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:241)
         org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:158)
         org.apache.jsp.Resposta_jsp._jspx_meth_c_import_0(Resposta_jsp.java:115)
         org.apache.jsp.Resposta_jsp._jspService(Resposta_jsp.java:68)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)

    Hi
    Please try looking at following lines.
    org.apache.jsp.Resposta_jsp._jspx_meth_c_import_0(Resposta_jsp.java:115)
         org.apache.jsp.Resposta_jsp._jspService(Resposta_jsp.java:68)
    and
    org.apache.jsp.Resposta_jsp._jspService(Resposta_jsp.java:95)
    This is in generated servlet file. Then try to find out in your JSP.
    HTTP Status 500 indicates an internal server error.
    HTH
    VJ

  • Im having problems with landrules can anybody help?

    the game wont let me create account cos it keeps saying error in waiting for the mainframe. Please help solve this problem as i cant get in contact with the developer of the game

    Only the developer can help you.

  • Problem with PCI128-can you help

    I have a Soundblaster PCI 28. It functions well but I can't record a simple sound from it. I connected the line-in, micro I and could hear the sound, however, I couldn't record with any sound recorder solfwares. I have install all the features included in the driver CD. What should I do now? I'm looking forward to any help from you. Thanks in addvanced.

    did you make sure that you have the recording source select as line in?

  • I'm still having problems downloading. Can anybody help? Everytime I try yo download, it's saying my Adobe Flash CS4 won't download.

    I'm still having problems downloading. Can anybody help? Everytime I try yo download, it's saying my Adobe Flash CS4 won't download.

    UP%20%26 COMIN' what specific error message do you receive when you try to download the Creative Suite 4 installation files?  Which Creative Suite 4 title are you downloading?  Are you downloading the installation files from https://helpx.adobe.com/creative-suite/kb/cs4-product-downloads.html?

  • HT5312 hi i forgot my security question and cannot reset this can you help me?

    hi i forgot my security question and cannot reset this can you help me?

    Didn't the link to contact the iTunes Store staff in the 'Additional Information' section of that article work for you? If you don't already have a valid rescue email address, only Apple itself can reset the questions.
    (90152)

  • HT204387 Hi I'm having problems with my Bluetooth please help me thank you

    Hi I'm having problems with Bluetooth it wont light up

    What light are you talking about?
    iOS devices don't, by the way, have the BT profile for transferring files. You can connect to keyboards, headsets, speakers, car kits.

  • I'm still having problems with XUL Runner - please help am getting desperate!

    I recently sought help over a problem I am having with FF. When I try and load it, I get a message telling me that XUL runner 1.9.2.11 is not compatible with 1.9.2.12. The advice I received was to do a clean install. I have done this a number of times - using the Uninstall option in Control Panel as well as running the uninstall utility in the Firefox program folder. Each time I reinstall, and get the same problem. The only difference is that a few days ago I was installing FF 3.6.10, and that gave the error message that XUL runner 1.9.2.11 was not compatible with 1.9.2.10.
    I have FF set as my default browser, so when I click on links in e-mails, etc. I get the same failure to load symptoms. However, I found by chance that FF works OK in conjunction with System Mechanic 10 - a maintenance utility I have on my machine. If I select the on-line help option from that Menu, FF loads and runs OK. I can open new tabs and have no problem loading other pages. However, even with FF open, if I click a link in an e-mail, I get the XUL Runner error message.
    Although not all symptoms are the same, I am also having problems with IE8. When I run the program it loads, shows a 'connecting' message in the tab header, then closes. If I uninstall FF, then System Mechanic selects IE8 as the default browser, and as with FF, loads OK.
    Chrome and Safari both run OK (thankfully). there must be someone out there who knows what this all points to - is that person you?!
    Note: Trouble shooting information retrieved using FF when opened with System Mechanic.

    If you have such problems then you need remove the Firefox program folder before installing a new copy of the full Firefox installer.
    It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.

  • Having problems with USB cable, please HELP!

    While trying to download aim/aol I was having problems with my USB cable and my phone being connected, it was like they were showing they were conneted but when I tried to download aim it said no drivers were recognised. My phone was giving me the option when the USB cable was plugged in asking me if I wantd to do something to do with the media mass storage.
    Anyway, once the drivers were downloaded to my comp and I plugged USB cable into my phone and comp i'm no longer being asked on my blackberry about the mass storage, my phone doesn't seem to be recogniaing tht it's linked up to my computer at all even though it's showing the little plug thing in my blackberry and coming up on the computer.
    Is there anybody out there who can help me?!
    Please!
    Cheers!

    Go to Options -> Media Card -> Mass Storage Mode Support: On
    tanzim                                                                                  
    If your query is resolved then please click on “Accept as Solution”
    Click on the LIKE on the bottom right if the post deserves credit

  • Can't set up email on Note 4. anyone else having problems with this?

    Just got the Note 4 today and have been unable to set up an email acct using the email client. Keep getting the msg "Unable to set up acct. Authentication failed." I have used the same settings to set up the acct on other devices. Any help much appreciated.

        ZWM,
    We definitely want to help resolve this for you.  However, the security settings are dependant on how your EDU accounts are set up.  You can of course change them using trial and error and test for successful set up.  Otherwise you may need to reach out to the Network Administrator to confirm settings and compatibility.  Please let us know if we can further assist. Thanks
    TrevorC_VZW
    Follow us on Twitter @VZWSupport

  • What's my problem with this G5? Help needed.

    I have an iMac G5- early 2005- running Tiger.
    During boot up there can be a black screen and that's all, no furter, thus I must do a reboot.
    No booting into OS.
    If the system does boot-up it might take anywhere between 3-10 minutes to do so.
    Other than that most of the operating of the machine is fairly ok. Sometimes there can be a serious delay for windows to open or changes to ocurr but that's not usually the csae.
    I used the Disk Utility -at boot- based on someone's recommendation but the disk had no errors, seemingly.
    The disk is partitioned into 2 disks. The second partition is called 'Storage'. It is not available or present[doesn't appear on the desktop] during use of the OS.
    In D.U. it appears as a greyed out word...but I can run first aid and it proves to have no errors and the disk can and is verified, however it is not accessible.
    It was sent off to be repaired, but the result is inconclusive.
    There have been no changes at all, to either hardware or software.
    Any thoughts or ideas?
    Thanks.
    Chris
    Message was edited by: C K2
    Message was edited by: C K2
    Message was edited by: C K2

    I rang apple care and after much time of listening to some fairly nice selections of music, I was informed that there was nothing that could be done with this machine as far as apple were concerned, so.
    I asked techy whether I should get a new hdd. His reply was, use a second hand one, don't waste your money on a new one, so.
    Took off back cover - 3 nuts on base of screen. Undid the 'grey plate' that sits on top of the access point to the hard drive. Undid 3 securing screws, undid cables - be careful to note the orientations of each of these - released the 2 hdd cables - one is for data transfer, the other is the power cable - then 4 screws holding the hdd in its housing. that was it...just reversed everything to replace.
    Then did a re-install of OSX Tiger. All's well. The system is very quick compared to its previous state and no problems so far.
    I did replace the hdd that was in this machine with a better model - Seagate - and a bigger size.
    will keep you posted.
    Just for those who may find their machine out of warranty and they might feel like having a go at this procedure - if the situations are similar - it's worth it and in a sense, you might have nothing to lose.
    Be careful !, take your time !...and keep in mind each and every action you take, so you have a memory or a map of the things that you do/did.
    good luck to you.
    Chris

  • Having problem with my cisco857w , please help

    Hi Guys
    I have cisco 857w, i managed to configure it and I use it as wireless modem router, I have PC, VOIP adaptor and 7 wireless devices connected. i can access the internet from all of them no problem ,but the issue I have is I can't ping any wireless laptops from any other wireless. the reason I need to do that is because i can't install my wireless printer on my wireless laptops. but also I have to mention the PC connected through one of the FastEthernet port of the router I can print to the printer wirelessly.  this drive me crazy. I attached my config. thanks for you help
    David

    Hi David,
    I believe it would be best that you post this thread in the Wireless and Mobility community
    https://supportforums.cisco.com/community/netpro/wireless-mobility
    You should have better chances there. Good luck!
    Luis

  • I want to download my itunes library to my shuffle. can't seem to figure out how to do this. can you help me?

    I want to download my itunes library to my shuffle. Can't seem to figure out how to do this. Can anybody help?

    You probably need to set up automatic syncing.  Select the shuffle in iTunes.  You see a row of "tabs" (buttons) starting with Summary.  Click on Music next to Summary.  This is the iPod's Music tab, where you tell iTunes how to sync songs to the shuffle.
    Check the box for Sync Music.  If your iTunes music library is small enough to fit on the shuffle, you can choose to sync Entire music library.  Then click Apply.
    Otherwise, you can choose to sync Selected playlists, artists, albums, and genres, then select (checkmark) the playlists, artists, albums, and/or genres that you want on the shuffle, from the lists below.
    Here's one convenient way to set it up.  In your iTunes library, create a new regular playlist; call it something like "iPod Songs" (or whatever you want).  From your iTunes music library, load that iPod Songs playlist with ALL the songs you want on the shuffle.  On the shuffle's Music tab, find and checkmark that iPod Songs playlist (under Playlists).  When you click Apply, those songs sync to the shuffle.  Going forward, to update songs on the shuffle, just update that iPod Songs playlist in iTunes (add and/or remove songs) and then connect your shuffle.  iTunes automatically updates the shuffle with the same changes.  If the iPod is already connected, click the Sync button to update the iPod.
    If you have any specific question, please post back.

  • Problem with Archboot - can anyone help?

    Right now there is a huge problem with Archboot's installer. During an install, packages' install scripts invariably fail to work properly. Two of them give an error about /bin/true not existing; udev's install script claims that /sbin/migrate-udev isn't there; perl's borks with a string of errors related to the symlinking it's supposed to do - it doesn't see the directories that it's supposed to create symlinks to.
    This is quite a bit like what I saw with archbootstrap, so I think it may be a chroot-related issue, but if anyone has any clue as to the cause, please tell...
    (And while we're at it, try Archboot when you get the chance. 8) )

    My larch scripts do a very 'straight' from-nothing-up installation, as also is the case in my 'newarch' script for a sort-of bootstrap installation - see http://wiki.archlinux.org/index.php/Qui … stallation (I've just updated it).
    The only really noticeable error is two "install script couldn't find /bin/true" failures, both for 'db' (its pre- and its post-install scripts, gcc hasn't got an install script), and I am pretty sure these are no problem at all.
    Otherwise, the creation of kernel26.img seems not to work properly, but this is also no big deal - you can use kernel26-fallback.img and regenerate the former when you boot into the new system.
    I built a larch CD a few days ago with all the latest stuff, and it works fine. Congratulations to the devs on making the recent migrations so smooth!

  • S David I have 2 licens for cs5.5 and have serial number . I cancelled if from my computer (windows 8 operation system)  i just purchased a mac i mak all in one computer and want to install my cs5.5 on it ... i need a download link to do this can you help

    I have 2 license for cs5.5    I am using one on my Windows 8 operating system... the other I cancelled and want to put it on a new apple operating system  /... can you give me the link to down it to my new apple all in one computer???  Please HELP>  send download link or call me 2 850.501.1499   mor send seperate e-mail  to   [email protected] THANKS   DAVID

    Hi David,
    I would like to inform you that if you have a Mac serial number with you, only then you would be able to activate it on your Mac machine.
    Here is the download link for the same.
    Adobe CS5.5
    Thanks,
    Atul Saini

Maybe you are looking for

  • Creating .swf's in Photoshop CS4?

    I have PS CS4, I found a tutorial for PS CS2 (Creative COW) that said you could export animations created in Photoshop as .swf's using Imageready through Photoshop. But I can't seem to find a similar tutorial, or anything, to export Flash files from

  • Troubles in dual boot system after BIOS update

    Hello: PC: Thinkpad T500 1. I had for one year Linux Fedora 10 and Vista Ultimate working in dual boot with Grub, no problems at all. Three days ago Lenovo support recommended I update my BIOS from 2.07 to 3.12, as I had some intermitent Sleep proble

  • Finding cycles in an undirected graph.

    I've been trying to implement my own graph class, and one of the things I would like to do is do a DFS to find cycles. So far I've been able to write this and I'm pretty confident it works:      static boolean findCycle(){           LinkedList<Node>

  • Updates or install of applications from disk won't install.

    Hello. Tried running a software update on my recently already archived and installed Macbook. Neither the Safari or iTunes would install. Tried installing older version of iTunes (deleted iTunes 8 due to problems) and that wont work. When I did a sof

  • Is there a template for integrating with Twilio?

    Is there a template that can be purchased for easily integrating with Twilio?