Is it possible to have a program start with a splash screen?

Would it be possible to have a program show a splash screen while loading with Java's latest release 1.4.0 ?
If it is possible, could anybody explain me how.. and maybe show me a little example? :)
Thanks in advance

I just implemented this with one of my applications.
I wrote a class which extends JWindow and adds a JLabel icon to the contentPane.
The class containing the main method instantiates this class, makes the window visible, wait's some time and deletes the window:
Through the Dimension object I calculate the center of the screen
=> Splash screen
import javax.swing.*;
import java.awt.*;
class Splash extends JWindow
JPanel pane;
public Splash()
super();
setBounds(300, 225, 300, 200);
pane = new JPanel();
ImageIcon image = new ImageIcon("logo.jpg"); //Splash logo
Dimension dim = this.getToolkit().getScreenSize();
int height = (int) dim.getHeight() / 2;
int width = (int) dim.getWidth() / 2;
int iconheight = image.getIconHeight();
int iconwidth = image.getIconWidth(); // Center of Screen
int x = width - (iconwidth / 2);
int y = height - (iconheight / 2);
setLocation(x, y);
JLabel label = new JLabel(image);
pane.add(label);
setContentPane(pane);
pack();
=> "Main Method"
import util.*;
import app.*;
import java.awt.*;
import javax.swing.*;
public class Main
public static void main(String[] args)
Splash splash = new Splash();
splash.setVisible(true);
try
Thread.sleep(10000);
catch (InterruptedException e)
splash.setVisible(false);
splash = null;

