I am having trouble setting a JScrollBar in a a scrollpane to the top

I get the scrollbar, and set it to the up position, and immediately afterwards it sets itself back to the bottom.
The item contained in the scrollpane is a JPanel, and I has lots of stuff in it.
If I do not set it myself, it stays at the bottom...I see it jumping up, but it immediately goes back down.
I set some info that changes the GUI in the contained panel ncluding an image and some text.
This is where the actual item is changed, called by a listener in a JTree.
SetViewObject changes the text and the image of the panel in the scrollpane.
public void doTreeSelectionChanged()
DefaultMutableTreeNode defaultMutableTreeNode
= (DefaultMutableTreeNode)
getLastSelectedPathComponent();
if(!(defaultMutableTreeNode instanceof HMIViewTreeNode))
detailWindow_.setViewObject(null);
summaryWindow_.setViewObject(null);
JScrollPane parent = (JScrollPane)
(summaryWindow_.getParent().getParent());
JScrollBar scrollBar = parent.getVerticalScrollBar();
scrollBar.setValue(0);
return;
HMIViewTreeNode viewTreeNode =
(HMIViewTreeNode)defaultMutableTreeNode;
if(viewTreeNode!=null)
detailWindow_.setViewObject(viewTreeNode.getViewObject());
summaryWindow_.setViewObject(viewTreeNode.getViewObject());
}else
summaryWindow_.setViewObject(null);
detailWindow_.setViewObject(null);
revalidate();
JScrollPane parent = (JScrollPane)
(summaryWindow_.getParent().getParent());
JScrollBar scrollBar = parent.getVerticalScrollBar();
System.out.println("Setting visible amaount to "
+scrollBar.getMaximum());
scrollBar.revalidate();
scrollBar.setVisibleAmount(scrollBar.getMaximum());
scrollBar.setValue(0);
I cannot see what the problem could be...I have also tried doing setVisibleAmount to the size of the scrollbar to no avail.
Please let me know if you have any idea!

Well, I put a bandaid on the idiocy by setting the viewport to not perform scroll rect to visible...I do not need to use that, so I suppose this is acceptable at least for my app.

