Splash Screen Appears as a White Rectangle

Hi,
I am trying to show a splash screen in my application, which is to be shown as long as a runtime process has completed execution.
The code i used for the Splash screen is:
import javax.swing.JWindow;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.SwingUtilities;
import java.awt.MediaTracker;import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.*;
public class Splash implements Runnable
private JWindow splashWindow;
private String message;
protected JLabel label;
public Splash(String initMsg)
this.message = initMsg;
public void run()
label = new JLabel(message);
splashWindow = new JWindow();
splashWindow.getContentPane().add(label, BorderLayout.CENTER);
splashWindow.pack();
splashWindow.setSize(splashWindow.getSize().width, splashWindow.getSize().height);
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
splashWindow.setLocation(dim.width/2 - splashWindow.getWidth() /2,dim.height/2 -
splashWindow.getHeight()/2);
splashWindow.toFront();
splashWindow.show();
public JWindow getWindow()
return splashWindow;
public void close()
splashWindow.dispose();
public void showStatus(final String status)
label.setText(status);
splashWindow.show();
In my main program, i am using the Splash class as follows:
splash = new Splash("Drawing Graph...");
Thread th = new Thread(splash);
th.start();
while (splash.getWindow() == null || !splash.getWindow().isShowing())
try
th.sleep(100);
catch (InterruptedException e){}
try
Thread.sleep(1000);
catch (InterruptedException e) {}
Process proc = null;
proc = Runtime.getRuntime().exec(....some process to draw a graph....);
proc.waitFor();
// deal with the proc streams....
splash.showStatus("Drawing Graph....Done");
splash.close();
The problem is that, the splash window appears as a blank rectangle without any string on in. It appears and closes properly. But, it does not show the status string.
Please help!!!
thanks,
bblak

You're blocking the event dispatch thread so no repaints can be processed.
Take a look at SwingWorker or http://spin.sourceforge.net.
Sven

