Window that slides into view

Hi all, I'm looking to add a little bit of Swing eye-candy.
I have a little pop-up window that informs the user that their file has saved after they hit "save" or Ctr-S. I need it to be noticeable (so that they are assured that their file did indeed save), yet out of the way and not requiring any action on their part (no "Ok" button).
Currently I have a little JWindow that appears at the bottom of the frame when they save, and disappears after two seconds. However, I'm looking to make the application look a little polished, so I wanted something a little fancier.
Does anyone know of a way to get a JWindow (or any other kind of internal, non-modal frame or dialog) to slide in from the edge of a parent frame? I'd want it to look like it was being pushed in, so the whole thing would slide into view in one piece (i.e. not stretching). Or a similar kind of eye-candy that would be simple to implement (maybe fade-in fade-out)?
Any help greatly appreciated, thanks!

Hey that works great! Using null layout makes a lot of sense.
I couldn't get it to be both fast and smooth -- changing the delay/repeat time to 0 doesn't make it significantly faster, so instead I had to increase the amount by which it moves each time, so it's less smooth. It still looks pretty good, though.
For anyone else who's looking for this, I'm posting an excerpt of my code below, which slides the window up from the bottom right corner and then back down again a couple seconds later. I haven't made it into an SSCE, since that's above.
Thanks again!
final JWindow savedWindow = new JWindow();
JLabel savedLabel = new JLabel("File saved");
savedLabel.setFont(saveStateLabel.getFont().deriveFont(Font.BOLD));
String fileName = currentAuthoredFile.getAbsolutePath();
                                   // .... bunch of layout omitted
savedWindow.add(savedPanel);
savedWindow.pack();
final int desiredHeight = savedWindow.getHeight();
savedWindow.getContentPane().setLayout(null);
savedWindow.setSize(savedWindow.getWidth(), 0);
bottomCorner = new Point(mainFrame.getLocationOnScreen().x + mainFrame.getWidth(),
     mainFrame.getLocationOnScreen().y + mainFrame.getHeight());
