Hold a JFrame for a number of seconds

I am experimenting with JFrames to get ahead on my project, but one thing is holding me back and I want to know if it possible. Can you have a frame come up on the screen for a number of seconds and then disappear and continue with the rest of the program? For example, say you are opening up a calculator. You run the program and it pops up with a welcome header. You want this header to display for, say 10 seconds, and then disappear and continue on to dislay the working calculator for the user. I am not into applets yet if that should make any kind of difference.

so you want a slash screen, yes you can.
frame.show();shows the frame, and
frame.hide();will hide the frame.
The easyest way would be
frame.show();
Thread.currentThread().sleep(1000 * 60 * 10); // wait 10 seconds.
frame.hide();However if you do this, you can not be setting up the second window, so something like
class HideFrameTask extends java.util.TimerTask {
   JFrame hideMe;
   public HideFrameTask ( JFrame hideMe ) {
    this.hideMe = hideMe;
   public void run() {
     hideMe.hide();
frame.show();
java.util.Timer timer = new java.util.Timer();
timer.schedule( new HideFrameTask( frame ), 1000 * 60 * 10 );
// make second frame

Similar Messages

  • Slides don't play for correct number of seconds

    I am having a problem getting iPhoto to play individual slides for the correct number of seconds I have selected in the settings window. Any ideas?

    Welcome to the Apple Discussions. Have you taken into account the transition you've chosen?

  • Trackpad periodically doesn't register movement for a number of seconds.

    Every once in a while, probably once a day, my trackpad will stop registering movement for 5ish seconds. It can still click just fine, but it won't move. Usually it will start reading again for a second, then freeze up for another few, and on like that for half a minute until it goes back to normal.
    Has this happened to anyone before?

    I'm having the exact same problem with my MBP. So far I've run all AppleJack's options except for disk permissions and reset the PRAM without success.
    None of these symptoms show up when a mouse is plugged in, which is 90% of the time for me.
    Any input will be greatly appreciated. Thanks.

  • Using i3 - keys start to lag (have to hold key for more than 1 second)

    I'm using i3 and am having trouble with the keys suddenly and I have to restart the session to get it back to normal.  No clue what it could be.  I can use gnome, cinnamon, wmii, and awesome without issue, but i3 is what causes me problems.
    When I type, I have to hold each key for more than 1 second before it registers.  So in order to type "boat" I have to press and hold b for a second, then o for a second or so, same with a and t.  Any idea what I should check first?
    Thanks.
    EDIT:
    It just seems to happen randomly.  When I'm typing, on the web, playing a game, etc.  It's not like it's happening whenever I do a specific task or am running a specific application.
    Last edited by sdouble (2013-04-07 19:30:25)

    UnsolvedCypher wrote:What's your desktop environment?
    Boots into GDM, select my session (i3), and log in that way.  only WM I'm having trouble with this way is i3.
    kaszak696 wrote:Can you see how xev (xorg-xev package) reacts to keypresses? Also, posting relevant configs and logs would be helpful.
    I think i had a similar issue years ago, but i can't remember the details, sorry.
    I haven't checked. I'll check next time it happens.  It happens about once per day.  I'll report back next time.
    Here is my i3 config file.  It's pretty raw, I've really only added a couple things to it (gimp & multimedia keys from keyboard, though I just noticed today that my vol up and down wheel isn't working anymore)
    # This file has been auto-generated by i3-config-wizard(1).
    # It will not be overwritten, so edit it as you like.
    # Should you change your keyboard layout somewhen, delete
    # this file and re-run i3-config-wizard(1).
    # i3 config file (v4)
    # Please see http://i3wm.org/docs/userguide.html for a complete reference!
    set $mod Mod4
    # Font for window titles. Will also be used by the bar unless a different font
    # is used in the bar {} block below. ISO 10646 = Unicode
    font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
    # The font above is very space-efficient, that is, it looks good, sharp and
    # clear in small sizes. However, if you need a lot of unicode glyphs or
    # right-to-left text rendering, you should instead use pango for rendering and
    # chose a FreeType font, such as:
    # font pango:DejaVu Sans Mono 10
    # Use Mouse+$mod to drag floating windows to their wanted position
    floating_modifier $mod
    # start a terminal
    bindsym $mod+Return exec i3-sensible-terminal
    bindsym Control+$mod exec i3-sensible-termi
    # kill focused window
    bindsym $mod+Shift+c kill
    # start dmenu (a program launcher)
    bindsym $mod+p exec dmenu_run
    # There also is the (new) i3-dmenu-desktop which only displays applications
    # shipping a .desktop file. It is a wrapper around dmenu, so you need that
    # installed.
    # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
    # app launcher
    bindsym $mod+Control+g exec gimp
    # multimedia keys
    bindsym XF86AudioMute exec amixer set Master toggle
    bindsym XF86AudioRaiseVolume exec amixer set Master 2%+
    bindsym XF86AudioLowerVolume exec amixer set Master 2%-
    # change focus
    bindsym $mod+j focus left
    bindsym $mod+k focus down
    bindsym $mod+l focus up
    bindsym $mod+semicolon focus right
    # resizing alternative
    bindsym $mod+Control+Left resize shrink width 5 px or 5 ppt
    bindsym $mod+Control+Down resize grow height 5 px or 5 ppt
    bindsym $mod+Control+Up resize shrink height 5 px or 5 ppt
    bindsym $mod+Control+Right resize grow width 5 px or 5 ppt
    # alternatively, you can use the cursor keys:
    bindsym $mod+Left focus left
    bindsym $mod+Down focus down
    bindsym $mod+Up focus up
    bindsym $mod+Right focus right
    # move focused window
    bindsym $mod+Shift+j move left
    bindsym $mod+Shift+k move down
    bindsym $mod+Shift+l move up
    bindsym $mod+Shift+semicolon move right
    # alternatively, you can use the cursor keys:
    bindsym $mod+Shift+Left move left
    bindsym $mod+Shift+Down move down
    bindsym $mod+Shift+Up move up
    bindsym $mod+Shift+Right move right
    # split in horizontal orientation
    bindsym $mod+h split h
    # split in vertical orientation
    bindsym $mod+v split v
    # enter fullscreen mode for the focused container
    bindsym $mod+f fullscreen
    # change container layout (stacked, tabbed, toggle split)
    bindsym $mod+s layout stacking
    bindsym $mod+w layout tabbed
    bindsym $mod+e layout toggle split
    # toggle tiling / floating
    bindsym $mod+Shift+space floating toggle
    # change focus between tiling / floating windows
    bindsym $mod+space focus mode_toggle
    # focus the parent container
    bindsym $mod+a focus parent
    # focus the child container
    #bindsym $mod+d focus child
    # switch to workspace
    bindsym $mod+1 workspace 1
    bindsym $mod+2 workspace 2
    bindsym $mod+3 workspace 3
    bindsym $mod+4 workspace 4
    bindsym $mod+5 workspace 5
    bindsym $mod+6 workspace 6
    bindsym $mod+7 workspace 7
    bindsym $mod+8 workspace 8
    bindsym $mod+9 workspace 9
    bindsym $mod+0 workspace 10
    # move focused container to workspace
    bindsym $mod+Shift+1 move container to workspace 1
    bindsym $mod+Shift+2 move container to workspace 2
    bindsym $mod+Shift+3 move container to workspace 3
    bindsym $mod+Shift+4 move container to workspace 4
    bindsym $mod+Shift+5 move container to workspace 5
    bindsym $mod+Shift+6 move container to workspace 6
    bindsym $mod+Shift+7 move container to workspace 7
    bindsym $mod+Shift+8 move container to workspace 8
    bindsym $mod+Shift+9 move container to workspace 9
    bindsym $mod+Shift+0 move container to workspace 10
    # reload the configuration file
    bindsym $mod+Shift+q reload
    # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
    bindsym $mod+Shift+r restart
    # exit i3 (logs you out of your X session)
    bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
    # resize window (you can also use the mouse for that)
    mode "resize" {
    # These bindings trigger as soon as you enter the resize mode
    # Pressing left will shrink the window’s width.
    # Pressing right will grow the window’s width.
    # Pressing up will shrink the window’s height.
    # Pressing down will grow the window’s height.
    bindsym j resize shrink width 10 px or 10 ppt
    bindsym k resize grow height 10 px or 10 ppt
    bindsym l resize shrink height 10 px or 10 ppt
    bindsym semicolon resize grow width 10 px or 10 ppt
    # same bindings, but for the arrow keys
    bindsym Left resize shrink width 5 px or 5 ppt
    bindsym Down resize grow height 5 px or 5 ppt
    bindsym Up resize shrink height 5 px or 5 ppt
    bindsym Right resize grow width 5 px or 5 ppt
    # back to normal: Enter or Escape
    bindsym Return mode "default"
    bindsym Escape mode "default"
    bindsym $mod+r mode "resize"
    # Start i3bar to display a workspace bar (plus the system information i3status
    # finds out, if available)
    bar {
    status_command i3status

  • New (3mo) macbook air screen goes black and sometimes won't come back on after I unplug it from the power cord.  Any ideas why it is doing this? Sometimes I have to hold power button for 10 seconds for it to shut off then back on.

    New (3mo) macbook air screen goes black and sometimes won't come back on after I unplug it from the power cord.  Any ideas why it is doing this? Sometimes I have to hold power button for 10 seconds for it to shut off then back on. Sometimes holding the power button for a second is enough for it to come back on.

    I took it to the Genius Bar, and they identified it as a hardware issue. Just got it back today. Parts replaced were:
    620-5629 Display Module — Symptom: Distored/blurred/focus video issue
    605-3284 Top Case with Keyboard — Symptom: specific key(s) do not work
    So far so good. I'd suggest taking it in and not trying to work around it — it's a rare hardware issue (given the number of threads about it) and should be replaced.

  • Reporting Services - How to open a second table inside report, for each number of client (each apears in first table)

    Reporting Services - How to open a second table inside report, for each number of client (each apears in first table)?
    Exemple:
    Table1
    Cliente name:
    John
    Client number:
    12345
    Survay number of negative answers:
    3
    Table2
    Questions and answers that were negative:
    Question: How much time where you waiting
    Avaluation: 3 (from 1 to 10)
    Answer: They only called me 1 mouth later
    Can you please help me?

    Hi,
    Based on the description, I understand that you want to add subreport in the main report. When previewing the main report, the subreport can be shown in detail. Please see the screenshots on my test:
    In Reporting Services, we can create parameters and pass them from main report to subreport in order to control the data dynamically.
    References:
    Subreports (Report Builder and SSRS)
    Add a Subreport and Parameters (Report Builder and SSRS)
    If I have any misunderstanding, please feel free to contact me.
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • My ipod touch has frozen with a white screen. None of the buttons will work to turn it off or take any action. Holding down buttons for 10 seconds plus does not work.Help

    My ipod touch has frozen with a white screen. The on/ff and sleep buttons will not work whether pressed for a moment or held for more than 10 seconds as per help pages. When connected to computer it is not recognised and no indication in "devices".It has been working perfectly from Christmas until now. Was watching a TV prog via BBC iplayer when the image and sound froze for about 5 seconds then just white screen. Help

    First, try a system reset.  It cures many ills and it's quick, easy and harmless...
    Hold down the on/off switch and the Home button simultaneously until the screen blacks out or you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.
    If the Reset doesn't work, try a Restore.  Note that it's nowhere near as quick as a Reset.  Connect via cable to the computer that you use for sync.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.  Again, say "yes."

  • My Ipad2 won't turn off.  I've tried the reset method,  holding both buttons down for at least 10 seconds, but this doesn't work. I'm on version 5.1.1 and all other functions work except that I cannot get onto the internet via wi-fi either.  Help ??

    My Ipad2 won't turn off.  I have tried the reset method by holding both buttons down for at least 10 seconds, but this doesn't work.  I can't get onto the internet via wi-fi either (don't have a 3G card fitted).  All other functions seem to be working OK including charging. Not had this problem before, but I recently upgraded software to 5.1.1 so is there a bug in there somewhere?

    Look at last link.
    Look at iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    Additional things to try.
    Try this first. Turn Off your iPad. Then turn Off (disconnect power cord) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    Change the channel on your wireless router. Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    Another thing to try - Go into your router security settings and change from WEP to WPA with AES.
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    If none of the above suggestions work, look at this link.
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    Unable to Connect After iOS Update - saw this solution on another post.
    https://discussions.apple.com/thread/4010130?tstart=60
    Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • My iPad has been stolen. The police have asked me for the IMEI number. How do I get a hold of my iPads IMEI number now that it is gone?

    My iPad has been stolen. The police have asked me for the IMEI number. How do I get a hold of my iPads IMEI number now that it is gone?

    If you still have the box it should be on it.  Otherwise you might want to try contacting your Cell carrier.  They should have the IMEI that was  registered with them for cellular service on the iPad.

  • Trying to install Lightroom CC on second computer ( I have monthly paid account for CC)- when launching get asked for serial number - what do I do next?

    Trying to install Lightroom CC on second computer ( I have monthly paid account for CC)- when launching get asked for serial number - what do I do next?

    Ask for serial number http://helpx.adobe.com/creative-cloud/kb/ccm-prompt-serial-number.html

  • Number of seconds played when reproduction is interrupted

    Hi.
    Sorry if my english is not all right. I´m from Spain.
    I have a Server-Side Script which appends some stored mp3
    files to a stream. In some moment, client can invoke a function
    which stops the reproduction and i need to store the number of
    seconds the interrupted audio segment was played.
    I tried to solve it by using the javascript Date object in
    this way:
    -just after NetStream.Play.Start event is launched, i store a
    timestamp: application.initialInstant = new Date();
    -just after NetStream.Play.Stop event is launched, i store a
    timestamp: application.finalInstant = new Date();
    -var milisecondsPlayed = application.finalInstant -
    application.initialInstant;
    This does not work all right. The result is that, in example,
    if the complete segment dures 30 seconds, this way counts about
    27-28 seconds.
    Does anyone know how to improve this?
    I think(but I don´t know) it could be related to the
    Server-Side Stream out-buffer because of the NetStream.Play.Stop
    event is launched when there is no more data to append from the
    file in server´s filesystem to the Server-Side Stream
    out-buffer, but before all data in Server-Side Stream out-buffer is
    flushed.
    Thanks a lot.
    #Edited:
    I have checked the bufferTime property in the Server-Side
    Stream has 0 as value, so my idea is not right.
    I hope anybody could guide me to get my purpose.

    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.

  • In the evaluation mode im nt able to view my ocr result for more than 2 seconds

    im doing my final year project on image processing using labview 2010(evaluation). im using a microsoft webcam(VX-700). my objective is character recognition using vision. im able to capture an image and store the same. the software also recognizes the characters after training the characters in vision assistance. but im not able to view the result string for more than 5 seconds. i really want to have some support regarding this issue. i've attached the program what i've used with this message. plz do help me with this issue asap.
    Attachments:
    OCR First Example with integrated2.vi ‏120 KB

    Rudegar,
    Our network is very stable and we aren't seeing any problems with anything else and besides, these worked fine until we did the update.
    The wifi access point is in the same room about 6-8 ft. away and it's kind of hard to connect an appletv by ethernet to an iPad. 
    The appletv runs fine using it's built in applications, like Netflix, Disney, Radio, etc.
    All of this makes me think it's not a wireless problem, but it's something in the appletv software after doing the update that won't hold the iPad connection.
    I appreciate your suggestions and will pass your information along to our network person.
    Any other ideas?
    Thanks

  • How to set the number of seconds (or time) a photo is displayed on a slideshow (ATV2)

    Can I set the number of seconds a photo stays on the TV screen when I  do a slideshow from my ATV2?   Can't seem to find a setting on the Apple TV to do that.   For the slideshow on the ATV2 I am choosing an Event from my iPhoto library and then choosing "slideshow" after adjusting the ATV2 settings for music and theme.

    You can only set the time of slides with certain types of slideshows (i.e. classic and ken burns)

  • How to set the number of seconds a servlet is allowed to run

    I use JSP to generate a report, but it will take about 10 minutes to search.
    IE Client screen displays an error message what is "Cannot find out your page" after 8 minutes. How to set the number of seconds a servlet is allowed to run.

    It's not a matter of how long the servlet is running... it's the browser timing out because the servlet hasn't responded to its request.
    You have several options:
    1) "Browser Pinging"
    Your servlet sends some small data which can be either seen or unseen (html comments, hidden chars, etc) by the user at short intervals while your report is running. When the report is finished, the browser will not have timed out because it has been "snacking" on those small bits of data which tell the browser its original request was both heard and being handled. I don't think there is any timeout in IE as long as it receives data continually (or at least before its own timeout mark over and over again...)
    2) Multithreaded processing
    This would probably be a better approach. Have the report run in a separate thread running on the server. You'd want to store a reference to this executing report in the user's session. Instead of making the browser wait for the report to be finished, have the servlet check the user's session to see if a report exists and is running. If one does not exist, create one and start its execution. If one does exist, and is still running, print a "please wait" type of message OR an animation, etc... along with some javascript which will reload the page every few seconds. If the page reloads and the servlet sees that the report is finished, it can then display it to the user.
    Hope this helps,
    -Scott

  • HT203175 Reloaded Itunes on an XP machine. Reloaded because Itunes would not open. Now when I play a movie that is in my library, The movie plays for aprx. 60 seconds and then reverts back to my Itunes library. Any ideas on a cure?

    Reloaded Itunes on an XP machine. Reloaded because Itunes would not open. Now when I play a movie that is in my library, the movie plays for aprx. 60 seconds and then reverts back to my Itunes library. Does it with all movies in the library, Most where downloaded from Itunes. Any ideas on a cure?

    This "original file cannot be found" thing happens if the file is no longer where iTunes expects to find it. Possible causes are that you or some third party tool has moved, renamed or deleted the file, or that the drive it lives on has had a change of drive letter. It is also possible that iTunes has changed from expecting the files to be in the pre-iTunes 9 layout to post-iTunes 9 layout,or vice-versa, and so is looking in slightly the wrong place.
    Select a track with an exclamation mark, use Ctrl-I to get info, then cancel when asked to try to locate the track. Look on the summary tab for the location that iTunes thinks the file should be. Now take a look around your hard drive(s). Hopefully you can locate the track in question. If a section of your library has simply been moved, or a drive letter has changed, it should be possible to reverse the actions.
    Alternatively, as long as you can find a location holding the missing files, then you should be able to use my FindTracks script to reconnect them to iTunes .
    tt2

Maybe you are looking for

  • Is there any way to contact a human at the store?

    My app passed certification and is live.  I search for the name and all the search terms I listed but it doesn't show up in the store on my surface pro 2 or surface pro 3.  There is also no email address, customer service or any way to contact MSFT a

  • Problem with Deployments of web service Project as EAR in weblogic console

    Hi All :-) I was facing the problem with the Deployments of web service(java class) as EAR.I created the one web project associated with EAR project. After my development i exported this project as EAR and deployed the same on the weblogic console...

  • X-Fi Xtreme and Windows XP

    Download page says drivers available Q4, 2005. Since we are in Q4, are there any beta drivers available? We have an imaging system that is running XP 64 on a non-dual boot system, but need to have sound to develop DVD's for clients that includes musi

  • Withholding Tax on Down payment through F-58

    When we made the down payment having with withholding tax deduction through F-58(FBZ4) against down payment request clearing, if we give gross amount to the extent of Withholding tax showing as not assigned amount, If we give net amount clearing is h

  • Help! I can't print postcards anymore.

    I am a very basic Photoshop Elements user and version 3 has been all I need. I mainly print for promotional uses, postcards being my main need. I recently purchased an Epson R280 printer and would like to use it to print postcards. When I try to prin