Similar Messages

  • Can't access firefox anymore because "it does not have a program associated with it"

    Suddenly today I was unable to launch firefox as normal. Told that "this file does not have a program associated with it for performing this action" And that I should create an association in the Folder Option control panel. I have not been able to work out how to do this, and wonder where the program (that has obviously been there for the past few years) has disappeared to?? I am still using Windows XP....... could it be something to do with that?

    There are some malware infections that make it hard to run programs (EXE) files. Hopefully you do not have one of those.
    Could you check whether it is a problem with your shortcut by starting Firefox a different way:
    Start menu > Run, type or paste the following and then press the Enter key or click Go:
    firefox.exe

  • Powershell shortcut gives"this file does not have a program associated with it for performing this action"

    Hi,
    We have a server where powershell gives an error. The shortcut or the context menu for start button (replaced cmd in context menu) gives an error saying "this file does not have a program associated with it for performing this action".
    In some events, like going to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\System Tools\Windows PowerShell.lnk and opening it results in bupkus. Nothing happens.
    Browsing to C:\Windows\system32\WindowsPowerShell\v1.0\ and running powershell.exe directly or opening cmd.exe and typing powershell <enter> runs powershell as it should.
    What gives?
    This posting is provided "AS IS" with no warranties or guarantees and confers no rights

    Hi,
    I'd probably try asking here:
    https://social.technet.microsoft.com/Forums/en-us/home?forum=winserver8gen&filter=alltypes&sort=lastpostdesc
    This is more of an OS issue than a PowerShell issue, IMHO.
    Good luck.
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • When a program starts with /cc... what does it signify??

    Hi experts,
              When a program starts with /cc... what does it signify??For example if it is like /ccaev/casdfge.
    Thanks in advance
    regards,
    Ashwin

    HEllo,
    Check this
    Reservation Procedure
    Any customer or partner with a development system which has Release 4.0A or later can use SAPNet - R/3 Frontend to apply for a reservation for their own development namespace. You need to give the following information:
    Namespace name (recognizably connected to your company)
    Purpose of the namespace (for example, central group development, or the name of a planned specific enhancement to SAP)
    Installation numbers of the SAP Systems in which you want to develop
    Available Names
    Names for namespaces are selected freely from the pool of names that have not yet been reserved and should have a recognizable reference to the company making the reservation. The names must have at least 5 characters and can be up to 10 characters long. The first and last character is a slash "/". Names beginning with "/SAP" or "/n" (n = digit) are not available. Only individual names are given.
    Development of a specific SAP solution by the system reseller ABCD
    Reserved namespace: "/ABCD/"
    SAP enhancements by SAP customer ABC123
    Reserved namespace: "/ABC123/"
    To go through completely about the naming convention then check this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/6b0afe547a11d189600000e829fbbd/frameset.htm
    Vasanth
    Message was edited by:
            Vasanth M

  • Getting this error while opening a folder : This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel

    Hi,
    While trying to open a folder on my Windows 7 Home Premium, an error comes "This file does not have a program associated with it for performing this
    action.  Please install a program or, if one is already installed, create an association in the Default Programs control panel." I tried searching on the net but did not get great support for the issue when it happens with folder opening.

    Hi Nikunj Shah,
    First, I suggest you download
    Microsoft Safety Scanner or
    Malicious Software Removal Tool to run a full scan.
    The error messages here seems to be caused by the corrupted registries, which related with the folder association.
    You may take a try to merge the following registry settings to reset the folder association, before that, remember to backup your registry settings first:
    How to back up and restore the registry in Windows
    Copy and paste the following commands into Notepad, and save it to a .reg file:
    =================
    Windows Registry Editor Version 5.00
    [HKEY_CLASSES_ROOT\Folder]
    "ContentViewModeLayoutPatternForBrowse"="delta"
    "ContentViewModeForBrowse"="prop:~System.ItemNameDisplay;~System.LayoutPattern.PlaceHolder;~System.LayoutPattern.PlaceHolder;~System.LayoutPattern.PlaceHolder;System.DateModified"
    "ContentViewModeLayoutPatternForSearch"="alpha"
    "ContentViewModeForSearch"="prop:~System.ItemNameDisplay;System.DateModified;~System.ItemFolderPathDisplay"
    @="Folder"
    "EditFlags"=hex:d2,03,00,00
    "FullDetails"="prop:System.PropGroup.Description;System.ItemNameDisplay;System.ItemTypeText;System.Size"
    "NoRecentDocs"=""
    "ThumbnailCutoff"=dword:00000000
    "TileInfo"="prop:System.Title;System.ItemTypeText"
    [HKEY_CLASSES_ROOT\Folder\DefaultIcon]
    @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
      00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,68,00,\
      65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,33,00,00,00
    [HKEY_CLASSES_ROOT\Folder\shell\explore]
    "MultiSelectModel"="Document"
    "ProgrammaticAccessOnly"=""
    "LaunchExplorerFlags"=dword:00000018
    [HKEY_CLASSES_ROOT\Folder\shell\explore\command]
    "DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"
    [HKEY_CLASSES_ROOT\Folder\shell\open]
    "MultiSelectModel"="Document"
    [HKEY_CLASSES_ROOT\Folder\shell\open\command]
    "DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"
    @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
      00,5c,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,2e,00,65,00,78,00,\
      65,00,00,00
    [HKEY_CLASSES_ROOT\Folder\shell\opennewprocess]
    "MUIVerb"="@shell32.dll,-8518"
    "MultiSelectModel"="Document"
    "Extended"=""
    "LaunchExplorerFlags"=dword:00000003
    "ExplorerHost"="{ceff45ee-c862-41de-aee2-a022c81eda92}"
    [HKEY_CLASSES_ROOT\Folder\shell\opennewprocess\command]
    "DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"
    [HKEY_CLASSES_ROOT\Folder\shell\opennewwindow]
    "MUIVerb"="@shell32.dll,-8517"
    "MultiSelectModel"="Document"
    "OnlyInBrowserWindow"=""
    "LaunchExplorerFlags"=dword:00000001
    [HKEY_CLASSES_ROOT\Folder\shell\opennewwindow\command]
    "DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"
    [HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\BriefcaseMenu]
    @="{85BBD920-42A0-1069-A2E4-08002B30309D}"
    [HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\Library Location]
    @="{3dad6c5d-2167-4cae-9914-f99e41c12cfa}"
    [HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\Offline Files]
    @="{474C98EE-CF3D-41f5-80E3-4AAB0AB04301}"
    [HKEY_CLASSES_ROOT\Folder\ShellEx\DragDropHandlers\{BD472F60-27FA-11cf-B8B4-444553540000}]
    @=""
    [HKEY_CLASSES_ROOT\Folder\ShellEx\PropertySheetHandlers\BriefcasePage]
    @="{85BBD920-42A0-1069-A2E4-08002B30309D}"
    [HKEY_CLASSES_ROOT\Folder\ShellEx\PropertySheetHandlers\Offline Files]
    @="{7EFA68C6-086B-43e1-A2D2-55A113531240}"
    [-HKEY_CLASSES_ROOT\Folder\ShellNew]
    [HKEY_CLASSES_ROOT\Folder\ShellNew]
    "Directory"=""
    "IconPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
      74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
      00,68,00,65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,33,00,\
      00,00
    "ItemName"="@shell32.dll,-30396"
    "MenuText"="@shell32.dll,-30317"
    "NonLFNFileSpec"="@shell32.dll,-30319"
    [HKEY_CLASSES_ROOT\Folder\ShellNew\Config]
    "AllDrives"=""
    "IsFolder"=""
    "NoExtension"=""
    ==================
    Once done, right-click the REG file and choose Merge. Alternately, you can open the Registry Editor and then using the
    Import option from the File menu, to merge the REG file contents.
    Let me know if you need any further help.
    Best regards
    Michael Shao
    TechNet Community Support

  • Every time I update or repair in the control panel it comes up with a error message like, this file does not have a program associated with it for performing this action, please install a program if it is installed create an association to the default pro

    EVERYTIME I UPDATE SOFTWARE OR GO INTO THE CONTROL PANEL TO ITUNES TO REPAIR OR CHANGE IT GIVES ME AN ERROR MESSAGE
    THIS FILE DOES NOT HAVE A PROGRAM ASSOCIATED WITH IT FOR PERFORMING THIS ACTION. PLEASE INSTALL A PROGRAM, IF IT IS INSTALLED CREATE AN ASSOCIATION TO THE DEFAULT PROGRAMS CONTROL PANEL

    STOP SHOUTING!  Or at the very least, get the CAPS lock key fixed.
    Remove iTunes.
    Download and install the current version of iTunes from http://www.apple.com/itunes/download

  • Tying to install itunes and I get error message "This file does not have a program associated with it for performing this action.  Please install a program, or if one is already installed, create an association in the Default Programs control panel.  Help

    am tTying to install itunes and I get error message "This file does not have a program associated with it for performing this action.  Please install a program, or if one is already installed, create an association in the Default Programs control panel. Can anyone help me?

    Hi,
    Here is a similar thread for your reference:
    There is no email program associated to perform the requested action. Please install an email program or, if one is already installed, create an association in the Default programs control panel
    http://social.technet.microsoft.com/Forums/en/w7itproappcompat/thread/036e3cf6-bff7-4ef2-bd0a-555cd2399ad4
    Hope this helps
    Vincent Wang
    TechNet Community Support

  • Is it possible to have 2 separate accounts with totally different and independent music on the same computer?

    IS it possible to have 2 separate accounts with totally different music libraries on same computer with multiple iPods synced to the computer,

    Same answer as last time you asked the same question.
    Can I create 2 separate itune accounts on same PC?

  • I have LR 5.  When I'm in the book module and select the option to "Send Book to Blurb" i get an error message saying "The file does not have a program associated with it...."  How do I fix this?

    I have LR 5.  When I'm in the book module and select the option to "Send Book to Blurb" i get an error message saying "The file does not have a program associated with it for performing this action.  Please install a program, or if one is already installed, create an association in the Default Programs control panel."
    How do I fix this?

    Try the following user tip:
    "There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows

  • Keeps telling me my file does not have a program associated with it and go to folder options in the control pane. Where is it located

    When I try to save a file the download window keeps coming up. When I click to open the erro message says "File does not have a program associated with it for performing this function. Create an association in the folder options control panel." Where is this control panel and what kind of association do I make. Usually it was adobe but I don't have that choice

    Try using this link first https://support.mozilla.org/en-US/kb/change-firefox-behavior-when-open-file?esab=a&s=File+does+not+have+a+program+associated+with+it+for+performing+this+function&r=0&as=s
    Also it could be the type of file you are downloading. Like if it was a type of text that your default word processor did not accept it would give you that message.
    Hope this helps,
    Jeremy Eramian

  • This file does not have a program associated with it...

    Ok, I'm not awesome at technological troubleshooting, so if someone could help me, I would be grateful because I'm getting frustrated.
    I'm trying to play a silly little game online and it's telling me I need Shockwave.  I know I have it because I've played this game before (something time-wasting on addictinggames.com) and I found a file called Shockwave 11 in C:\\WINDOWS\system32\Adobe\Shockwave 11 with all sorts of things in it.
    I checked my Add/Remove Programs list and it says I have Adobe Shockwave 11.5 and that it is used rarely.
    Since there seems to be a glitch here that I don't understand, I went to the Download Shockwave page on this site and tried to download the latest version or whatever, if that would work.  The gray progress bar moves across under the "Adobe Shockwave Player is now installing" line and then I get an error popup that says:
    "This file does not have a program associated with it for performing this action.  Create an association in the Folder Options control panel."
    What am I supposed to do?  What does this mean?  What file?  Huh??
    I am running Internet Explorer 7 and have Windows XP.
    I am a total noob and need to be spoken to like a child.  Can anyone please help me? 

    I clicked on your link (thank you - where did you get that?) and installed the Full version, apparently successfully, though during the download there were a couple of components that were troublesome. 
    The error message I got during setup read: "Error opening file for writing: C:\WINDOWS\system32\Adobe\Director\SWDNLD.EXE   Click Abort to stop the installation, Retry to try again, or Ignore the skip this file."  Retry did not work, despite having clicked it 10s of times.  I clicked Ignore, then got the same message again, but about a different file: C:\WINDOWS\system32\Adobe\Director\SwDir.dll   Clicking Retry again did not help move things along, so I ignored this one too.  What does this problem indicate?  Do I need to do something here?
    Those are the only errors encountered during setup.  I declined the Google toolbar.  The dialog box says Successfully Completed; I clicked Close.
    So I go to try to play this game as a test and it says "Installing Shockwave Components" and then I get the same error popup telling me that this file does not have a program associated with it for performing this action and that I need to create an association in the Folder Options control panel!
    What does this mean and how do I do it, since it appears to be critical to getting this thing to work...?

  • 'This file does not have a program associated with it for perfoming this action'?

    'This file does not have a program associated with it for perfoming this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel". Any help? This error message has never come up before. I have tried to open the page on 3 different devices but the same error message. All help is greatly appreciated as I need to print the page out for my course I am doing. Thanks all.

    You get this when doing what?  Can you post a link to the page that gives you this message?

  • This file does not have a program associated with it for performing this ac

    Hi all,
    After creating an application for a WebDynpro project, when I execute the project (Deploy New Archive and Run) the application I am receiving then following error message.
    "This file does not have a program associated with it for performing this action. Create an association in folder options in control panel."
    Pls can anyone provide the solution.
    Regards
    Ravi

    Maybe the problem its on the Run part. It is supposed to open a navigator and go to the URL of the application you just deployed.
    Try deploying on one step and then Running on other.
    If it is the Run then open the navigator and test your App.

  • This file does not have a program associated with it for performing this action

    hi
    whenever i install adobe reader in my system it change my all program to adobe reader nd can't open any application.. i mean internet explorer change in adobe reader, C++, microsoft office every application...why its happened....
    and even i can't open pdf files on my system it shows a erroe the file does not have a program associated with it to perform this action.. please create a association in control panel

    This's the message showing!!

  • TS3989 Mssage when opening Photo Stream on-"This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel" Help!!!

    Mssage when opening Photo Stream on-"This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel" Help!!!

    You are posting in the "icloud on my mac" forum, but your profile mentions Windows.  If using a mac, you need to have iphoto or aperture installed in order to receive new photos via photo stream.  If using windows, try posting in the iCloud on a PC forum.  You'll get better help there.
    https://discussions.apple.com/community/icloud/icloud_on_my_pc

