Displaying Loading Screen

Hello,
I'm trying to make a simple loading screen that consists of a JFrame that has a JTextArea. I have a thread that will change the text in the textarea every 3 seconds. For some reason it will not load display. However I have put a print command to prompt and it works there fine. Any ideas? I've tried several different combination of threads with no luck. Here is the basic idea of what happens:
Code from main program:
new loadingWindow("loading");
I have a long process running.
loadingWindow.killLoadingThread();Code for loadingWindow:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class loadingWindow extends JFrame
     private String loading[] = {"Loading","Loading.","Loading..","Loading...","Loading....","Loading....."};
     private JTextField currentString;
     private JFrame frame;
     public static boolean threadFlag=false;
     public loadingWindow(String title)
          displayWindow(title);          
          new LoadingThread();
     public void displayWindow(String title)
          frame = new JFrame(title);
          currentString = new JTextField(50);
          frame.add(currentString);
          frame.getContentPane();
          frame.setSize(200,100);
          frame.setVisible(true);
     public static void killLoadingThread()
          threadFlag=false;
     class LoadingThread extends Thread
          public LoadingThread()
               threadFlag=true;
               start();
          public void run()
               int counter=0;
               try
                    while(threadFlag)
                         System.out.println(loading[counter]);
                         currentString.setText(loading[counter]);
                         Thread.sleep(300);
                         counter++;
                         if(counter==loading.length)
                              counter=0;
               catch(Exception e){}
               dispose();
}Basically I want to have a window open up and have a simple text animation run until it is told to stop, while I have a long process running. The long process is a function that gets content from a webpage, so it's not like my processor is at max or anything. Any help would be greatly appriciated.
Thank's
Ricky

Thanks for the quick response. I tried using a timer and got the same result. I made a quick little testing problem that causes the same error that I had before. When you run it you will see that the second JFrame stays blank.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class tester extends JFrame implements ActionListener
     private JButton start;
     public tester()
          super("test");
          start = new JButton("Start");
          start.addActionListener(this);
          this.add(start);
          setSize(100,100);
          setVisible(true);
     public void actionPerformed(ActionEvent e)
          begin();
     public void begin()
          new loadingWindow("loading");
          try
               Thread.sleep(10000);
          catch(Exception e){}
          loadingWindow.killLoadingThread();
          dispose();
     public static void main(String args[])
          tester test = new tester();
          test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}thanks in advance for any help
Ricky