Similar Messages

  • Tecra M5 - Press Ctrl-Alt-Delete splash screen appears while booting

    Wondered if anyone has come across this before...
    Tecra M5 boots up ok and arrives at the "Press Ctrl-Alt-Delete" splash screen... the "Help" button is permanently "selected" so as soon as I press CTRL and ALT the explanation (Help) screen comes up telling me what to do... and I can't get past that at all... I've tried attaching a USB keyboard with the same result. I need to somehow "clear" the Help button ....
    Any idea's gratefully received.

    Problem solved... use the Alt GR key instead... worked first time !!

  • White rectangle at startup

    Hi, after the splash screen i see a white rectangle in the up-left corner. It evanesces after about 5seconds.
    Do you know what's it? tanks

    quarkup wrote:
    I got the same issues, i am using kde 4.3
    nvidia 6800 go (the latest drivers)
    therefore is not a problem of intel video driver.
    I've kde 4.3 too, do you have the plasmoid for view folder on desktop? or some plasmoid with superkaramba?

  • White rectangle on Safari screen

    When I bring up the Safari screen there is a white rectangle that blocks whatever I bring up with Google. I can't get rid of it. This has only started recently. Anybody know how I can eliminate this?

    Sounds odd. You should try a reset first (hold the Home and Sleep/Wake buttons down together until you see the Apple logo then release. If that doesn't do it, then you will need to restore the iPod (via iTunes).

  • Main program start before splash screen, help

    hi:
    below is the splash screen code:
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.io.PrintStream;
    import java.util.Random;
    class Splash extends JWindow {
         public Splash(String filename, Frame f, int waitTime) {
              super(f);
              JLabel l = new JLabel(new ImageIcon(filename));
              getContentPane().add(l, BorderLayout.CENTER);
              pack();
              Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
              Dimension labelSize = l.getPreferredSize();
              setLocation(screenSize.width / 2 - (labelSize.width / 2), screenSize.height / 2 - (labelSize.height / 2));
              addMouseListener(new MouseAdapter() {
                   public void mousePressed(MouseEvent e) {
                        setVisible(false);
                        dispose();
              final int pause = waitTime;
              final Runnable closerRunner = new Runnable() {
                   public void run() {
                        setVisible(false);
                        dispose();
              Runnable waitRunner = new Runnable() {
                   public void run() {
                        try {
                             Thread.sleep(pause);
                             SwingUtilities.invokeAndWait(closerRunner);
                        } catch (Exception e) {
                             e.printStackTrace();
                             // can catch InvocationTargetException
                             // can catch InterruptedException
              setVisible(true);
              Thread splashThread = new Thread(waitRunner, "SplashThread");
              splashThread.start();
    below is the constructor that started the splash and the main:
    public static void main(String args[])
    PictureViewer PV = new PictureViewer();
    standaloneApp = true;
    splash Splash sw = new Splash("prestigestetho.gif",null, 5000);
    the splash appear just fine, the problem is that it appears after
    my main program appear first.
    I try to shift the priority of splash, which is sw first and then PV,
    in that case the splash screen appear first then PV, but this time PV
    stay in front of sw makes it totally not viewable.
    is there any method to make splash screen appear first and on the screen you can see the process of main program starting up (for example
    : loading this ...., loading that.....) something like acrobat reader's
    startup screen, and then splash screen disappear and then main program
    pop up.

    okay, I got it, it's under SwingSet2.java the related code is as follow:
    // Used only if swingset is an application
    private JFrame frame = null;
    private JWindow splashScreen = null;
    // The tab pane that holds the demo
    private JTabbedPane tabbedPane = null;
    private JEditorPane demoSrcPane = null;
    private JLabel splashLabel = null;
    * SwingSet2 Constructor
    public SwingSet2(SwingSet2Applet applet, GraphicsConfiguration gc) {
    // Note that the applet may null if this is started as an application
         this.applet = applet;
    // Create Frame here for app-mode so the splash screen can get the
    // GraphicsConfiguration from it in createSplashScreen()
    if (!isApplet()) {
    frame = createFrame(gc);
    // setLayout(new BorderLayout());
         setLayout(new BorderLayout());
    // set the preferred size of the demo
         setPreferredSize(new Dimension(PREFERRED_WIDTH,PREFERRED_HEIGHT));
    // Create and throw the splash screen up. Since this will
    // physically throw bits on the screen, we need to do this
    // on the GUI thread using invokeLater.
    createSplashScreen();
    // do the following on the gui thread
         SwingUtilities.invokeLater(new Runnable() {
         public void run() {
              showSplashScreen();
    initializeDemo();
         preloadFirstDemo();
         // Show the demo and take down the splash screen. Note that
         // we again must do this on the GUI thread using invokeLater.
         SwingUtilities.invokeLater(new Runnable() {
         public void run() {
              showSwingSet2();
              hideSplash();
         // Start loading the rest of the demo in the background
         DemoLoadThread demoLoader = new DemoLoadThread(this);
         demoLoader.start();
    * Show the spash screen while the rest of the demo loads
    public void createSplashScreen() {
         splashLabel = new JLabel(createImageIcon("Splash.jpg", "Splash.accessible_description"));
         if(!isApplet()) {
         splashScreen = new JWindow(getFrame());
         splashScreen.getContentPane().add(splashLabel);
         splashScreen.pack();
         Rectangle screenRect = getFrame().getGraphicsConfiguration().getBounds();
         splashScreen.setLocation(
    screenRect.x + screenRect.width/2 - splashScreen.getSize().width/2,
              screenRect.y + screenRect.height/2 - splashScreen.getSize().height/2);
    public void showSplashScreen() {
         if(!isApplet()) {
         splashScreen.show();
         } else {
         add(splashLabel, BorderLayout.CENTER);
         validate();
         repaint();
    * pop down the spash screen
    public void hideSplash() {
         if(!isApplet()) {
         splashScreen.setVisible(false);
         splashScreen = null;
         splashLabel = null;

  • Must Press Spacebar or HP Splash Screen Hangs There Indefinitely

    Weirdest thing ever... A little background first. I had a VERY hard time getting this computer to do a recovery to factory settings. After about 11 attempts switching between disc set ordered from HP and the recovery discs I made from the computer it FINALLY finished. (All other attempts I got a message that said recovery failed and then had the option of three choices...something like "View Log" "Save Log' and "Retry") What I did that FINALLY let the recovery finish all the way was to press the spacebar on keyboard every time the HP splash screen came up. Then, the little white circles under the hp logo would start moving and it would go on to the next part of the software/driver installation. Now, however, every time I restart the computer I HAVE to press the spacebar once or it just hangs on the hp splash screen. I have done ALL windows updates and all driver updates via HP website. The only additional software I have installed is Mozilla Firefox. I have reset BIOS to factory defaults - Secure Boot back on since I had to disable it to install with discs. Little things like time & date are correct. I've run diagnostic on all hardware and it passes.PLEASE HELP!!!! I have never encountered anything like this before and I am at a loss as to how to fix it!!!!!!!!!! Thank-you for taking the time to respond!!!

    HI ,  Thank you for your query.  I grasp that you must press the spacebar whenever the HP splash screen appears to continue. You have done all the Windows and HP updates but the difficulty remains.  You have also reset the bios back to factory. What is the current version of your bios? Have you ran the Windows troubleshooter? If you start in Safe Mode does the difficulty remain? HP PCs - Windows 8 Safe Mode  Would you please try this step.Go to the command prompt and run as administratorType sfc /scannow and press enter This will scan for corrupted files and try to repair them.Once this completes please restart your notebook and run one more time. If the issue remains  please try to determine the offending program uisng system configuration.Using System Configuration (msconfig)Please note the section on services.  I suggest you use the 50/50 method to narrow down the results.Hide all microsoft services.Disable 1/2 of the servies and try starting your notebook to see if the difficulty remains.If it does go back and enable the first 50% and disable the other 50% ( remember to hide Microsoft services) and restart.Continue in this manner to determine if a particular service  is causing the issue. Next I would try a refresh your PC. This should reinstall the operating sytstem but not affect your personal files.HP PCs - Refresh Your PC to Resolve Problems (Windows 8). You can contact HP support for assistance. They can remotely access your notebook to help find and fix the difficulty.Please contact HP support at Contact HP Support   To say thanks for replying please click the thumbs up button below. If this resolved your difficulty, please notify people  by choosing solution provided.  Best of Luck! 

  • SQL Developer locks after splash screen

    I have succesfully installed SQL Developer on 2 machines in our group and it works fine. However on the machine where we really need it (mine) it absolutely refuses to work.
    It appears to start up, the splash screen appears and the sqldeveloper.exe appears in the machine's task list but thats it! The splash screen stays on the screen until I click on it and then disappears.
    I have tried the version with the built in SDK and I have also downloded the SDK from Sun and tried the version without the accompanying SDK. I have also de-installed all the Java SDK and runtime versions on the machine and re-installed those that were needed. Same result.
    At this stage I called in our Java development guru who twiddled and tweaked during 30 minutes...same result.
    If I execute sqldeveloper.exe from within the jdev\bin folder I see the following in a DOS box:
    java.lang.NullPointerException
    at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:11
    at javax.swing.UIDefaults.getUI(UIDefaults.java:721)
    at javax.swing.UIManager.getUI(UIManager.java:860)
    at javax.swing.JPanel.updateUI(JPanel.java:104)
    at javax.swing.JPanel.<init>(JPanel.java:64)
    at javax.swing.JPanel.<init>(JPanel.java:87)
    at javax.swing.JPanel.<init>(JPanel.java:95)
    at javax.swing.JRootPane.createGlassPane(JRootPane.java:482)
    at javax.swing.JRootPane.<init>(JRootPane.java:313)
    at javax.swing.JFrame.createRootPane(JFrame.java:247)
    at javax.swing.JFrame.frameInit(JFrame.java:228)
    at javax.swing.JFrame.<init>(JFrame.java:195)
    at oracle.ide.IdeCore$StartupWindow.<init>(IdeCore.java:1458)
    at oracle.ide.IdeCore.startupImpl(IdeCore.java:1084)
    at oracle.ide.Ide.startup(Ide.java:672)
    at oracle.ideimpl.Main.start(Main.java:49)
    at oracle.ideimpl.Main.main(Main.java:25)
    but I don't know if this is really relevant as that is not the normal start path.
    The machine/OS spec is as follows:
    OS Name     Microsoft Windows XP Professional
    Version     5.1.2600 Service Pack 1 Build 2600
    OS Manufacturer     Microsoft Corporation
    System Name     XP224
    System Manufacturer     Hewlett-Packard
    System Model     HP Compaq dc7100 CMT(PC928A)
    System Type     X86-based PC
    Processor     x86 Family 15 Model 3 Stepping 4 GenuineIntel ~2992 Mhz
    Processor     x86 Family 15 Model 3 Stepping 4 GenuineIntel ~2992 Mhz
    BIOS Version/Date     Hewlett-Packard 786C1 v01.05, 16/06/2004
    SMBIOS Version     2.3
    Windows Directory     C:\WINDOWS
    System Directory     C:\WINDOWS\System32
    Boot Device     \Device\HarddiskVolume1
    Locale     United Kingdom
    Hardware Abstraction Layer     Version = "5.1.2600.1106 (xpsp1.020828-1920)"
    Time Zone     Romance Daylight Time
    Total Physical Memory     512.50 MB
    I would be very grateful for any suggestions anyone may have as to the nature of this problem.
    Thanks
    Paul BJ

    See post:
    java.lang.NullPointerException
    Regards,
    Eric

  • Adobe Photoshop CS3 Extended freezes on startup under Windows 7 Ultimate 64-bit - No splash screen

    I installed my licensed copy of Adobe Photoshop CS3 Extended today as part of my install a bunch of software after a reinstall of Windows (due to viruses).  I did a completely fresh install of Windows 7 Ultimate 64-bit.  I've used Photoshop CS3 Extended for quite a while now so I know what to expect on startup but it was previously installed under Windows XP Professional (32-bit). Figured I would give Windows 7 a chance this time around.
    Google searches aren't turning up anything.  When I attempt to start the application, I get a window with the title "Adobe Photoshop CS3" (no "Extended" - I seem to recall the title changes later) and the toolbar appears.  However, no splash screen appears and no Product Activation wizard appears - the application simply freezes on an empty frame and a toolbar.  I've tried running Photoshop as Administrator (right-click, "Run As Administrator"), but nothing changed there.  I tried uninstalling and reinstalling.  I tried upgrading to CS3 10.0.1.  Nothing works.  The application simply freezes before it gets anywhere.
    I tried calling Adobe Support since this technically falls under installation issues but their phone support systems are down today.  Go figure.
    Edit:  I hooked into Photoshop with the Visual Studio debugger and every single thread is executing some variation of WaitForSingleObject() or WaitForMultipleObjects().  The main thread is "executing" somewhere in AdobeLM_libFNP.dll (at address 09619d81 - if I had debugging symbols for CS3, I could provide a function).  There are nine threads "running" at the point the freeze occurs - but all of them are technically suspended due to the functions they are executing - and one thread is in a suspended state.

    Log Name:      Application
    Source:        Application Hang
    Date:          7/17/2010 6:16:25 PM
    Event ID:      1002
    Task Category: (101)
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Description:
    The program Photoshop.exe version 10.0.1.0 stopped interacting with Windows and was closed. To see if more information about the problem is available, check the problem history in the Action Center control panel.
    Process ID: d0c
    Start Time: 01cb2616be79e36f
    Termination Time: 2
    Application Path: C:\Program Files (x86)\Adobe\Adobe Photoshop CS3\Photoshop.exe
    Report Id: 06f5fbff-920a-11df-9d69-001fd023417e
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Application Hang" />
        <EventID Qualifiers="0">1002</EventID>
        <Level>2</Level>
        <Task>101</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2010-07-18T01:16:25.000000000Z" />
        <EventRecordID>1615</EventRecordID>
        <Channel>Application</Channel>
        <Security />
      </System>
      <EventData>
        <Data>Photoshop.exe</Data>
        <Data>10.0.1.0</Data>
        <Data>d0c</Data>
        <Data>01cb2616be79e36f</Data>
        <Data>2</Data>
        <Data>C:\Program Files (x86)\Adobe\Adobe Photoshop CS3\Photoshop.exe</Data>
        <Data>06f5fbff-920a-11df-9d69-001fd023417e</Data>
        <Binary>430072006F00730073002D0074006800720065006100640000000000</Binary>
      </EventData>
    </Event>
    And, according to the Event Viewer, the "Binary" data translates to a zero-terminated Unicode string of "Cross-thread".
    My Visual Studio analysis was far more informative.  All threads are hung inside of WaitForSingleObject() and WaitForMultipleObjects() calls and the DLL in question appears to be FlexNet-related.  I did forget to mention that I also even manually started the FlexNet service in case, for some strange reason, Photoshop was waiting for it to start.  That also did not work.
    (And there is nothing in the Action Center control panel either despite the message saying there might be more information there.)
    Edit:  The timestamp above might be a little odd-looking.  I didn't originally see anything in Event Viewer until I clicked the first button to send an Error Report.  Mostly I just skipped that part of killing a process.

  • Splash screen behavior

    I'm unclear on the behavior of the "splash" screen in a custom viewer. I understand that for a single issue app, the splash screen image appears every time that you run the app, regardless of where you left off reading the app last.
    But for multi-issue apps, te splash screen seems to "come and go". I've noticed that it appears the first time that you run the app, and then once in a blue moon after that. But it doesn't appear each time you actually read an issue within the app.
    Can anyone tell me what the behavior of the splash screen is supposed to be for a multi-issue app?
    What I really want is the ability to have a splash screen image that ALWAYS appears when you enter any issue in a multi issue app. In other words, I want the reader to see our corporate branding every time they read or re-read each issue of a multi-issue app.
    Second question: is it on the future roadmap to allow animation or video in this "splash" screen image?

    The splash screen appears for 2 or 3 seconds whenever the app needs to be loaded. If the app is stored in the device's memory, the splash screen doesn't appear. On the iPad, you can get double-tap the Home button to display the app tray and then remove the app from the tray (tap and hold, delete). When you start the app again, the splash screen appears. I'm not aware of a way to get the splash screen to appear even if the app is loaded into the device's memory.

  • Premiere CC - Crash on splash screen - Tried the usual solutions

    Premiere CC crashes immediately upon the splash screen appearing.
    I've tried everything I've read here that might work:
    Reinstalling
    Clearing the preferences in the AppData folder
    Signing out and logging back in to CC
    Restarting the computer
    Updating the video card
    Changing language preferences
    Still nothing.
    Here is the error log:
    System
    Provider
    [ Name]
    Application Error
    EventID
    1000
    [ Qualifiers]
    0
    Level
    2
    Task
    100
    Keywords
    0x80000000000000
    TimeCreated
    [ SystemTime]
    2014-02-05T01:17:39.000000000Z
    EventRecordID
    63376
    Channel
    Application
    Computer
    Studio
    Security
    EventData
    Adobe Premiere Pro.exe
    7.2.1.4
    52aed7f3
    amdocl64.dll
    10.0.1084.4
    50d22720
    c0000005
    0000000000062e07
    1340
    01cf22100e91f7b0
    C:\Program Files\Adobe\Adobe Premiere Pro CC\Adobe Premiere Pro.exe
    C:\Windows\system32\amdocl64.dll
    4d77ae70-8e03-11e3-a368-00044b03b541

    Welcome to the forum, Duklyon,
    The "Faulting Module Path" (amdocl64.dll) led me to this thread: http://forums.adobe.com/thread/1343944?tstart=0. The solution recommended there is to delete that dll file from C:\Windows\system32\.

  • Drop Shadow for Windows Splash Screen

    Hi,
    I need to create a splash screen for a client who is a Windows software developer.
    I'm working on a Mac with Photoshop CS3.
    It's simple enough given that I just have to create a 320x240 image and send it over to them.
    However what I'd like to do is add a drop shadow to the graphic which shows up with transparency when the splash screen appears on the Windows desktop.
    Any clues?
    Thanks.

    With what technology is the developer working? . . . Pass.
    What file formats can they accept? . . . I'll give PNG24 a go on a dummy graphic and ask them to try it.
    Thanks.
    Bob.

  • Bluetooth keyboard not working when prompted for wifi splash screen io7

    I just upgraded to IO7 on my ipad and I use the apple bluetooth keyboard. However, when the WiFi splash screen appear to login using say Cisco's login the keyboard does not work. Meaning it does not accept keystrokes. Because the keyboard is paired there is no way to show the normal onscreen keyboard unless you unpair.
    My work around has been to dismiss the splash screen and open up safari then try to hit a website which then produces the splash screen within the browser. Then I'm able to use the keyboard again. Anyone had the same issue and is there a work around as this is highly annoying.

    Thank for showing interest in my situation and trying to answer, however yes...
    FROM ABOVE: "Attempting to repair the keyboard accomplished nothing, however I did learn that when prompted to enter the bluetooth 4 digit code for pairing the keyboard was able to send the 4 numerical digits and striking the return key did succesfully pair the keyboard to the iPad again."
    I'm going to try "Forgetting the Device", turning off the Bluetooth Keyboard, Turning off the iPad 2 iOS7, Turning the iPad 2 iOS7 back on, Turning the Bluetooth Keyboard back on, then setting it up via the Bluetooth menu again. Doubt turning off the iPad will accomplish much, but it will be good to have it scratched off the list.

  • Splash Screen never goes away

    I'll post this again because a lot of people are having this same problem, but to my knowledge no one has solved it.
    In Compressor 3.5.1, when you load Compressor the splash screen appears but never goes away until you click "About Compressor" and then click on the splash screen, then it will disappear. I have trashed preferences and the problem persists.

    I finally found a fix that helped me out on 2 different problems:
    First was the issue with the green bar appearing on the right side of the frame.
    Second, the Compressor Splash screen never disappeared after it had finished loading. Once you clicked on About Compressor then the splash screen it would finally disappear. This didn't cause any performance issues.
    Thanks to monoschluzz in the following post for the directions to fix this nagging issue:
    http://discussions.apple.com/message.jspa?messageID=10575848#10575848
    Here are the directions he provided:
    Stop all rendering in Compressor. From the Compressor Menu choose "quit all background processing" and close Comressor. Open a Finder window, choose " got to folder " from Finder's "go to" menu and type
    /var/spool/qmaster/
    Done that you're in the "Qmaster" folder. In that folder there are one or more weird named folders (random numbers & characters - i.e. 76646663-DD71D83A)
    Delete that weird named folder (NOT the Qmaster folder itself) and restart Compressor.
    At this point I was able to render clean mov's without nasty green pixels.
    Hope that helps!

  • Premiere Pro CC won't go passed splash screen

    Hello,
    I just went from a trial version to full membership but starting up Premiere Pro won't go further then the splash screen. The loading doesn't even start. I tried reinstalling Premiere, rebooting the Mac, logging in and out of CC, but nothing works.
    What to do?
    Thanx!
    MacBook Pro 17"
    2,66 GHz Intel Core i7
    4 GB 1067 MHz DDR3
    NVIDIA GeForce GT 330M 512 MB
    OS X 10.9.1 (13B42)

    Try trashing your preferences:
    http://helpx.adobe.com/en/premiere-pro/using/preferences.html
    To restore default preference settings, hold down Alt (Windows) or Option (Mac OS) while the application is starting. You can release the Alt key or Option key when the splash screen appears.

  • Splash screen Only

    So for some odd reason Flash Media Live Encoder decided not to run anymore. When I try to run  the program the splash screen appears, goes away and.... Nothing happens, I have uninstalled rebooted reinstalled, rebooted a couple times and still nothing happens
    I have a windows 7, 64 bit pc and the version of FMLE is 3.1 please help thanks

    It looks like a problem with the default video device present on your machine. Do one thing - search for the startup.xml file (should be there in your user folder) and change the video device tag's value to 1. If that doesn’t work out delete the startup.xml file. If nothing works, disable audio-video devices one-by-one on your machine and run FMLE. Basically, you need to find out the device which is creating problems for FMLE.

Maybe you are looking for