Maybe you are looking for

  • HP 7310 All-in-One Printer Error Message

    Error message "Remove and check color cartridge" has been appearing, but has in the past gone away by doing just that. . Today, it became permanent, even after installing a new color cartridge. . I cannot even turn the machine OFF except by pulling p

  • Strange noise from right sight of macbook (please listen to video to judge)

    strange sounds coming from right side of macbook pro. To me it seems like something is spinning or vibrates, although it sometimes seems that it has something to do electronics: by touching the macbook the sound changes pitch...just look to the vid t

  • Php form and mail handling

    I am trying to create a php form and I can get it to spit out the information from the form but I cannot seem to get it to send the result as an email. This is probably something really simple and I am totally missing it. Here is the form: <form meth

  • Linking a pdf to a button

    I'm completely new to flash and have figured out most of the basic features on my own thus far, but I'm completely stumped with this one issue of linking a pdf to a button.  I have read and reread all the postings on how to do this, but my button is

  • How to increase disk read and write speed after installing new SSD (2009 Macbook Pro)? Why not as fast as advertised?

    Hi everyone, I just installed a Crucial MX10512 GB SSD into my 2009 Macbook Pro. It's definitely much faster, but the read and write disk speed is around 200 Mb/s for both versus the 300-500 Mb/s that the SSD advertised. Any ideas as to why? And is t