ScrollRectToVisible don�t work after jpanel.add(component)

Hi,
sorry if this question is allready solved but I coundn�t find a hind.
I have a JPanel that is attached to an scrollPane. I add several JPanels depending on what data the user selects to this JPanel. Without intervention the Panel is then scrolled down so that the last panel that was added is visible.
Now I would like to scroll up as the last step. Therefor I use
theContentBlockPanel.scrollRectToVisible(new Rectangle(0,0,1,1));or
JViewport vp = (JViewport) theContentBlockPanel.getParent();
vp.setViewPosition(new Point (0,0));but nothing happens if the Panels that get added are new e.g. where
created in the process of this method call.
If I call the same data again the Panels are allready stored with the
data they get added and the same code scrolls up no problem.
What to do?
Cheers
Janko

Wrap your code in a SwingUtilities.invokeLater(...). Your code may be executing before some other code that causes the panel to be scrolled to the bottom.

Similar Messages

  • Fn+b keys don't work after installing Win7 Ultimate (HP Envy 14 BE)

    Fn+b keys don't work after installing Win7 Ultimate (HP Envy 14 BE)  --not able to use the Beats Speakers. Any software updates I need to install?
    This question was solved.
    View Solution.

    Hi Jim,
    You're welcome
    Is the version of Windows 7 Ultimate you have installed 32bit or 64bit?
    Open windows Control Panel, open Device Manager and open up Sound, Video and Game Controllers - do you see an existing entry for the IDT High Definition Audio CODEC listed here?
    There is an alternative IDT Audio driver you may wish to try on the following link.
    http://ftp.hp.com/pub/softpaq/sp53001-53500/sp53281.exe
    Let me know if you get the same error with this version.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Buit in ethernet don't work after installing Lion

    Built in ethernet don't work after installing OSX 10.7 on my MacBookPro 2.4 Ghz Intel Core 15.
    Someone else has the same problem?
    On my MacPro 2 x 2.6 GHz Dual-Core Intel Xeon it's not working good, i have to do a restart to get internet connection.
    Is there somebody who has te same problem and has a solution?

    Something does look odd to me unless it's a typo in your post.
    This look like what I'd expect from the NetGear Router - not form the modem. That is when You browse the router stats (http:/192.168.1.1)
    I work with a modem with te folowing preverences:
    Wan IP address    87.211.205.210
    Lan IP address     192.168.1.1
    Primery DNS server       62.58.50.5
    Secondary DNS server   62.58.50.6
    and a separate router Netgear WGT624v3
    This is not exactly what I would expect from System Preferences/Network
    the system preferences for the network are
    Configure       by DHCP
    IP address     192.168.1.15
    Subnetmask  255.255.255.0
    Router           192.168.5.1  <<<<<<<<<<< this should be 192.168.1.1??????
    DNS              208.67.222.222
                         208.67.220.220
    The Router address in System Preferences/Network should be the same as the LAN IP Address. In this case it's on a different network.
    If this is not a type then this is a problem!
    Not sure how it got to be that way.
    Does it persist when resetting the modemand router?/
    Steve

  • IPhone 3GS apps don't work after 4.3 upgrade

    Some apps like mail, safari, app store, ipod don't work after upgrading to iOS 4.3. itues is up to date and have never had issues before. tried to downgrade to 4.2 but was unable to. Help!

    I have the same issue, half the apps no longer work, just stays in 'updating' mode. I've tried uninstalling some but now the app store is freezing. THe ones I am able to reinstall give me error message saying I'm not logging in correctly (I am). I'm guessing some apps versions aren't compatible with the new software but a few I was able to use after the software update and now I can't

  • All Mac apps don't work after cloning on new hd.

    All Mac apps don't work after cloning on new hd.
    I used CCC to clone 10.6.8 then onto new drive. Everything works BUT all Mac apps.
    Error: You can't open the app(s) because it is not supported on this type of Mac. (On MacBook 2011)
    Thanks for your help.

    All good. Just drag and dropped each application and they worked until I did a restart. Then repaired permissions and everything works.

  • My apps don't work after synching music files from my PC

    My apps don't work after synching music files from my PC through Itunes....though all the apps are shown in the Apps window in Itunes (The Apps match the iTunes account on the iPhone).....
    Disconnecting after the sync and After downloading any app from Appstore through Wi-Fi all my apps start working.....
    Please Help.....

    What happend is your phone forgot it was authorized to work with items associated with your apple id. If it happens again, download any free app to prompt the sign in, once you install the free app the others should work.

  • Card reader don't work after installing win 7 ultimate on pavilion dv-6 1260ej

    card reader don't work after installing win 7 ultimate on pavilion dv-6 1260ej.
    Tried downloading this driver:
    http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=ob-75456-1&cc=il&dlc=he&lc=he&...
    still dont work.

    Hi,
    Download and install the Chipset driver on the link below.
    ftp://ftp.hp.com/pub/softpaq/sp45001-45500/sp45041.exe
    After the installation has completed, restart the notebook.
    Next, download and install the Card Reader driver on the following link.
    ftp://ftp.hp.com/pub/softpaq/sp45001-45500/sp45046.exe
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • My ipod shuffle (4th gen) don't works after hard reset with itunes

    My ipod shuffle (4th gen) don't works after hard reset with itunes, it don't reads too like USB by Windows.
    Before that i've seen error (-50) in iTunes, so i reset ipod.
    I've read all tips on this site, but nothing helps me.

    No, USB works good. I've tried reset on my friend's PC, and it saw my ipod and reset was done. But when i tried to load music, it wrote me, that i've installed incorrect software.

  • PL/SQL don't work after install Oracle 9204 patch set

    I'm using Oracle 9.2.0.1.
    some pl/sql don't work after i install database patch set 3 (9.2.0.4).
    code--------------------------------
    BEGIN
    dbms_aqadm.stop_queue(
    queue_name => 'WB_RT_SERVICE_QUEUE');
    exception
    when others
    then
    null;
    END;
    error message is: ora-03113 end-of-files on communication channel.
    please help. thank you !!

    Can you please tell me the soluation of this problem as I am also facing the similar problem ?
    Thanks in advacne ?
    Regards
    Satpal

  • Webmail in Safari don't work after updating to iOS6.

    Webmail in Safari don't work after updating to iOS6.  Logging on to office webmail account are redirected.  Webmail works with Google Chrome, but it doesn't sove the issue with Safari.  Any suggestions on how to configure Safari?

    Try this
    I was having this problem, seem to happen when waking computer, once finally connected network works great. 
    You need to edit your network preferences to order the network selection list.  Goto this support page  Using network locations (Mac OS X v10.6 and later) and edit your selection list. 
    I also created a "HOME" location and deleted all networks except wifi.  Put MB to sleep woke and safari worked great.  Still I re-ordered the networks under Automatic putting wifi at top, sequence is from top down.  Don't forget to click Apply.  Have fun

  • The multi level "isolation mode" don't work after the last upgrading to Illustrator CC 18.1.0? by the right mouse button menu

    PROVA

    Yes, I know that, but I ever work with the right mouse button,
    because selecting groups and subgroups with double click make some confusion for me.
    Regards,
    Fabio
    ufficio tecnico
    grafica e prestampa
    Via Verdi, 11 - 43058 Sorbolo (PR)
    Tel. 0521.694111 - Fax 0521.694360
    E-mail: [email protected] <mailto:[email protected]>
    E-mail: [email protected] <mailto:[email protected]>
    Web: www.litoexpress.it <http://www.litoexpress.it/>
    Il giorno 28/ott/2014, alle ore 06:57, Satinder S Bains <[email protected]> ha scritto:
    The multi level "isolation mode" don't work after the last upgrading to Illustrator CC 18.1.0? by the right mouse button menu
    created by Satinder S Bains <https://forums.adobe.com/people/SatinderSBains> in Illustrator - View the full discussion <https://forums.adobe.com/message/6874053#6874053>
    You can double click on the selected object to get into the multilevel isolation mode.
    Regards,
    Satinder
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6874053#6874053
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Illustrator by email <mailto:[email protected]m> or at Adobe Community <https://forums.adobe.com/choose-container.jspa?contentType=1&containerType=14&container=33 67>
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0 <http://forums.adobe.com/thread/416458?tstart=0>.

  • Could someone explain to me why Flash virtual tours don't work after update to Flash Player 10.1?

    Hello there,
    Could someone explain to me why Flash virtual tours don't work after update to Flash Player 10.1?
    Thanks!

    www.privium.nl
    klick the icon image 'virtual tour' upper right corner.
    This works on my other pc, on which I did not update to 10.1 ...
    (I produced this virtual tour; it is stored on the FTP server of the service provider I use for this)
    Awaiting your reply,
    Regards,

  • Bookmarks don't work after upgrading to Firefox 5.0

    My bookmarks don't work after upgrading to Firefox 5.o. Please help! The icons no longer show and instead there is a blank paper with the top right corner folded. I can't even bookmark new pages! I tried reinstalling the program and that didn't work. Please help!

    Your bookmarks file may be corrupt. Navigate to /[UserName]/AppData/Local/Mozilla/Firefox/Profiles/[profile_name]. Either rename places.sqlite to places.sqlite.corrupt (or whatever) in case this isn't the problem, or delete places.sqlite. Start/Restart Firefox. The icons for sites that have a favicon should return after you visit each site.

  • Hi i have iPhone 4S and some of the apps i've bought or downloade for free don't work after the last update iOS 6.0.1.Can you tell me why?

    I have iPhone 4S and some of the apps I've bought don't work after
    the last update iOS 6.0.1
    Can you tell me the reason?

    most likely the app developer havent made it compatible

  • Internet Don't work after the last IOS Upgrade. What can I do?

    Internet Don't work after the last IOS Upgrade. What can I do?

    Can you give us more details?
    Is Wi-Fi working, i.e. not greyed out in Settings/Wi-Fi?
    Can you go online by using the Mobile Network?
    Any error messages given?
    Problem with your router?
    See these articles for help with Wi-Fi issues:
    Issues with Wi-Fi networks and connection
    Wi-Fi or Bluetooth settings grayed our or dim
    If you see No Service in the status bar of your iPhone or iPad - Apple Support
    iOS and OS X: Recommended settings for Wi-Fi routers and access points

Maybe you are looking for

  • After upgrading to mavericks my mac shut off and won't come back on

    I upgraded to Mavericks and my 2013 macbook pro shut off and won't come back on.  When I push the start button I can hear the chime and then my sleep light blinks really fast and then shuts off completely.  All I get is a white screen with the loadin

  • Iphoto keeps quiting unexpectedly

    i click on the icon and that annoying sign pops up.

  • How to send pages brochure as an email

    I made a really nice Pages brochure and now I want to send it to clients in an email.  I'd rather not have it there as a file... I'd rather they get the email and see the beautiful brochure, right there in the email.  Is there a way to do this?  I tr

  • Multiple products in the same domain

    Hello, I installed the following 12.1.3 products on my Linux configuration : - Oracle Fusion Middleware Infrastructure - Oracle Enterprise Repository - Oracle HTTP Server (managed by WLS) - SOA Suite Quick Start for Developers - BPM Quick Start for D

  • Third party reporting tools that can be used with WLI 8.1

    All: I am working on Weblogic Integration 8.1. I am wondering are there any ready tools that can be used with WebLogic Integration process related tables to get different types of reports out of it. Can somebody point me to these tools?? TIA, Prashan