Splash Screen then nothing else (Please Help)

I am doing a project for school and this is the first Splash Screen I have done. My splash screen displays and exits ,but the application doesn't start.
Here is my code for the splash screen:
public class SplashPanel extends JWindow {
private int duration;
private int running;
/** Creates a new instance of SplashPanel */
public SplashPanel(int d) {
duration = d;
public void showSplashPanel(){
JPanel content =(JPanel)getContentPane();
content.setBackground(Color.WHITE);
int width =875;
int height=450;
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
int x = (screen.width=width)/2;
int y = (screen.height-height)/2;
setBounds(x,y,width,height);
JLabel label = new JLabel(new ImageIcon("chefsong.gif"));
JLabel otherLabel = new JLabel("Welcome to South Park!");
otherLabel.setFont(new Font("Arial", Font.BOLD, 20));
Color oraRed = new Color (156, 20, 20, 255);
content.setBorder(BorderFactory.createLineBorder(oraRed, 10));
setVisible(true);
try{
Thread.sleep(duration);}
catch
(Exception e){}
setVisible(false);
public void showSplashPanelAndExit(){
showSplashPanel();
System.exit(0);
and here is the code for my application:
ublic class DisplayContainer extends JPanel implements spInterface{
private SplashPanel sp;
/** Creates a new instance of DisplayContainer */
public DisplayContainer() {
setLayout(new GridLayout(1,1));
sp= new SplashPanel(10000);
sp.showSplashPanelAndExit();
public void setImagePanel(){
ImagePanel ip1 = new ImagePanel("kyle14.gig");
ImagePanel ip2= new ImagePanel("kenny2.gif");
ImagePanel ip3= new ImagePanel("stan14.gif");
setLayout(new GridLayout(3,1,5,5));
ip1.setDelay(20);
ip2.setDelay(30);
ip3.setDelay(40);
add(ip1);
add(ip2);
add(ip3);
validate();
public void displayIt(String s){
if(s.equals("Start")){
System.out.println("The start button was clicked.");
System.out.println("Cartman says, Let's begin the damn race.");
else if (s.equals("Reset")){
System.out.println("The reset button was clicked");
System.out.println("Kenny says, I can't believe you are making me start over");
else if(s.equals("Stop")){
System.out.println("The stop button was clicked");
System.out.println("Chef says, Why are you stopping the damn race?");
else if(s.equals("Exit")){
System.out.println("The exit button was clicked");
System.exit(99);
repaint();
I actually have othe classes including an interface, main, and image panel. Any help you can give me is greatly appreciated. Thanks in advance.

Your DisplayContainer constructor calls showSplashPanelAndExit()
which will cause the application to end because of System.exit(0). Is
this what you intend?
(When you post code use the "code" tags described here:
http://forum.java.sun.com/help.jspa?sec=formatting Type [code] at
the start of your code and  at the end. That way the code will
be formatted and readable.)

Similar Messages

  • Blue screen of death? I just updated my MacBook Air with the latest OX (25 Jun 11). When I restart - I get the Apple logo and then a blue screen and nothing else. Help!!!

    Blue screen of death? I just updated my MacBook Air with the latest OX (25 Jun 11). When I restart - I get the Apple logo and then a blue screen and nothing else. Help!!!

    Insert the install disk and press c on startup. Select your langauge then, if there's a menubar click utilities then click Disk Utility. If you didn't see the menubar continue with the installer until you see it.
    Once in disk utitly select the drive and repair permissions.
    After the repair is done, quit the utiltiy.
    You can try to reboot and see if it works if you reboot, but if it doesn't repeat the same as before again.
    Now you can continue with the installer and install the os.
    Quit

  • I am using a new Mini Mac via HDMI, I get the First gray screen then nothing else

    I am a First time user of a Mac and I've gone toturn it on fr the first time today, i conected it to a HD ready LCD tv via HDMI and get the first gray 'loading' screen then an 'English' over the speekers then nothing else
    Any help would be apreciated

    Make sure the TV's menu is actually set to connect to that HDMI port.
    Make sure the TV is 1080p and is setup to use that resolution on the HDMI port in question.
    Try zapping the PRAM, by following these instructions:
    http://support.apple.com/kb/ht1379

  • Premiere ele 11 get splash screen then nothing

    Premiere Elements 11: Version 20120921.B275.435760
    Dell Latitude E6430
    Intel Core i5-3210M @ 2.5GHz
    RAM 8 GB
    320 GB SCSI drive with 30% available
    Windows 7 Professional SP1 64 bit
    I have been using APE 11 for over a year now with no difficulties.  Yesterday I installed a new Logitech kb/mouse and trackball and APE quit working.  It will start the splash screen then completely stops with no error message.
    I watched task manager/processes and can see the APE process start and then it goes away as soon the splash screen disappears.
    I uninstalled the Logitech drivers, rebooted and no change.
    Next I deactivated and deleted APE and scanned with PCMatic, Malware, REGPRO, and Hit Man Pro. All are run from the local drive.  No problems out of the ordinary were found.
    I rebooted the computer then downloaded a fresh copy of APE 11 from the Adobe website.
    Installation was done with virus checker and firewall turned off.
    I am still having the same problem.
    Photo Elements and Lightroom both are working fine.
    Anybody have a suggestion.  I have two client videos that I need to produce and more coming so I cannot afford to get behind.
    Thanks
    Dave

    Dave
    Let us cut to the standby deleting the Premiere Elements 11 Adobe Premiere Elements Prefs file and, if necessary, the whole 11.0 Folder in which it exists.
    Local Disk C
    Users
    Owner
    AppData
    Roaming
    Adobe
    Premiere Elements
    11.0
    and in the 11.0 Folder is the Adobe Premiere Elements 11 Prefs file that you delete. If that does not work, then delete the whole 11.0 Folder in which the Adobe Premiere Elements Prefs file exists. Be sure to be working with Folder Option Show Hidden Files, Folders, and Drives active so that you can see the complete path cited.
    When the splash screen (Welcome Screen) appears, do you see a progress bar with the features being loaded or nothing? If you do see this activities, on which feature does the loading activity stop?
    We will be watching for your progress.
    Thank you.
    ATR
    Add On...have you looked at the issue with and without the antivirus and firewalls disabled? I know that you had them disabled during installation. A ccleaner run through (regular cleaner and registry cleaner parts) may be indicated.
    https://www.piriform.com/ccleaner

  • My mac shows a grey screen and spinning gear and nothing else. please help! i want my mac to work again :/

    My mac needed new updates and after clickign update it soon told me there was an error and it froze. I then let it sit fo about 15 minutes adn nothign changed so I restarted it and ever since then all my computer will show is the grey screen and a spinning gear :/ can anyone help me with this problem?

    I had the same issue, and I had recently backed-up my files (mostly because the mac was acting wonky before this even happened), so I did an erase and install. Then I ran through all the software upgrades and installed all of them. When I did a required restart (for the Mac OS X 10.4.11 update) it went BACK to grey screen with spinning ball. Talk about frustrating!
    I think there is something weird going on with the iTunes update and the Mac OS X 10.4.11 update. But one can't be used without the other. So I'm not sure how to update everything safely and get an up to date system, without having all the problems I had before. So now I'm using Mac OS X 10.4.7 so I can have a stable system to do my work, but I can't run iTunes 7.0. I'm too scared to update OS b/c I can't waste another day re-installing everything (for like the third time).
    I'm a pretty new Mac user (year and half) so this may sound really dumb, but any suggestions would be very welcomed. I may start a new thread instead of hijacking this one...

  • My ipad gets a black bar over part of the screen then freezes up, please help

    Just today my 16gb ipad 2 ,bought in December 2011, started to get a black bar over part of the screen.  Sometimes 3/4 of the screen sometimes 1/4 then it freezes up and will not do anything.  If I try to reboot it I get a faint backlit only.  Any help would be appreciated!

    On the iPad tap Settings > iCloud
    Toggle Documents & Data off then back on then restart your iPad.
    Hold the On/Off Sleep/Wake button down until the red slider appears. Slide your finger across the slider to turn off iPhone. To turn iPhone back on, press and hold the On/Off Sleep/Wake button until the Apple logo appears.
    On the iMac open System Preferences > iCloud
    Deselect the box next to Documents & Data then reselect it then restart your iMac.

  • I try to download a video from a JVC Everio GZ-E200 and can't.  I am able to go as far as connect to PC but nothing else , please help

    I try to download a video from a JVC camera, it will go as far as playback on PC but than nothing happens, I followed the instructions in the booklet the camera comes with

    The latest versions of InDesign will not run on XP.  Here is a link to a page that lists the system requirements for most versions of InDesign.  As you will see CS6 will run on XP and is still being sold if you would like to try that out.
    Purchase CS6 products:
    http://www.adobe.com/products/catalog/cs6._sl_id-contentfilter_sl_catalog_sl_software_sl_c reativesuite6.html
    You can download the 30 day trial version of the software thru the page linked below and then use your current serial number to activate it after you make the purchase (if you do).
    Be sure to follow the steps outlined in the Note: Very Important Instructions section on the download pages at this site and have cookies enabled in your browser or else the download will not work properly.
    CS6: http://prodesigntools.com/adobe-cs6-direct-download-links.html

  • Lightroom 5 won't download, Got as far as entering code, ready to download, then nothing. Please help

    Using windows vista with google chrome. Downloaded 10x, and all I'm getting is files called 'arvato'. Can anyone help me out please?

    Try downloading thru the following page(s) if you are not already doing so.
    Lightroom - all versions
    Windows
    http://www.adobe.com/support/downloads/product.jsp?product=113&platform=Windows
    Mac
    http://www.adobe.com/support/downloads/product.jsp?product=113&platform=Macintosh

  • Library says it's loading and then nothing! Please help?

    Hi All,
    I'm trying to get my itunes copied over from my old Sony Viao to my new Mac book pro. I've set up my homesharing and my old library appears in my itunes shared section on the mac, but there are no songs in there. Everytime I click on it says 'loading library' but nothing then happens, no songs no nothing!
    Have I set something up wrong or is there something I can do to change this?
    Many thanks

    You've posted to the iTunes Match forum, which you question does not appear to be related to. You'll get better support responses posting to the iTunes for Mac forum.

  • HT201412 Facebook will not open. It just goes to blank Facebook screen then closes. Please help?

    Any suggestions?

    Standard troubleshooting...
    Try a reset by pressing the home and sleep buttons until you see the Apple logo, ignoring the slider if, it comes up. Takes about 5-15 secs of button holding and you won't lose any data or settings.
    Remove all apps from Recently Used list...
    - From any Home Screen, double tap the home button to bring up the Recents List
    - Tap and hold any icon in this list until they wiggle
    - Press the red (-) to delete all apps from this list.
    - Press the home button twice when done.
    If still a problem restore with your backup.
    If still a problem restore as new, i.e. without your backup. See how it runs with nothing synced to it.
    If still a problem, it's likely a hardware issue.

  • My grandsons new Apple refurbed 35g ipad keeps locking up with a black screen amd nothing else. I have reset it many times pressing the home and off buttons together but uit keeps locking up. Help,please!

    My grandsons new Apple refurbed 35g ipad keeps locking up with a black screen amd nothing else. I have reset it many times pressing the home and off buttons together but it keeps locking up. Help,please!

    Thank you for trying to help. I followed your instructions, it took 6 hours to download, and then said it could not solve the problem (something to do with error 9?). It will have to go back to Apple - its only 3 days since it came out of the package and its very disappointing for him. Looks like I have to hang around in the Apple store in Plymouth all tomorrow until they can fix it, or will change it. Thanks for your help.

  • My ipod touch is showing a usb pointing to the itunes logo on the screen and nothing else.  It won't switch on beyond that.  Please help!

    my ipod touch is showing a usb pointing to the itunes logo on the screen and nothing else.  It won't switch on beyond that.  Please help!

    Sounds like your iPod is in restore mode. Connect it to iTunes. iTunes will pop a little message up saying that your iPod is in restore mode and asking you if you want to restore it, click yes. Your iPod will restore to factory settings and you will be given the chance to restore from a backup. You can do this or set it up as a new iPod.
    Here is Apple's page on restoring your iPod.
    http://support.apple.com/kb/ht1414
    Hope that helps.

  • PlayBook only red light comes on when connected to charger/usb and then nothing else HELP PLEASE !!!!

    got a playbook which all of a sudden starting doing this tried the debricking method tried connecting ot my mac without the battery and still nothing doesnt connect and also tried on pc but still nothing someone please help i need to get up and running asap 
    Thank You 

    mangera wrote:
    got a playbook which all of a sudden starting doing this tried the debricking method tried connecting ot my mac without the battery and still nothing doesnt connect and also tried on pc but still nothing someone please help i need to get up and running asap 
    Thank You 
    without a battery in what?
    You will have to keep presssing the power button every so often whist on charger until the red light stays on. Got a few hours to spare? like whilst watching TV?  
    Check out the other solutions in the sticky thread, start around page 60.

  • Ipod touch 4g wont connect to itunes or come out of recovery mode, its just stuck on the connect to itunes screen and will not come out, i tried doing a restore but something happened and now it wont finish or do anything else please help

    ipod touch 4g wont connect to itunes or come out of recovery mode, its just stuck on the connect to itunes screen and will not come out, i tried doing a restore but something happened and now it wont finish or do anything else please help and my itunes will not see that its connected. i also tried going though control panel and restarting the service and nothing happens. also i tried redoing the driver but its saying it cannot find any drivers for it

    lol ok nvm i fixed it

  • Since updating to iOS 6, my 4th gen iPod touch, and my 3rd gen iPad has sound in and out. Sometimes it's on, and then all of a sudden, no sound. I've tried everything from restarting to fully resetting each one starting fresh, but nothing. Please help.

    Since updating to iOS 6, my 4th gen iPod touch, and my 3rd gen iPad has sound in and out. Sometimes it's on, and then all of a sudden, no sound. I've tried everything from restarting to fully resetting each one starting fresh, but nothing. Please help.

    I have exactly the same problem. I have tried almost everything and I am nowhere near an Apple shop as I am working in Africa.
    Did you manage to find a solution? Help please if possible. Regards Az

Maybe you are looking for

  • How to Archive/move  a file in Tcode AL11

    Hi Experts, How to arvhieve a file or move the file from one path to other path in AL11. For one of the inbound file, i need to archive it after preocessing the data. Appreciate your response, Preetham

  • Where can I find a User Manual for Mavericks?

    Is there a Mavericks User Manual? If so, where can I find it?

  • URGENT!! Default Vendor Payment Methods

    Hello SAP Folks, Question: Is there a way to default a vendor payment method when the payment method is not defined while creating the invoice?  Let's say in the vendor master there are 3 payment methods .. Wire, ACH payments and Checks ... there is

  • Accessing and using the Clipboard

    It is very seldom that I need to use the Clipboard, so I never can remember how to accesss it on the rare occasions that it is useful.  I FINALLY found it today, but I don't want to have to go through this again, Therefore, I have two qustions: (1) I

  • Performance problem with query on bkpf table

    hi good morning all , i ahave a performance problem with a below query on bkpf table . SELECT bukrs            belnr            gjahr       FROM bkpf       INTO TABLE ist_bkpf_temp       WHERE budat IN s_budat. is ther any possibility to improve the