JTree moves the JScrollPane

Hi,
I have a JTree, wrapped into a JScrollPane. The tree has some nodes, which have no childs, but they are shown as nodes, instead of leafes. If the user tries to open such a "node", the node turns into a leaf and the JScrollPane scrolls to the right, till the node, which turns to a leaf, is at the left border of the JScrollPane.
This effect is done by Java itself. To get rid of it, I filled the "treeExpanded()" method with following line:
getHorizontalScrollBar().setValue(0);
to reset the JScrollPane. If a real node is expanded, the JScrollPane scrolls automatically to the left. But if the node, which is in reality a leaf, is expanded, the JScrollPane scrolls to the left and is set by anything (Java) to the wrong position again.
Unfortunatly it is not possible to verify the childs of all nodes, while creating the tree.
Does anybody knows how to solve this problem?

No ideas?
Any help is appreciated.

Similar Messages

  • How to move the scrollBar to JTextArea's top?

    I defined a JTextArea inside a JScrollPane, then I read a .txt file through a Reader into that JTextArea (by setText(...)). Now the scroll bar at bottom. I need move the vertical scrollBar to the top.
    Please help me to do this.
    Thanks

    you can use the method setCaretPosition in JTextArea
    and pass the posotion in the text to place the Caret

  • Why isn't my JTree revalidation the scrollpane?

    I've got a class that expands JPanel which contains another JPanel, and a JTree inside a JScrollPane.
    But the ScrollPane is not activated - when I expand the JTree the nodes are just shown behind the JPanel ...
    anyone know why?

    What are your observed differences? Since this is a Google app, there's nothing that Apple can do.
     Cheers, Tom

  • Disabling JTree in a JScrollPane.

    Greetings,
    I'm trying to figure out how to disable a Jtree that is inside a JScrollPane. I've tried using setEnable(false) but it doesn't even phase it, its still enabled (I can expand branches and its not greyed out) . I've tried setting the JScrollPane to setEnable(false) but once again nothing really changed. The only thing I can think of is that using setEnable(false) is not propigating to the cell renderers for the JTree for some reason. Is there a way to disable the JTree without writing a custom renderer?

    Also make sure that the JScrollBars are set to not focus.

  • HT204053 I have one apple ID that my entire family has been using.  How do I create new apple ID's for each of us and move the appropriate content to each new ID from the original apple ID now that we all have our own devices?

    I have been using one apple ID for 4 family members.  Up until now it hasn't been a problem but now that we all have our own devices how do I create new apple ID's for each of us and them move the approprioate things from the original apple ID account to the new ones for each of us?

    stuartx4 wrote:
    Thanks Csound1, wish I have seperated everything from the beginning but when your kids are little and start buying music etc it just didn't seem like an issue.
    That has a familiar ring to it

  • How can I move the ODI Work Repository from one server to another server?

    How can I move the ODI Work Repository from one server to another server?

    Hi,
    If you would like to move your source models, target models and project contents from Work repository 1 to another work repository.
    I.e. Dev. server to Prod Server.
    1. Firstly, replicate the master repository connections i.e. with same naming conventions manually
    2. Go to Dev. Server work repository -> File Tab -> Click on Export work repository (save it in a folder)
    3. After exporting, you can view the xml files in the folders.
    4. Now, Open the Prod. server and make sure you already replicated mas. rep. details.
    5. Now, right click on model and import source model in synonym mode insert_update (select source model from the folder where your xml file located)
    6. Similarily, import again target then Project.
    Now, check. It should work.
    Thank you.

  • I have an older macbook circa 09 and purchased a new macbook pro 2012. The older one has been backed up to an older time capsule. How do i move the files to my new macbook?

    I have an older mackbook pro circa 2009, i thought it died on me it just went completely black. I later found out just a bad battery i purchased a new one in the interim. Now that i have discovered the problem i bought an older time capsule and backed up the older macbook i now want to transfer my personal files to my new macbook pro to maintain one personal mackbook. How can i move the files from my time capsule to my newer macbook pro?
    thank you in advance for your help!!

    http://manuals.info.apple.com/en_US/iphone_user_guide.pdf

  • I moved itunes file to external hard drive and want to move the file on my pc to recycle bin. When I move i get an error message that it cannot delete ituneshelper.dll access is denied. Can I move that file to the recycle bin?

    I am trying to free up space on my pc and moving itunes files to external hard drive. I have followed instructions and believe I have file copied to new drive, but I am having trouble moving file to recycle bin as the instructions say. I am getting the following error message: cannot delete ituneshelper.dll:access denied, make sure disk is not full or write protected and file not in use. I know the file is not in use when trying to move. Any help would be most appreciated. I am on Windows XP.

    Yes. And you should not have moved that folder. Put it back. To move your iTunes library move the folder from User's Music.
    tt2

  • How do I move the pictures from my iPhone 4s to a folder on my computer?

    How do I move the pictures from my iPhone 4s to a folder on my computer?

    you will need to import your pics to your computer http://support.apple.com/kb/HT4083

  • I had two files named graphics and I replaced one graphics file with another which was the wrong one.  Can I undo my replacement?  I move the wrong one, which was on my desktop into another one and that is when it as me if I wanted to replace the file.

    I accidently replaced a file with another.  Can I undo my action? 
    I had two files named graphics.  One was on my desktop and another was within another file called solitarie.  I move the one on my desktop (wrong file) into the solitarie file and was asked if I wanted to replace the graphics file in the solitarie folder (the correct one).  I said yes accidently and then remembered that I had made a mistake.  If I use undo, it only move the wrong file back to the desktop.  Is there an undo of replace?

    Sorry, but's that's why you get the warning. "Replace" means just that - the new file over-writes the old one. There is no undo.

  • C3-Move the SMS to different folder

    Hi,
    I can see the option of Archive the SMS which will transfer the SMS in the Archive folder.
    Is there any way, I can move the SMS from Inbox to folder other than Archive?
    Thanks.

    I don't know why nobody answered this question? I used to do this in my Nokia 6234 and I think the question is straight forward. Please reply..t will be useful for me...as I was using this feature frequently in my old mobile.
    Thanks.

  • Importing to iTunes, does it move the file or play from its original location?

    Say I import music files from an external HD and place them on my desktop. Once I import them to itunes to play them does it make a copy and move the file to iTunes folder? That being said, after importing do I have duplicates of each file? Can I go ahead and delete them off the desktop? Does iPhoto work this way as well?

    Hello ,
    For iTunes :
    Created a copy of the files in iTunes folder .
    But before you delete the files from the desktop ,
    I suggest you check .
    Finder > music > iTunes > iTunes Media
    For iPhoto :
    I do not use this software so I do not know but
    I can assume it's the same thing as iTunes .

  • How can i move the itunes appdata from music folder to another folder?

    I want to get rid of all the database files in my music folder as other applications scan this folder for new music and it takes them forever to scan the itunes folder in the music folder because of all the folders for artwork etc.
    i thought that is what the %username%\appdata folder is for?!
    the help documents on the apple page just show me how to move my music, which is in the right place, but not the database xml and covers...

    Move the iTunes Library elsewhere, launch iTunes with the Shift key held down, and point it there.
    (60614)

  • How to move the "back" button to the top ?

    Hi there,
    I had some sub-menus and iDVD auto generate the "FORWARD" and "BACKWARD" buttons in the shape of a triangle. Problem is this buttons are alwayd at the bottom and I do not seem to be able to move the buttons around.
    Any tips on how to move these buttons to other places ?
    Thanks

    Old Toad wrote:
    You can't move them.  Those are hard coded into the themes.
    OT
    Thanks OT ... been trying for hours to move them !!

  • Hello ...  I have a problem with a wifi connection speed on my mac pro ... the problem is that in one room the internet opening for the websites is extremely slow ... but when i move the mac pro somewhat to other location ... the internet speed increase

    hello ....
    my connection problem on my mac pro is :
    that when i try to open a website on safari .... it delays ... and takes more than 30 seconds to open completely ...
    but when i move the mac pro to another location ... its internet opening speeds up ....
    also in one room ... web opening delays .... but on other rooms it is normal
    so what can i do to solve this problem ....
    Note : also when i hold it up and move in the same room ... the speed changes and somewhere speed up ... and in another location speed down ..
    thanks for you all ...
    Waiting for your support ... as quick as possible ...

    WiFi signals get stronger the closer the machine is to the router and the less interference/blocking of the signal like via walls with metal in them or of thick concrete.
    Since the signal emanates outwards in a sphere, your supposed to place the wireless router in a central location in the building so it covers all areas.
    The power of the router also has a affect, if your router is old or something not that powerful like a Airport Express, it doesn't have the ability to filter out other signals or enough punch to get through walls etc. or cover a large area as effectively.
    If you buy/have a powerful router of newer make and have issues where there is metal in the walls or thick concrete, then you can buy something like OpenMesh and by using Ethernet cables from the back of the router, extend the WiFi signal into other rooms and areas past the blockage.
    https://www.open-mesh.com/

Maybe you are looking for

  • Large file processing in file adapter

    Hi, We are trying to process a large file of ~280 MB file size and we are getting timeout errors. I followed all the required tunings for memory and heap sizes and still the problem exists. I want to know if installation of decentral adapter engine j

  • My sound is coming from my built in speakers instead of through the headphone jack.

    I have an Envy 15 1270ca and last night it froze while I was listening to music, forcing me to manually shut it off by holding down the power button. When the computer came back on, my sound was coming out of my built-in speakers instead of my extern

  • GUI interface for non-global zones

    My Goal: Create multiple zones, each running different services thus eliminating the need for multiple servers w/out using VMware. What I'm realizing: Everything I've read points back to non-global zones being only a console based environment. Does a

  • WAAS 4.1 - connection statistics

    Need help interpreting connection statistics. The GUI shows no values against 'Percentage Compression' and 'Effective Capacity' (as per attached .jpg's) Outputs of 'sh stat conn det' on both peer WAE's appear to show that the connection is fully opti

  • Is it possible to add static text to a TOC?

    Hi, Gang! My editor has suggested that I create an annotated TOC by adding a few sentences of descriptive text under each chapter title entry in the TOC. This static text would fall between the chapter title entry and the listing of subheadings withi