Similar Messages

  • My macbook had a weird behavior on the display, now it won't go further than gray loading screen with the apple logo

    My macbook had a weird behavior on the display, now it won't go further than gray loading screen with the apple logo. It's a macbook pro early 2011. I've read that those are having issues, if there's someone i can contact for further information, report the issue since it's getting common or any temporal solution available. Thanks

    Reinstall Lion, Mountain Lion, or Mavericks without erasing drive
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Repair
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported then click on the Repair Permissions button. When the process is completed, then quit DU and return to the main menu. Select Restart from the Apple menu.
    Reinstall Mountain Lion or Mavericks
    OS X Mavericks- Reinstall OS X
    OS X Mountain Lion- Reinstall OS X
         Note: You will need an active Internet connection. I suggest using Ethernet
                     if possible because it is three times faster than wireless.

  • When turning on my mac book pro it displays a screen with apple logo and begins loading a loading bar, after this continues to show loading circle however has been like this all day still no different. Tried turning it on and off however still same!

    When turning on my mac book pro it displays a screen with apple logo and begins loading a loading bar, after this continues to show loading circle however has been like this all day still no different. Tried turning it on and off however still same!

    ... then run Disk Utility, Repair Disk.
    Also:
    Resolve startup issues and perform disk maintenance with Disk ...
    Mac troubleshooting FAQ: start-up woes
    How To Fix Common Mac Startup Problems
    Mac Stalls on Gray Screen at Startup - Troubleshooting Mac Startup ...

  • Is there a way to display a "loading screen" for dataGrid?

    Hi All,
    I have a dataGrid that is loading a lot of data and it takes a good 5 seconds before all the data is loaded and displayed into the dataGrid. I would like to show a loading screen that has a nice little loader animation when the data is being downloaded and processed by the dataGrid.
    I was looking at possible events that the dataGrid dispatches that might help me but I am unsure of which ones to use. Can anyone give me a pointer please?
    Thanks,
    Colin

    What is slow? Fetching the data, post-processing it on the client, or rendering it?
    If it's the fetch or pre-processing, you can put up a simple loading screen overlay by using rawChildren (I believe). We do something similar.
    If it's rendering, Flash Player is already busy rendering--it won't have time to render an additional loading screen. But you should not be spending that much time rendering anyway.
    The events you need to react to will depend on where the slowdown occurrs.

  • Best Practice with Spark, display an animated loading screen

    In the past I would use Flash to create assests and then write the actionscript to interact with those assets.  So if I wanted to show an animated loading screen, I would create it in flash with the animation tools, set up it up to be a class of "LoadingScreen", then whenever I wanted to show a loading screen I would just create a new instance of LoadingScreen and add it to the stage.  When I eventually get a responce from my server I would remove the LoadingScreen.
    I want to do this in Flash Builder using the latest tools (states, spark, skinning, etc).  How would you do this?
    I imagine I won't have to create a seperate state for my various pages plus an extra state for each page showing the loading screen, correct? (page1, page1Loading, page2, page2Loading, etc)
    I have created the animated loading screen in Flash and exported the file out as a swc, so I have access to it in Builder, but what do I do from there, I can't do an addChild.
    Any ideas?  I am still trying to get my head around how to work with all of these new tools.

    I'm not really sure what you were doing before, but you can use the Flash Component Kit to export your Flash content and bring it in to Flex.  Flash Builder exposes this more readily today as you can create a Flash component, and it'll open up Flash Authoring and automatically use the Flash Component Kit for Flex behind the scenes.  If you dont' care much about getting the sizing of your Flash content correct in Flex, you could just addChild() your Flash content to a UIComponent, which is what I assume you were doing before.
    In terms of Spark states and skins, I'm not really sure what your question is.  You can drop your Flash component in to a skin if you want and use states to control when it is visible just like another other component in Spark.

  • Unable to boot Z10, stuck on loading screen at 99% after a few hours.

    Hi, I am unable to boot Z10, stuck on loading screen at 99% after a few hours. I did not try to update, nor load any other OS versions.  Running a Bell Canada 10.1.  Tried to pull battery, leave phone boot for 5 hours, still stuck on 99%.  I tried plugging it in BB Link and computer will not recognize it.

    dazedandconfused wrote:
    Every option Im seeing is telling me Im going to lose my data... is this true? I know with other phones ppl are able to mount the device as if it were a hard drive and pull content from it... is this not possible with the Z10? Thanks...
    I understand you are frustrated and seeking solutions, but please don't double and triple post your inquiry.
    I've answered your thread already, here: 
    Re: Z10 stuck on loading logo on starting up
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How to clear grey loading screen and animated gif (Dynamic Action with "Show Processing" on submit)

    APEX V4.2.3
    DB 11.2
    I have a classic report on page 1.  I have a region button called "Export" (defined by a submit dynamic action with "show processing=Yes") that submits the page and then via a branch directs me to page 2 which has a slightly different version of the report on page 1 (i.e. no breaks) which I want to capture as a CSV export.  Therefore I've set the report template on page 2 to " Export:CSV".
    Now when I click on the page 1 export button the grey screen and loading gif appears indicating that the report is executing and then as expected, page 2 doesn't appear but instead the standard open/save window's dialog box appears asking to open or save the generated CSV file.  All good..but the grey loading screen remains.  How do I clear this loading screen and get back to the context of page 1 ?
    thanks in advance
    PaulP

    Hi PPlatt,
    We would love to help but you left out one crucial part of the puzzle: namely how does your CSV report get exported. With the way it is setup (a redirect to another page), I'm going to assume you do that because you have some PL/SQL on that page that prints the CSV.
    Now there are two questions that are crucial here:
    - How do we stop the icon from bugging us on the screen
    - How do we communicate with the browser that it should no longer display the loading icon
    The first question is rather easy, two simply lines of codes can do that:
    $('#apex_wait_popup').hide();
    $('#apex_wait_overlay').hide();
    But when do we use this code? Quite simple when the document is downloaded. When is it downloaded? At the end of the PL/SQL code that prints the document to the browser.
    What you could do is at the end of that code give an application item a certain value. For example :AI_PRINTED := 'Y';
    Then all you need to do is let the browser ask for the value. You could do this by using JavaScript to continuously fire AJAX to the server using a JS timing event:
    http://www.w3schools.com/js/js_timing.asp
    Better would be a Server send event, but since you left out another crucial piece of information: your browser, I will not go deeper into this.
    Start this timing event when someone asks for the document, and end it as soon as the process returns that :AI_PRINTED equals 'Y'.
    Despite the lack of information, I hope I have given, or at least inspired you to get to the solution.
    Regards,
    Joni

  • [Solved] After watching several youtube html5 720p videos, Firefox (version 33) display or screen turns black and aero transparency in windows 7 turns opaque.

    Hello ! I just want to share something familiar with that black display or screen occurs for some people. When I watch youtube videos, I used to watch them in html5 720p videos (not flash videos, https://www.youtube.com/html5 ). I upgraded firefox to version 33. No black display when I used it. Randomly and after watching several html5 videos on youtube, aero transparency in my windows 7 turns opaque and firefox display goes all black. Firefox doesn't respond at any command. I need to kill his process in task manager in order to close it. When I open firefox again, normal display goes. To relaunch aero transparency in windows 7, I need to restart the service whose name is, I think, "Desktop Window Manager Session Manager". I use windows 7 in french and the service name is "Gestionnaire de sessions de Gestionnaire de fenetrage".
    To solve this, I upgraded my graphic driver but this didn't work. I tried to put "layers.offmainthreadcomposition.enabled" to false in "about:config" menu. No random black display but some html elements turned black for some seconds or definitely when firefox rendered web pages. I tried to uncheck "Use hardware acceleration when available" in options menu. No random black display but html5 720p videos didn't play smoothly.
    Then, I chose to watch youtube 720p videos again with flash player and no random black display and html5 720p videos played normally.
    Here are my graphic acceleration infos :
    Date du pilote 7-2-2014
    Description de la carte NVIDIA GeForce GTS 360M
    DirectWrite activé false (6.2.9200.16492)
    Fenêtres avec accélération graphique 1/1 Direct3D 11 (OMTC)
    GPU #2 active false
    ID du périphérique 0x0cb1
    ID du vendeur 0x10de
    Pilotes de la carte nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um
    RAM de la carte 1024
    Rendu WebGL Google Inc. -- ANGLE (NVIDIA GeForce GTS 360M Direct3D9Ex vs_3_0 ps_3_0)
    Version du pilote 9.18.13.4052
    windowLayerManagerRemote true
    AzureCanvasBackend skia
    AzureContentBackend cairo
    AzureFallbackCanvasBackend cairo
    AzureSkiaAccelerated 0
    I hope this will be useful to solve this problem in future versions or to someone.

    This is happening to me too, I don't know if this is an Adobe Flash Player 11.5's bug or it's just my computer. All my browsers, chrome, IE9, Fox, doesn't even load anime videos. I tried reinstalling 11.5 many times, it have no effect but I use IE9 64-bit to run the videos that couldn't run. I waited 25 min for a JW player to load an episode of anime and I'm sick of it.

  • IBook has no video until after the Apple loading screen

    Just as the title says, the iBook (14" G4) will not show video until after the grey Apple loading screen.  It first displays when the Tiger loading screen comes up.  Any ideas?  I've tried a PRAM reset and NVRAM reset.  Anything else I can try?
    Thanks

    You could try resetting the PMU, but as long as it's working okay otherwise, I don't think I'd worry about it.

  • SAP GUI FOR HTML - SAP Netweaver loading screen

    We have an SAP EP7 portal with an ECC 6.0 R/3 backend. In the portal I have an SAP Transaction iView using transaction code PA64. The display in the portal uses SAP GUI for HTML.
    The iView loaded correctly (i.e. displayed the transaction screen correctly in the Portal Content Area) until our recent SP upgrades to the R/3 backend and portal. For the backend we moved from SP13 to SP15. For the portal we moved from SP14 to SP18.
    The issue that I now have is that an SAP Netweaver (SAP GUI FOR HTML) loading screen now appears (for about 5 seconds) prior to the PA64 transaction screen being displayed in the Portal Content Area.
    Whilst I accept that this is not a major issue, I would like to suppress the display of this loading screen. Does anyone know how this can be achieved?
    Many thanks
    Audre Beenen

    Thanks Michael.  We also updated our system and are having the same issue.   As you advised and I see in the SAP note, I'm going to add the ~nosplash parameter.   We do have SAPKB70017.  Is there a particular value associated with that parameter when it is added in SICF?
    Thanks,
    Pam Laverty

  • IOS adhoc displays black screen after launch

    Hi,
    my iOS application displays black screen after slash screen.nothing happens and couldn't see any proper errors on debug utility.
    I can build adhoc using flash builder and it's works fine but problem occurs when I create ipa using dumped config file on command line(ant)
    I'm using flex sdk 4.6 and AirSDK 15.0(overladed) .my application includes few native extensions.
    mxmlc
    mxmlc -load-config app-config.xml src/mobapp.mxml -output myapp.swf
    adt
    <target name="build-release-adhoc-package-ipa">
        <echo>::building captive-runtime release-adhoc ipa..</echo>
        <exec executable="${FLEX_BIN}/adt" failonerror="true">
            <arg line="-package" />
            <arg line="-target ipa-ad-hoc" />
            <arg line="-storetype pkcs12" />
            <arg line="-keystore ${provision.dir}/release-adhoc.p12" />
            <arg line="-storepass 12345" />
            <arg line="-provisioning-profile ${provision.dir}/release_adhoc.mobileprovision" />
            <arg line="${adhoc.dir}/ios-adhoc.ipa" />
            <arg line="${src}/mobapp-app.xml" />
            <arg line="myapp.swf" />
            <arg line="${icon.dir}/applicationIcon16.png" />
            <arg line="${icon.dir}/applicationIcon32.png" />
            <arg line="${icon.dir}/applicationIcon36.png" />
            <arg line="${icon.dir}/applicationIcon48.png" />
            <arg line="${icon.dir}/applicationIcon57.png" />
            <arg line="${icon.dir}/applicationIcon72.png" />
            <arg line="${icon.dir}/applicationIcon76.png" />
            <arg line="${icon.dir}/applicationIcon114.png" />
            <arg line="${icon.dir}/applicationIcon120.png" />
            <arg line="${icon.dir}/applicationIcon128.png" />
            <arg line="${icon.dir}/applicationIcon152.png" />
            <arg line="${base.dir}/[email protected]" />
            <arg line="-extdir ${src}/ane" />
            <arg line="-platformsdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPh oneOS.sdk" />
        </exec>
        </target>
    please help.

    Hi,
    my iOS application displays black screen after slash screen.nothing happens and couldn't see any proper errors on debug utility.
    I can build adhoc using flash builder and it's works fine but problem occurs when I create ipa using dumped config file on command line(ant)
    I'm using flex sdk 4.6 and AirSDK 15.0(overladed) .my application includes few native extensions.
    mxmlc
    mxmlc -load-config app-config.xml src/mobapp.mxml -output myapp.swf
    adt
    <target name="build-release-adhoc-package-ipa">
        <echo>::building captive-runtime release-adhoc ipa..</echo>
        <exec executable="${FLEX_BIN}/adt" failonerror="true">
            <arg line="-package" />
            <arg line="-target ipa-ad-hoc" />
            <arg line="-storetype pkcs12" />
            <arg line="-keystore ${provision.dir}/release-adhoc.p12" />
            <arg line="-storepass 12345" />
            <arg line="-provisioning-profile ${provision.dir}/release_adhoc.mobileprovision" />
            <arg line="${adhoc.dir}/ios-adhoc.ipa" />
            <arg line="${src}/mobapp-app.xml" />
            <arg line="myapp.swf" />
            <arg line="${icon.dir}/applicationIcon16.png" />
            <arg line="${icon.dir}/applicationIcon32.png" />
            <arg line="${icon.dir}/applicationIcon36.png" />
            <arg line="${icon.dir}/applicationIcon48.png" />
            <arg line="${icon.dir}/applicationIcon57.png" />
            <arg line="${icon.dir}/applicationIcon72.png" />
            <arg line="${icon.dir}/applicationIcon76.png" />
            <arg line="${icon.dir}/applicationIcon114.png" />
            <arg line="${icon.dir}/applicationIcon120.png" />
            <arg line="${icon.dir}/applicationIcon128.png" />
            <arg line="${icon.dir}/applicationIcon152.png" />
            <arg line="${base.dir}/[email protected]" />
            <arg line="-extdir ${src}/ane" />
            <arg line="-platformsdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPh oneOS.sdk" />
        </exec>
        </target>
    please help.

  • FF37 on JB 4.2 device displays black screen in videos while sound runs correctly

    After starting random video from sites like for example YouTube and Vimeo, smartphone (Samsung Galaxy grand neo) begin to lagging for a moment while video frame display loading symbol. Afterwards symbol disappear and screen turn black while sound plays correctly.
    Problem first appeared after I had
    updated FF from version 35 to 36 and its also visible on freshly installed FF37 beta. Strangely, on device default browser and chrome everything works fine and w/o any lagging. I tried to resolve this by turning off hardware acceleration in browsers settings, install specific addons(5html everywhere) and even reinstall FF36 and FF37b but nothing helped.
    Any idea how to fix it will be highly appreciated. Cheers.

    It has been already reported on the Bugzilla. https://bugzilla.mozilla.org/show_bug.cgi?id=1139844
    If you have similar issue, please go to this page and upvote. That help gain attention and will increase probability for resolving issue in next edition. Cheers.

  • My MacBook is stuck on the loading screen. Please help! Not sure what to do

    Hi, so my MacBook has stopped working for some reason
    I've just tried switching it on but it has stopped on the loading screen.
    I am scared and not sure what to do.
    Please help!!!

    Take each of these steps that you haven't already tried. Stop when the problem is resolved.
    Step 1
    The first step in dealing with a boot failure is to secure your data. If you want to preserve the contents of the startup drive, and you don't already have at least one current backup, you must try to back up now, before you do anything else. It may or may not be possible. If you don't care about the data that has changed since your last backup, you can skip this step.   
    There are several ways to back up a Mac that is unable to boot. You need an external hard drive to hold the backup data.
         a. Boot into the Recovery partition, or from a local Time Machine backup volume (option key at startup.) When the OS X Utilities screen appears, launch Disk Utility and follow the instructions in this support article, under “Instructions for backing up to an external hard disk via Disk Utility.”
    b. If you have access to a working Mac, and both it and the non-working Mac have FireWire or Thunderbolt ports, boot the non-working Mac in target disk mode. Use the working Mac to copy the data to another drive. This technique won't work with USB, Ethernet, Wi-Fi, or Bluetooth.
    c. If the internal drive of the non-working Mac is user-replaceable, remove it and mount it in an external enclosure or drive dock. Use another Mac to copy the data.
    Step 2
    Press and hold the power button until the power shuts off. Disconnect all wired peripherals except those needed to boot, and remove all aftermarket expansion cards. Use a different keyboard and/or mouse, if those devices are wired. If you can boot now, one of the devices you disconnected, or a combination of them, is causing the problem. Finding out which one is a process of elimination.
    If you've booted from an external storage device, make sure that your internal boot volume is selected in the Startup Disk pane of System Preferences.
    Step 3
    Boot in safe mode. Note: If FileVault is enabled on some models, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Post for further instructions.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    When you boot in safe mode, it's normal to see a dark gray progress bar on a light gray background. If the progress bar gets stuck for more than a few minutes, or if the system shuts down automatically while the progress bar is displayed, your boot volume is corrupt and the drive is probably malfunctioning. In that case, go to Step 5.
    If you can boot and log in now, empty the Trash, and then open the Finder Info window on your boot volume ("Macintosh HD," unless you gave it a different name.) Check that you have at least 9 GB of available space, as shown in the window. If you don't, copy as many files as necessary to another volume (not another folder on the same volume) and delete the originals. Deletion isn't complete until you empty the Trash again. Do this until the available space is more than 9 GB. Then reboot as usual (i.e., not in safe mode.)
    If the boot process hangs again, the problem is likely caused by a third-party system modification that you installed. Post for further instructions.
    Step 4
    Sometimes a boot failure can be resolved by resetting the NVRAM.
    Step 5
    Launch Disk Utility in Recovery mode (see Step 1.) Select your startup volume, then run Repair Disk. If any problems are found, repeat until clear. If Disk Utility reports that the volume can't be repaired, the drive has malfunctioned and should be replaced. You might choose to tolerate one such malfunction in the life of the drive. In that case, erase the volume and restore from a backup. If the same thing ever happens again, replace the drive immediately.
    This is one of the rare situations in which you should also run Repair Permissions, ignoring the false warnings it may produce. Look for the line "Permissions repair complete" at the end of the output. Then reboot as usual.
    Step 6
    Reinstall the OS. If your Mac was upgraded from an older version of OS X, you’ll need the Apple ID and password you used to upgrade.
    Step 7
    Repeat Step 6, but this time erase the boot volume in Disk Utility before installing. The system should automatically reboot into the Setup Assistant. Follow the prompts to transfer your data from a Time Machine or other backup.
    Step 8
    This step applies only to older Macs (not current models) that have a logic-board ("PRAM") battery. Both desktop and portable Macs used to have such a battery. The logic-board battery is separate from the main battery of a portable. A dead logic-board battery can cause a gray screen at boot. Typically the boot failure will be preceded by loss of the startup disk and system clock settings. See the user manual for replacement instructions. You may have to take the machine to a service provider to have the battery replaced.
    Step 9
    If you get this far, you're probably dealing with a hardware fault. Make a "Genius" appointment at an Apple Store to have the machine tested. If you can't get to an Apple Store, go to another authorized service provider.

  • Ihave a emac 1002 emc 1955 that igot from a auction,when i turn it on it never gets pass the loading screen and cant get into utilities

    i have a emac 1002 emc 1955 that wont go pass loading screen and cant get into utilities,i got from a auction and dont want to take it apart if i dont have to so looking for a little help before it goes that far.thanks

    Hi Mike, the Keyboard shouldn't matter, it should be OK in that respect.
    Your kind of stuck without any Install Disc to try to repair it or reinstall, but...
    Tough without the Install disc, but some things to try...
    Does it boot to Single User Mode, CMD+s keys at bootup, if so try...
    /sbin/fsck -fy
    Repeat until it shows no errors fixed.
    (Space between fsck AND -fy important).
    Resolve startup issues and perform disk maintenance with Disk Utility and fsck...
    http://docs.info.apple.com/article.html?artnum=106214
    Tough without the Tiger Disk problems, but try fsck...
    To use fsck, you must run it from the command line. Unlike using your mouse to open an application to do something, you'll need to type a text command at the prompt (#) to tell fsck what to do. The Terminal application (/Applications/Utilities) and single-user mode are two examples of command-line interfaces in which you can type such commands. To use fsck:
    1. Start up your computer in single-user mode to reach the command line. Hold CMD+s keys down at bootup.
Note: If necessary, perform a forced restart as described in the Emergency Troubleshooting Handbook that came with your computer. On desktop computers, you can do this by pressing the reset/interrupt button (if there is one) or holding down the power button for several seconds. On portable computers, simultaneously press the Command-Control-power keys. If your portable computer doesn't restart with this method, you may need to reset the Power Manager.
    2. At the command-line prompt, type /sbin/fsck -fy
    (SPACE between fsck AND -fy important)
    3. Press Return. fsck will go through five "phases" and then return information about your disk's use and fragmentation. Once it finishes, it'll display this message if no issue is found:

    The volume (name_of_volume) appears to be OK 
If fsck found issues and has altered, repaired, or fixed anything, it will display this message:
***** FILE SYSTEM WAS MODIFIED ***** 

Important: If this message appears, repeat the fsck command you typed in step 2 until fsck tells you that your volume appears to be OK (first-pass repairs may uncover additional issues, so this is a normal thing to do).
    4. When fsck reports that your volume is OK, type reboot at the prompt and then press Return.
    http://docs.info.apple.com/article.html?artnum=106214
    Then Safe Boot, (holding Shift key down at bootup), & use Disk Utility from there to Repair Permissions, reboot once more.
    Then Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    Does it boot into Open Firmware with CMD+Option+o+f ?
    http://docs.info.apple.com/article.html?artnum=42642
    reset-nvram (press Enter)
    set-defaults (press Enter)
    reset-all (press Enter)
    Have you done a PRAM reset, CMD+Option+p+r...
    http://docs.info.apple.com/article.html?artnum=2238

  • Loading Screen

    I have a program class that connects to a database,it then carries out a SQL command,this can take up to 5 or 6 seconds sometimes which leaves the user wondering if an error has occured or not,although if an error does occur i deal with it i want some way of having the user know that my program is still computing a command.
    What i want to do is display a JFrame just before the sql command is carried out displaying loading,and then to dispose of it at the end of the code when the sql command is carried out.
    The problem is the JFrame does not display fully until the sql command has finished!
    This is the code for the JFrame
    import java.lang.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    *  This creates a new frame that gives the user the option to exit the program or too go back and
    *     carry out a new query
    public class loadingScreen extends JFrame
        public loadingScreen()
         run();
       public void run()
                frm = new Frame("                           Loading Screen ");
                frm.setResizable(false);
            //Quit this app when the big window closes.
            frm.addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                    System.exit(0);
              createButtons();
            GridBagLayout gb1 = new GridBagLayout();
              GridBagConstraints gbc = new GridBagConstraints();
              frm.setLayout(gb1);
              frm.setBackground(Color.lightGray);
            Font font = new Font("Serif", Font.BOLD, 20);
            buttonFont = new Font("Serif", Font.ITALIC, 10);
              addComp(loadingButton,          frm,     gb1,gbc,     1,1,1,1,1,1,gbc.CENTER);
              positionAtCenter(400,80);
              frm.setVisible(true);
          *     This method positions the frame in the centre of the screen
            private void positionAtCenter(int width, int height){
         Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
         frm.setBounds((screenSize.width-width)/2,
                (screenSize.height-height)/2,
                width,
                height);
          *     This method creates the following buttons and their action listeners
          *     loadingButton          : This button will exit the program completely
          *     stayButton          : This button will close this frame and go back to the main program
           public void createButtons()
                   loadingButton          = new JButton(loadingIcon);
                   loadingButton.setFont(buttonFont);
                   loadingButton.setForeground(Color.blue);
    // this is a helper method for GridBagConstraint Layout
         public void addComp(Component comp,Container cont, GridBagLayout gb1,GridBagConstraints gbc,
                        int row,int col, int numRows, int numCols, double weightx, double weighty,int theAnchor)
              gbc.gridx = col;
              gbc.gridy = row;
              gbc.gridwidth = numCols;
              gbc.gridheight = numRows;
              gbc.weightx = weightx;
              gbc.weighty = weighty;
              gbc.anchor = theAnchor;
              cont.add(comp,gbc);
         public static void main(String[] args)
              loadingScreen load = new loadingScreen();
         private JButton loadingButton;
         private Frame frm;
         private Font buttonFont;
         private ImageIcon loadingIcon = new ImageIcon("Images/loading.gif");
    }Does anyone have any idea of how i could deal with this or have any other suggestion on how i could do it

    You need to use a thread. Here is an [url http://forum.java.sun.com/thread.jsp?forum=57&thread=437592]example.

Maybe you are looking for