Similar Messages

  • I hope this might interest someone. The situation; 3 floors,I am having trouble with an an Airport Extreme, 802.11n on the top floor and a Mac Pro 3.1 on the bottom floor. Not always but often it has trouble seeing the Airport and making a connection. I h

    I'm not sure how to post a message. I hope this might interest someone. The situation; 3 floors,I am having trouble with an an Airport Extreme, 802.11n on the top floor and a Mac Pro 3.1 on the bottom floor. Not always but often it has trouble seeing the Airport and making a connection. I have an older Airport Express, would it help to install it? would it work best if it was installed in the same room? should it be installed half way in between? Get another Extreme? The Mac Book Pro on the middle floor can see 11 networks in the neighbourhood if that might be causing a problem or would if I installed the Express. Thank for your consideration.   

    Thanks for your time ... I appologize for the font and colour, I compossed the question in pages and failed to notice the font colour as grey ... there are a variety of computers of various ages so I think it is using a setting that allows both 5G and 2.4 ... the connection to the Airport is thru a cable modem and cable does run throuhout the house ... maybe those hard wires would be a place to look at ... do you think that putting the 'Express' on the second floor might help ... thanks again ...

  • Is anyone else having trouble setting up messages with the new mountain lion software? I keep getting a notification that i cant sign in and it is saying, check network connection and try again, but i have full wifi bars, thanks, Justin

    is anyone else having trouble setting up messages with the new mountain lion software? I keep getting a notification that i cant sign in and it is saying, check network connection and try again, but i have full wifi bars, thanks, Justin

    Install this to get X11 functionality back in 10.8
    http://xquartz.macosforge.org/landing/
    Worked great for me and others.
    Jerry

  • Having trouble setting up my AirPort

    I'm not tech-savvy in the least bit, so I need a lot of help right now! I'm trying to connect my Mac Book Pro to the AirPort. It's created a network but will not connect to the internet at all.
    I'm having trouble understanding what I'm exactly supposed to connect the AirPort to. I have the powercord plugged in. What else is necessary?
    I'm assuming that I'm using it as standalone wifi

    My roommates have a linksys router and I have no idea how it's set up. It's in my roommate's room. Everyone else has a PC and I get knocked off several times a day with the error message "Connection has timed out" and I have to reset the Internet just to get connected again. It only happens to me. I thought maybe my own network would be a lot easier for me to use. I called Apple Support and they said given my circumstances, I'd have to find my phone cable to conncet to a modem that will connect to the AirPort. Does this sound about right?

  • Having trouble setting up my website. It's probably a silly mistake.

    So I've registered a domain and hosting plan with A Simple Orange which had a pretty good deal since I had a coupon for 20% off. I've tried using Joomla to manage my website, but I couldn't get the hang of it. So I'm trying out iWeb 09' now and just having trouble setting it up. I've gone to me.com and added my website and added the CNAME correctly I hope. Here is a picture. http://imgur.com/XI8Lw.png
    Next I opened iWeb and setup MobileMe in the preferences panel. I've tried publishing the information from iWeb to my website, but my home page doesn't change. You can see here at RyanSchefer.com that it's just plan

    No. Your CNAME setting is not correct. The CNAME and web.me.com are correct with web.me.com being your host. However, your domain name is incorrect - don't understand why you have put mobileme before it? You just enter either your domain name on its own so domain.com or you need to set up two separate CNAME entries, one being for www, CNAME, web.me.com and then one being @, CNAME, web.me.com. The @ stands for your domain name and the www is your sub domain.
    Try altering this and it should work okay.

  • Having trouble setting up email accounts in the mail app?

    Hi Apple community,
         I am having trouble setting up my email accounts with the osX mail application. I have two accounts, an outlook and my college email through google. When I try to add the outlook account the prompt says that it cannot connect to the server and when I try my college mail i get the following prompt.
    "Trying to log in to the Exchange server “autodiscover-s.outlook.com” failed. Make sure the email address and password you entered are correct, then click Continue."
    Please note that my college account is run by gmail and ends in murraystate.edu
    Thanks, Will.

    Hey will,
    okay for your college email. Heres what you do.
    Try adding your email and wait for the message to come up
    Trying to log in to the Exchange server “autodiscover-s.outlook.com” failed. Make sure the email address and password you entered are correct, then click Continue."
    Once it does, you will notice 2 extra boxes One says username and the other password. You will notice that the username will not have @murraystate.edu
    Add this and continue and this should now be added as an email account and should be able to receive emails as normal.
    For your outlook emails, I would recommend using the following article to set it up. It is fairly straightforward.
    http://howto.cnet.com/8301-11310_39-57602775-285/how-to-set-up-mac-mail-to-use-i map-for-outlook.com/
    Hope that helps.

  • Having trouble setting up FaceTime.   keep giving me Apple ID password

    having trouble setting up FaceTime.  trouble at verifying use I'd.  I have my email setup with different password since I have tw setup email.   my Apple ID has different password.   same email name.

    Hello sangjaimepark,
    Thank you for the details of the issue you are experiencing with activating FaceTime.  I recommend reviewing the article below for FaceTime activation issues.  When trying to activate FaceTime, you will need to use the email address you use for your Apple ID and your Apple ID password and not your email password:
    iOS: Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/ts4268
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Having trouble setting up network

    Hi guys,
    I just recently moved to a new house and am having trouble setting up the network with my airport extreme. There is a cable modem that is networked to the house so that every room has an outlet.
    I connected the airport to one of the outlets with my macbook and when I create network, I cannot connect to the internet wirelessly even though the macbook detects a network when I set it up with bridge mode. But hard wired through the router I can surf the web as I am doing right now.
    When I hit share an IP address, the internet does not work at all. It seems to work fine with my old netgear router, but would prefer using the airport.
    I've also reset the airport as well with still no luck. Any help would be appreciated. Thanks

    Have you tried powering down the modem for 5 min and then turning on with the ethernet connected to the WAN port of airport extreme?

  • Having trouble setting up e-mail on new iPhone 4s. I would like to sync with my outlook mail, contacts

    I am having trouble setting up my email and syncing my outlook calendar wiht my new iphone 4s.

    How do you connect to the internet?
    Most of the time, the problem lies here. You can try a couple of things. First, try only 3G or carrier data. Then, try only wifi. If that still doesn't work, your only other option is to try a different hotspot.
    I had the same problem before when I updated to iOS 4.3. I thought it was the update at first. I usually have the carrier data turned off because my plan doesn't have an unlimited provision for it. I forgot that I also switched ISPs from DSL to a visibility unit package - meaning I had to setup my laptop so that I could get wifi from it. I realized this when I visited a friends house that I knew I could connect properly before.
    My problem was with my laptop. It seems that Little Snitch blocks the ports being used for mail and push notifications. I haven't figured it out exactly since I still can't get email when I'm using my laptop connection. But, it works fine when I'm using ONLY 3G or both/wifi only if connected to a different hotspot.
    Hope that helps.

  • Having trouble setting up a linksys WRT54GS router with v...

    Having trouble setting up a linksys WRT54GS router with verizon DSL using a westell 6100F modem. the modem works fine by its self  but the router will not connect  to the internet when installed like the cd tells you to.
    online help and phone help has been less than helpful,  anyone have any Ideas?

    Ok I found " Installing the liksys wireless router with a westell 6100 modem" in the verizon troubleshooting guides. printed the instructions so I would'nt forget. step 1 open your web browser and enter http://192.168.1.1 in the address field.  PROBLEM it comes up with a login screen that I don't know how to sign into. tried the obvious stuff. cannot get past the login screen. I knew this sounded to easy to be true. anyone have any ideas? 

  • MSI X58 Pro - I'm having trouble setting up my first Raid 0 Array

    Hey guys!  I have an i7 920, X58 Pro, 3x2GB DDR3, Radeon 5850, 640GB WD Black (Windows 7 64 bit + applications) and 1TB Samsung F3 (backup) system and I'm having trouble setting up a raid 0 array.  I recently decided to purchase two additional 1TB Samsung F3 harddrives in order to create a raid 0 array, while still keeping my original two harddrives separate.  I installed the new harddrives today, installed the JMicron drivers that were on the drivers disk that came with my motherboard, went into the bios, and changed it from IDE to RAID.  I then went into the raid bios, selected the two new harddrives and selected raid 0, saved everything and tried to load Windows and Windows refuses to boot up.  I got an option to try fixing Windows but that didn't end up fixing anything.  Finally, I was forced to go back into the bios and switch it from RAID back to IDE just to get Windows to boot up again.  Does anyone know what I need to do in order to get this raid 0 to work?  Thanks a lot in advance for your help!

    Perhaps create a software RAID? You can do it in Windows through Control Panel --> Administrative Tools --> Computer Management --> Disk Management.
    A quick guide: http://www.softwaresecretweapons.com/jspwiki/windows-7-software-raid-disk-partition-and-volume-context-menus

  • I'm working in Photoshop CS6 on a Mac and am having trouble when I select a Path it automatically feathers the selection border. I can't seem to find any place to adjust a feather setting. Does anyone have a suggestion? I'm using paths to silhouette an im

    How do I change a default from feathered edge to sharp edge when I select a path?
    I'm working in Photoshop CS6 on a Mac and am having trouble when I select a Path it automatically feathers the selection border. I can't seem to find any place to adjust a feather setting. Does anyone have a suggestion? I'm using paths to silhouette an image on a photograph to use in another document and I need a hard edge on it, not a feathered one.

    In the Paths panel, click the flyout menu (in the top right of the panel) and choose Make Selection (this option will only be available if you have a path selected). Reduce the Feather Radius to 0 (zero) and click OK. This setting will be the default even when clicking the Load Path as Selection button.

  • I just got a new ipad 2 but I having trouble setting it up, can someone help me. thank yoy

    I just got a new ipad 2 but I'm having trouble setting it up, can someone help me?

    Please read Chapter 2.
    There have been some problems accessing pages on the Apple web site.  If the hyperlink gives you a "We're sorry" message, try again.

  • I'm having trouble setting up my new 5s. it won't connect to phone service and my old phone is still getting all my messages

    i'm having trouble setting up my new 5s. it won't connect to phone service and my old phone is still getting all my messages

    According to http://en.wikipedia.org/wiki/IPhone_5
    the iPhone5 has 1GB of RAM, and internal storage of 16, 32, or 64GB.
    It does not use SD cards.
    Fake iphones are really Android phones using the skin of iOS6.
    Click on the App Store icon. If it takes you to Apple's App Store, then it's a real iPhone.
    But if you are directed to Google Play, then I'm afraid you've gotten a copy.

  • HT201250 I am having trouble setting up my time capsule.  the amber light is flashing.  i have a Verizon FIOS network that i use for the internet (WiFi) and do not want to configure the Time Capsule to do that function.  I just want the Time Capsule to ba

    I am having trouble setting up my time capsule.  the amber light is flashing.  i have a Verizon FIOS network that i use for the internet (WiFi) and do not want to configure the Time Capsule to do that function.  I just want the Time Capsule to back up.

    Simple.. bridge the TC.. in the apple utility in the NAT and DHCP area.
    Plug it into the FIOS router.. you can turn off wireless in the TC if you want.. or use it.. it can work faster if you are nearby and can select 5ghz.. but up to you.

Maybe you are looking for

  • Pop up text on clicking link on a sql report

    Hi I'm using apex 3.2 I've a sql report like below taskId(edit) Task_details Notes owner ..... What I want to do is if I click on taskId which is edit link ,pop up text box should open where I can add notes to that row. How can I achive this? Thanks

  • HP envy 4500 two sided printing

    I have an HP ENVY 4500 printer. Everytime i go to print double sided, it tells me that there is a conflict with another printer setting. What setting is this and how do i make my printer allow me to print double sided? Also, when i print from the int

  • How to change the font style

    Hi All I am able to dispaly the content of a .txt file on the screen using inline frames(11g webcenter application using content repository- file system) . But 'm able to add styles to it like displaying it in bold letters. Any help on how to add tem

  • Photo Assignment to be Removed for Pers. Numbers

    Dear Friends, I want to remove the link between the employee photos in the archive server to the employee personnel numbers... Because of this assignment, the system is running slow to update master data. Request you to please provide me the solution

  • Call library function- memory allocation

    Hi, I want to call a dll from LabVIEW and one of the inputs expects a pointer to double (double*). I have done things like this before and use create array to allocate the memory in LabVIEW to pass to the dll. This time what is expected is a pointer