savedWindow.setLocation(bottomCorner.x - savedWindow.getWidth(), bottomCorner.y);
savedWindow.setVisible(true);
javax.swing.Timer timer = new javax.swing.Timer(0, new ActionListener() {
    public void actionPerformed(ActionEvent e) {
        int newHeight = Math.min(savedWindow.getHeight()+6, desiredHeight);
        savedWindow.setSize(savedWindow.getWidth(),newHeight);
        savedWindow.setLocation(bottomCorner.x - savedWindow.getWidth(), bottomCorner.y-savedWindow.getHeight());
        savedPanel.repaint();
        if(newHeight >= desiredHeight) {
            ((javax.swing.Timer) e.getSource()).stop();
            //restore original layout
            savedWindow.getContentPane().setLayout(new BorderLayout());
            savedWindow.validate();
timer.start();
javax.swing.Timer timer2 = new javax.swing.Timer(0, new ActionListener() {
    public void actionPerformed(ActionEvent e) {
        int newHeight = Math.max(savedWindow.getHeight()-6, 0);
        savedWindow.setSize(savedWindow.getWidth(),newHeight);
        savedWindow.setLocation(bottomCorner.x - savedWindow.getWidth(), bottomCorner.y-savedWindow.getHeight());
        savedPanel.repaint();
        if(newHeight <= 0) {
            ((javax.swing.Timer) e.getSource()).stop();
            savedWindow.dispose();
timer2.setInitialDelay(2500);
timer2.start();

Similar Messages

  • How can I get rid of the slide on add window that's making me crazy?

    I updated to the latest version of Firefox for desktops today and all of a sudden I'm getting this slide in ad window that slides in from the left and I can't get rid of it! If this keeps up I'll have to stop using Firefox because I really hate this! PLEASE tell me how to get rid of it!

    hey maxthepug, this sounds like a problem possibly caused by adware on your pc. please go to ''firefox > addons > extensions'' & remove any suspicious entries (toolbars, things that you have not installed intentionally, don't know what purpose they serve, etc). also go to the windows control panel / programs and remove all toolbars or potentially unwanted software from there and run a full scan of your system with the security software that you have in place and different other tools like the [http://www.malwarebytes.org/products/malwarebytes_free free version of malwarebytes] & [http://www.bleepingcomputer.com/download/adwcleaner/ adwcleaner].
    [[Remove a toolbar that has taken over your Firefox search or home page]]
    [[Troubleshoot Firefox issues caused by malware]]

  • How do I create calendar alerts (popping into view)?

    How do I create alerts that pop into view to tell me an upcoming calendar event will be starting in, say, 15 minutes?

    When creating a calendar event, there is an alert option - with a first and a second alert if you want two. You can set the first alert for an hour before and the second alert at 15 minutes before, or have a single alert at 15 minutes before. There will be the calendar alert sound and a pop-up for the event.

  • The drop down view by menu (Song, album, etc) at the right side of the iTunes window is like a ghost. It flashes into view for a millisecond once in awhile but never lets me click on it. Anyone know what this is about and what to do?

    The drop down view by menu (Song, album, etc) at the right side of the iTunes window is like a ghost. It flashes into view for a millisecond once in awhile but never lets me click on it. Anyone know what this is about and what to do?

    Short answer:
    Click Hide Song(s), it is what you wanted to do...
    Long answer:
    iTunes in the Cloud is a feature of your iTunes store account that allows you to redownload or stream your past purchases. When you delete a purchased track that is downloaded to your computer (like the first one shown here) you are asked if you also want to hide the song from iCloud. This would remove it from the computer and also stop it showing up with the iCloud symbol as the other tracks from that album (which are not downloaded) do.
    If a track shows with the cloud symbol you can play (stream) it by double-clicking the title, or click the cloud symbol to download a local copy to your library. If you try to delete one of these tracks you get a slightly different message confirming that you want to hide the track. Clicking hide will remove the listing from the library and any other device that shows your past purchases.
    Should you want to retrieve any item hidden in this way at a later date use Store > View My Account > iTunes in the Cloud > Hidden Purchases > Manage.
    To hide all your previous purchases that are not downloaded to your computer use Edit > Preferences > Store and untick Show iTunes in the Cloud purchases.
    tt2

  • Is there a way to view just one open Finder window (without any other Finder or other application windows coming into view) from a Desktop hot corner in Yosemite?

    I just upgraded to Yosemite from Snow Leopard on a MacBook Pro. Previously, I could view just one open Finder window by viewing the Desktop via a hot corner and then selecting Finder from the Dock. This would pull only the top Finder winder into view, without showing any other open Finder windows, and most importantly, any other open application windows. I could then easily drag files/folder from my Desktop into the Finder window (which I do A LOT). Since upgrading to Yosemite, whenever I use the Desktop hot corner and select Finder from the Dock, it pulls every open application and Finder window back into view, putting Finder in front.
    Is there any way to view just one already open Finder window (or all Finder windows for that matter) without seeing all other open applications, without having to Hide the other applications or using Spaces?

    Yes I've created an Automator Application that does the job, but the "watch me do" function that does the Mail Merge is a rather Clunkey work around, as the mouse moves all over the place, thats the part i want to remove and replace with a script, or work out a different way around it that avoids the "watch me do" function.
    Is this Possible? or where/who is there i can ask to write me a script, im not a novice to scripting, but i am a novice to Applescript.

  • Can a slide show be created  in photoshop elements 11 that can be viewed on an ipod?

    can a slide show be created  in photoshop elements 11 that can be viewed on an ipod?

    You can create a sideshow in PSE but I don't know anything about ipod so can't tell you whether it can be viewed in it.
    Just for interest sake, what does an ipod do?  I thought it was mainly for the music and speech based stuff but you seems to suggest otherwise.
    For an old tutorial of creating  SIDESHOW SEE THIS VIDEO:
    <http://tv.adobe.com/watch/learn-photoshop-elements-9/creating-a-slide-show-windows/>
    Good luck.

  • Hi, i am a littl confused as I logged into creative cloud and bough the in design plan for a year but i cant seem to donwload it... there is a window that pops up and it says its downloading but its taking forever? any advice?

    hi, i am a littl confused as I logged into creative cloud and bough the in design plan for a year but i cant seem to donwload it... there is a window that pops up and it says its downloading but its taking forever? any advice?

    Hi Dima,
    Please refer to the help documents below:
    Troubleshoot Creative Cloud download and install issues
    Error downloading, installing, or updating Creative Cloud applications
    Regards,
    Sheena

  • How to retrieve a window that is mostly out of the desktop view?

    General:
    I have a window that is only partially visible because it's in the upper right corner of my desktop. I haven't been able to retrieve it.
    Detail:
    I have an application that I launch frequently and use with no problem.
    The application has a popup that is invoked by me. This popup window was at some point or another dragged to the upper most corner of my desktop so that the title bar is not even visible anymore. Because of this, i cannot drag and retrieve this window. This is my problem, this child window has been pretty much orphaned to this upper section and can't be pulled back to a usable region.
    My desktop resolution is set to 1920x1200 and hitting F5 to show all apps only momentarily pulls it to the center of my desktop.
    Uninstalling and re-installing this application has not helped.
    Any ideas or suggestions?

    This of course shouldn't happen - it shouldn't be possible to move the window above the screen.
    Possible workaround:
    Ensure that the rogue window is the frontmost in the application.
    Open the AppleScript Editor, and paste the following into it:
    tell application "XXXXX"
    activate
    set the bounds of window 1 to {4, 93, 800, 500}
    end tell
    Enter the name of the application as it appears on the application's icon where I have XXXXX
    Press the 'run' button
    or save the script as an application (and keep in case it happens again!)

  • What is a good app that I can view my windows desktop.

    What is a good app that I can view my windows desktop. 
    But I do not want to control my desktop. 
    Can be just something that is viewed through a browser on the ipad.  Or anything.

    A quick App Store search for Window for iPad turned up a couple of apps.  Here's one.
    Remote Desktop - RDP Lite by MochaSoft
    https://appsto.re/us/qbbmr.i

  • I am trying to use automator to open a safari popup window that will automatically log me into whatever account and I attempted to type up an applescript that utilized the "System Events" function with no avail, any ideas?

    I am trying to use automator to open a safari popup window that will automatically log me into whatever account and I attempted to type up an applescript that utilized the "System Events" function with no avail, any ideas?

    Hi
    In iMovie'11 (version 9.0.x)
    on top menu row - Apple/iMovie/File/Edit/Cut (Can vary dep. on language - in Swedish Apple/iMovie/Arkiv/Redigera/Klipp . . . )
    down Cut menu - Slow playback/Raspid Playback/Re-play in Slow Motion and onvards
    Here one can select the Pre-Set speeds
    Are you familiar with getting 'inspector' to run?
    No - but I guess that Double Click on clip/sequense or ctrl-Click on it might open it.
    Yours Bengt W

  • I have a task, that is i want to retrive the details from active directory based on name and i want show that details into grid view.

    Hi All,
    I have a task, that is i want to retrive the details from active directory based on name and i want show that details into grid view.
    Can any one help how to start.
    Thanks in advance!

    Hi AnilKarthik,
    You can get user details by name using DirectoryService namespace. Then you can create a DataTable to restore the information and then bind to the SharePoint GridView.
    Here are some deatiled code demos for your reference:
    how to get userdetails from Active Directory based on username using asp.net:
    http://www.aspdotnet-suresh.com/2011/03/how-to-get-userdetails-from-active.html
    How to get User Data from the Active Directory:
    http://www.codeproject.com/Articles/6778/How-to-get-User-Data-from-the-Active-Directory
    Using SPGridView to bound to list data in SharePoint:
    http://nishantrana.me/2009/03/23/using-spgridview-to-bound-to-list-data-in-sharepoint/
    Best Regards
    Zhengyu Guo
    TechNet Community Support

  • When I copy and paste a powerpoint slide into Captivate the slide is blurry how do I fix that

    When I copy and paste a powerpoint slide into Captivate the slide is blurry how do I fix that

    Have you tried importing it with standard workflow instead of coyping and pasting.
    Is the resolution of your powerpoint presentation and Captivate Project same, make sure it is same, else, it would rescale it to fit on the sldie, rescaling might detoriate the quality.
    Thanks,
    Anjaneai

  • How can I quickly view pdf files like I can do with Windows Picture and Fax viewer for jpg files?

    How can I quickly view pdf files like I can do with Windows Picture and Fax viewer for jpg files? I need to look at several thousand PDF files. It takes too long to open each one individually. The only thing I could think of is combining them into large groups and then using the Navigation index. But I like the way windows Picture and Fax Viewer does it because you can keep the files separate. Combining PDFs causes loss of individual file names. That would be a problem since I do need to have the individual file names.

    Windows Picture and Fax Viewer is a DLL and is started via a rundll32.exe call and can't be set as an application to handle images in Firefox 3 and later versions.
    Try to set Windows Picture and Fax Viewer as the default viewer in Windows, then it should be listed automatically in the Mozilla Firefox Browse dialog.
    *http://www.winhelponline.com/articles/115/1/Windows-Picture-and-Fax-Viewer-as-the-default-viewer-in-Mozilla-Firefox.html
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • Why did my CanoScan 8800F stop scanning my 35mm slides into IPhoto 09 version 8.1.2 (424)?  I did it exactly the same way as I had done about two hundred other slides.

    I had been using my CanoScan 8800F unit to transfer 35mm slides into digital pictures within my IPhoto 09, Version 8.1.2 (424).
    All of a sudden it stopped transferring photos even though I could hear it scanning.  Any ideas "why/"

    I guess I will wrap this up. I have abandoned iPhoto and viewing my Photo Streams using it and moved to Adobe products (Bridge + PS). So that's that.

  • Is it possible to scroll the current highlighted bookmark into view?

    I have a PDF with a lot of bookmarks and the current one, that points to the first page of the document, is highlighted. Sometimes that bookmark will be a long way down the bookmarks list and so initially out of view. The bookmarks have been created by a plug-in and I would like to know if there is a way to programmatically force a specific bookmark into view by making the bookmarks pane scroll to the correct place through the Acrobat (plug-in) API, or JavaScript, or perhaps an Acrobat setting to do this? I cannot find any way that does this yet.
    Thanks
    David

    It's not difficult to rebuild or amend the bookmark tree to better reflect the actual document, but there is no control of the navigation panel window through the API. You are able to open and close subsets of the tree if that would help.

Maybe you are looking for