JTree rendering extra node and leaf icons at the end of the label

Hi,
Does anyone know how to add an icon to a JTree node or leaf in such a way that it will be displayed behind the text label?
In an example:
- rootnode
- childnode [icon]
|- leaf
+ childnode [icon]
Where -/+ are the default (un)collapse icons
I'd like to apply this to show additional information by using icons with respect to a node.
I couldn't find anything on the net besides changing the default open/close node icons, yet that's not what I'm aiming for here.

use this one.I think it will help u.Gd lk
tree =new JTree(root);
DefaultTreeCellRenderer renderer =(DefaultTreeCellRenderer)tree.getCellRenderer();
renderer.setLeafIcon(new ImageIcon(getClass().getResource("leafimages/3.gif")));
renderer.setClosedIcon(new ImageIcon(getClass().getResource("leafimages/1.gif")));
renderer.setOpenIcon(new ImageIcon(getClass().getResource("leafimages/2.gif")));
renderer.setBackgroundNonSelectionColor(new Color(15,85,134));
renderer.setBackgroundSelectionColor(Color.YELLOW);
renderer.setTextNonSelectionColor(new Color(217,227,227));
renderer.setTextSelectionColor(Color.RED);
renderer.setHorizontalTextPosition(SwingConstants.LEADING);
renderer.setHorizontalAlignment(SwingConstants.CENTER);
tree.setFont(new Font("Tahoma",1,12));
tree.setBackground(new Color(15,85,134));

Similar Messages

  • Skin Text of ADF Tree Node and Leaf separately

    Hi,
    Is it possible to skin a tree (ADF 11g), so that the text of a node is white on black, and text of a leaf is black on white?
    I know I can change the icons for a node and a leaf separately , but can't find how to change the styles of the text seperately.
    Groeten,
    HJH

    Hi,
    1. Thanks.. i did understand...I am creating a tree with region-countries-location... so when i drag and drop the region view as a tree ... I get a default code like this
    <af:tree value="#{bindings.RegionsView1.treeModel}" var="node"
    selectionListener="#{bindings.RegionsView1.treeModel.makeCurrent}"
    rowSelection="single" id="t1">
    <f:facet name="nodeStamp">
    <af:outputText value="#{node}" id="ot1" />
    </f:facet>
    </af:tree>
    In this i have used output text ... so how do i use the styleclass.... I am a new bie so can u also tel me how to use implement the same and alsohow to create a styleclass..........
    2. I have to display a seperate icons for parent node and leaf nodes.. can u tel me how to achieve this also...
    Can u provide me ur sample and also docs so that it would be helpful...
    Id: [email protected]
    Thx.. waiting for your reply

  • When i tried updating my iphone 4 to the latest IOS version 7.1.1 and at the end of the update it has the icon connect to itunes. When i try connecting to itunes it still doesnt program. Why is this? How can i fix it?

    When i tried updating my iphone 4 to the latest IOS version 7.1.1 it was updating until the end of the update where it had an icon which said connect to itunes. When i try connecting to itunes on my laptop it still doesnt program, by the way my itunes has the latest updae. Why is this? How can i fix it?

    Hey there Raymondd2014,
    It sounds like you had been updating the phone and now it is in recovery mode. Take a look at this info first:
    If you started your device in recovery mode by mistake, restart it to exit recovery mode. Or you can just wait—after 15 minutes the device will exit recovery mode by itself.
    If you are unable to get out of Recovery Mode, use the following article to restore your device with iTunes:
    If you can't update or restore your iOS device
    http://support.apple.com/kb/ht1808
    If you don't see your device in iTunes follow these steps for Windows.
    Thank you for using Apple Support Communities.
    Take care,
    Sterling

  • I produced a film in iMovie and send it to iDVD to make a DVD with a theme. When everything was ready it starts at my mac-computer. But at the TV the theme always comes at the end of the film not at the beginning. What have I to change, what´s wrong?

    I produced a film in imovie and send it to idvd to make a dvd with a theme. After finishing all the dvd starts in my mac-computer and first comes the theme and then the film.
    But when I start it with a dvd-recorder at tv first the film comes an at the end of the film the theme comes. What did I wrong? Where is my mistake?

    Hi
    A. Do not Use - Share to iDVD - in any iMovie version at all !
    B. Start a BRAND NEW iDVD project
    C. in iMovie'08 to 11 -  Share to Media Browser and as LARGE - NOT HD or other resolution as quality will be even worse
    - in iMovie HD6 - just close it and from within iDVD import the iMovie movie project icon (with a Star on it)
    - FinalCut - Export as QuickTime Movie - NO QUICKTIME CONVERSION - AT ALL !
    D. When in iDVD - see to that in the Lay-out menu (when it looks like a box-plott) there ARE NOTHING in the upper left most box (Auto Start box). As this overruns any Menu.
    E. Save as a DiskImage - TEST this first - befor burning any DVDs
    Yours Bengt W

  • I've installed Photoshop Elements 12 on my PC computer.  Although the installation message at the end noted the installation was successful, when I tried to double-click on the desktop icon, it won't open.  Any ideas?

    I've just installed Photoshop Elements 12 on my PC computer.  At the end of the installation, I received a message that the installation was successful.  I then tried to click on the desktop icon, but it won't open.  Any ideas as to what could be going on?  Thanks very much!

    This worked for me
    Sandeep Singh (Official Rep) replied to this problem:
    Elements 12: Editor will not Open  
    Hi Kimberly,
    Please follow these steps:
    Try to rename SLCacje to Slcache.old
    C:\Program Files (x86)\Common Files\Adobe
    and
    SLStore to Slstore.old
    C:\ProgramData\Adobe\SLStore
    and Right Click on the Photoshop Elements 12 icon and run as administrator
    Let me know if this works.
    Thanks
    Sandeep

  • Extra Blank line inserted at the end of the target file

    Hi,
    This is File to File senario and target files created with a extra blank line at the end of the file.
    Below is the source file structure and the content.
    <ns0:MT_MOD_FL xmlns:ns0="http://file2file/MES">
       <EMPLOYEE>
          <ID>12</ID>
          <Name>SREENI</Name>
          <Designation>M2</Designation>
       </EMPLOYEE>
       <EMPLOYEE>
          <ID>121</ID>
          <Name>RAJA</Name>
          <Designation>M3</Designation>
       </EMPLOYEE>
    </ns0:MT_MOD_FL>
    Below is the generated target file
    12     SREENI     M2
    121     RAJA     M3
    Here Generated target file suppose to have only two line instead of 3.
    What exactly do i need to change to generate the file with 2 line.
    I am not using any mapping as both source and target message structure are same.
    IN FCC i used only fieldSeparator, even i have not used endSeparator.
    Thanks in Advanace...

    Hi! Raghu,
    Just go through the below Help..documantation
    [http://help.sap.com/saphelp_nw04/helpdata/en/0d/5ab43b274a960de10000000a114084/frameset.htm]
    NameA.endSeparator
    To define an additional string as a separator after the last column in a row, specify it here. The system skips this string when it processes the last column (otherwise the system would treat it as part of the last column).
    NameA.fieldSeparator
    If you make an entry here, the system expects that the structure contains the specified character string (one or more characters) as a separator between the individual columns.
    If you have not made an entry for fieldFixedLengths, this is the only specification to identify the individual columns in a row.
    If you made a specification for fieldFixedLengths, the extra length of the separator is taken into account, but no further consistency checks are performed.
    Regards::
    Amar Srinivas Eli

  • Hi there , I'm downloading game from Mac App store ( The Witcher 2) and it's stuck on waiting almost at the end of the download pls help?

    Hi there , I'm downloading game from Mac App store ( The Witcher 2) and it's stuck on waiting almost at the end of the download pls help? I don't want to download it again is there any solution for this?

    Please test after taking each of the following steps that you haven't already tried. Stop when the problem is resolved. Back up all data before making any changes.
    Step 1
    Rebuild the Spotlight index. If you try to search now from the magnifying-glass icon in the top right corner of the display, there will be an indication that indexing is in progress.
    Step 2
    Unlock the Network preference pane, if necessary, by clicking the lock icon in the lower left corner and entering your password. Cllck Advanced, open the DNS tab, and change the server addresses to the following:
    8.8.8.8
    8.8.4.4
    That's Google DNS. Click OK, then Apply.

  • I'm trying to burn an iMovie in iDVD and at the end of the whole burn process it says "Multiplexer Error" "there was an error during formatting".  How do I fix it so that it'll burn?

    I'm trying to burn an iMovie in iDVD and at the end of the whole burn process it says "Multiplexer Error" "there was an error during formatting".  How do I fix it so that it'll burn?

    Hi
    Multiplexing error is a very complex problem due to many things (long long list following) - one common but not obvious reason is that material on the iDVD menu goes outside the TV-Safe area (or just touching it).
    So first - turn on TV-Safe area and move any object well inside of this.
    Wide screen stretched - usually (as I think) it is due to making a 4x3 movie in a 16x9 wide-screen project OR the other way around. This forces one to on flat-screen TV (or other) set the presenting view right - My has 4x3, wide-screen, zoom and auto-wide-screen and I have to switch this by my remote for some DVD I've made "wrong" way.
    Now my long long list on Multiplex Error
    LONG LONG LONG LIST
    Multiplexing Error
    PART One.
    Use of strange video/audio material e.g. .avi, .wmv, .mp3 etc.
    I only use.
    Video - StreamingDV (miniDV tape via FireWire) and
    Audio - .aiff (as on audio-CDs) (else converted to this .aiff 48KHz)
    Photo - .jpg (.bmp known problematic)
    Chapters !
    A.    Using strange letters in video project name e.g. +,/; etc. keep to a-z and 0-9 strange letters in project name e.g. +
    as described by Donnyboy69.  Does the title of your project have any symbols or decimal points in it. If so, that is why you are getting the error. I had a project that had a + sign which caused the same problem. I renamed it without the symbol and low and behold, it worked.
    B.    Location of Chapters
    • Can’t be at start or end of movie (Skip first/start one - iDVD sets this by it self. At the End - no need)
    • Not in a transition (or within 2-3 seconds from it)
    Important when from iMovie HD6 or previous - Now also observed when using FCE 4
    PART Two.
    from Robert Modero.
    "Multiplexing Error. Problem during initialization of tracks"
    Simply remember to add subtitles to your Quicktime files and menu buttons.
    Once I did that, I was back in business.
    from Boise Jim
    Do a safe reboot (by holding down the shift key until you see the spinning gear on gray background, then release, then restart when your start-up screen appears).
    I always makes a DiskImage first and test this so that it runs OK
    I use only - Verbatim DVDs
    I use only - DVD-R
    I burn at an as slow speed possibly e.g. x1
    This gives good DVDs
    PART Three.
    Multiplex Error
    Chuck, Chicago 2/7/2009.
    Back again. Here is what I have found to work. I also have and use a LaCie DVD-R/RW DL external drive and a LaCie external hard drive as well. Since yesterday I have tried a few ways to burn a themed iDVD project having four 56 minute movies on it, amounting to 226 minutes onto a DVD DL disc, capacity 240 minutes. Apple tech support really didn't know what to do but gave me a very good tip. I had two options left. Apple tech support's tip was to try disc image. One of the replies on a thread with this subject said not to, but my experience today is good. Put your project onto "Burn to disc image," under "iDVD, file." Yesterday encoding took me 23 1/2 hours. Overnight for iDVD disc image, encoding took 21 1/2 hours (again) while I slept. This morning I tried to copy/burn disc image to a DVD with Roxio Toast 7, and it stopped near the end of the burn with some kind of "error" message. So then I tried Utilities> Disc Utility> Burn icon, and followed it through. Be sure to click the DVD DL drive in the window "Burn disc in.". I had one other problem though. At the end of a 46 minute copy, it started to verify, and at the end of verify it rejected the burn. So I tried again, and when "verify" appeared, I clicked on "Skip." The disc finished burning and is doing fine and well. A long and tortuous process, but at last something works. I made several additional copies using Disc Utility. Best wishes. Chuck, Chicago.
    2. Disconnect any other external devices not absolutely needed.
    e.g. external USB/USB2 hard disks, other FW hard disks etc.
    3 Chapter marks in transitions - minimum 2 sec from
    FROM Bev.
    (Not a 'guy' but I will answer!)
    First, I do not think that mixing wide-screen and standard makes a difference in iDVD.
    Second, you should use a better brand of DVD disk. Also, many of us have experienced fewer problems on playback with DVD-R disks. Recommended brands here are Verbatim, Maxell and Taiyo Yuden. Memorex and TDK are not consistent and may not give you a correct burn. They apparently have fewer layers in the composition of the disk. I have always used Verbatim DVD-R disks and have not had any burn problems.
    Also, choose a slower burn speed, 4x or less.
    Third, to determine if the iDVD project will burn properly, create a disk image file (from within iDVD, go File->Save as Disk Image) and test it. Mount the disk image and then open DVD Player (in Applications) and view your project. If it plays correctly, you can then burn the actual DVD disk from the disk image file using Disk Utility.
    From. Boise, Idaho
    I did everything I've seen suggested, but a friend (who used to be an Apple Genius) suggested that I do a safe reboot (by holding down the shift key until you see the spinning gear on gray background, then release, then restart when your start-up screen appears).
    It worked, and I got a clean burn from iDVD.
    Hopefully this can help other people.
    by dheb0422
    Well, I finally got it, and it was odd enough to post here incase anyone looks this topic up again. Many things were tried, including burning the unedited film, the edited film without titles and chapter markers, abbreviating the chapter markers in case length was the issue (remember the old iMovie used to truncate them when moving to iDVD?). In the process, I noticed that one, and only one, chapter marker was on the same line as the title marker. All the others were on the line above. The only way I seemed able to change that was to clip a few seconds of film. After that last clip, the offending marker took a place on the line above, as were all the others. That run published, compiled completely and burned. That's one for the books.
    One user more writes
    To add my experience with Multiplex Errors using iDVD (7.0.4), I recently created two iDVD projects
    Video from both passed from FCE 4.01 with chapters
    One project worked fine in creating disk image file
    The other gave Multiplex Errors
    I tried suggestions to remove special characters and no chapter marks at beginning, but nothing worked
    Note that I've used iDVD for dozens of projects and this is first time I've run into Multiplex Errors
    Anyway, for problem project, I tried an experiment where I removed all chapters in FCE and passed to new iDVD project
    This time multiplex errors gone
    So had something to do with chapters
    So now I tried numerous experiments to remove individual chapters and try again creating disk image with new iDVD project
    After numerous tries, I was able to narrow problem down to 1 "Bad" chapter mark
    That is, when I left the "bad" chapter in my FCE project and passed to iDVD, iDVD gave multiplex error
    When I removed "bad" chapter mark (and others in), no multiplex error
    As a final experiment, I moved "bad" chapter mark about 5-10 sec's beyond original point and passed to iDVD, the multiplex errors now magically went away and I was able to finally create my disk image.
    I have no idea why this worked, but thought I'd mention here in case someone else runs into similar problem.
    Rich839
    In addition to Bengt's fine advice, burning errors can occur if you have located any of your menu buttons wholly or partly outside of the safe TV viewing area. Go to your main project menu, then click on View/Show TV Safe Area, to check. Drag into the safe viewing area any buttons that are outside the safe viewing area.
    Russ One - suggest this
    Multiplex Error-There was an error during muxing preparation
    One thing that worked for me was to export the video w/o chapter markers as a self contained movie (thereby not loosing the edits & etc). Then make a new FCE project and import that movie into a new sequence and add the chapter markers. I've used "-", "&" and "," with no problem in the chapter names. Removing the markers or exporting without them did solve the problem but renaming them with just numbers 1,2,3....5, did not solve the problem and since this problem seems to happen with with iMovie as well, it would suggest the problem is in the video or audio and in combination with the chapter markers iDVD just can't handle it. The only other possibility is that both iMovie and FCE share the same or similar chapter marker code that some how is corrupting the markers.
    Summary - What to try
    1. Chapters
    • Only A to Z and 0 to 9 in chapter title
    • No Chapter mark at very beginning of movie
    • No Chapter mark in or within 2 seconds from any transition in movie
    2. TV-safe area for buttons (no one outside this)
    3. Safe re-boot
    4. No other external devices connected - that are not needed
    SDMacuser adds to this
    • On #4 ... No ext. devices. Some think this applies mainly to ext. FW. Not the case. Also applies to ext. USB2 as well (not to mention flash drives too).
    Do not leave 3rd party devices / camera / camcorder plugged in unless it is being used with iDvd's One Step process. Certain web cams can trigger this also (especially ones with added features like LED light/s that draw additional power from the FW or USB bus).
    5. Minimum of 25Gb free space on Start-up hard disk
    6. Make a DiskImage first - reduces where problem originates
    7. Trash iDVD pref. file
    8. Make a new iDVD project
    9. Movies in project with same aspect ratio e.g. 4x3 or 16x9
    10. No other programs/applications running during iDVD process. e.g. Internet, screen & energy savers
    Yours Bengt W

  • I have the adobe cloud 9.99/ month photography package i downloaded lightroom 5.4, it told me it was a trial version, and i'm now at the end of the trial and it won't let me download the full version and i don't have a serial number

    i have the adobe cloud 9.99/ month photography package i downloaded lightroom 5.4, it told me it was a trial version, and i'm now at the end of the trial and it won't let me download the full version and i don't have a serial number. also, when i click buy, i get an error message saying, "application not found."

    There are two different LR’s, one with a serial-number licensing and one with a CC-signin license.
    You should uninstall the serial-number LR you have installed, then
    Quit the CC Desktop application,
    Restart the CC Desktop application—this will rescan what you have installed and not see LR,
    LR will now be on the CC Desktiop apps list, so install that.

  • I have an Iad2 and ever since ios6-there are issues.I get occasional lock-ups and have to reboot. The WSJ app freezes when running their videos to the end. The only work-around is to stop the video before it's over. Worse than windows me !!!!!

    My Ipad2 worked perfectly before ios6 upgrade. It now freezes occasionally and I have to reboot to get it to work. Also the WSJ app will now freeze if I try and run one of their videos that is imbedded in the article. My only work-around is to stop (press done) before the end of the video or I have to do a total reboot. The problems remind me of Windows ME . Will Apple resolve these issues or become more like Microsoft. Hopefully there will be a restore button in the future like Microsoft was forced to do because a lot of upgrades are just terrible. Am I crazy or are there other people having the same issues with ios6, or could this just be a coincidence and my ipad2 is starting to fail just when ios6 arrives ?

    I know this will not help but, the bluetooth headset I purchased for my wife works great and it pairs with our car and our sound bar in the livingroom (Motorola Droid Razr) 98.72.16.XT912.Verizon.en.US
    However I did not upgrade over the air but from a android web site and placed it on my external sd card. I believe this made the difference in why we had no issues and upgraded functionality has been great.
    Please note when I mention these bluetooth devices I mean the Razr connects with no problems.
    It also had no internet issues and none of the problems others have complained about in other threads.
    unfortunately when you say thousands have these issues I cannot say that is accurate. The hope is when large numbers of owners have updated to the Jelly Bean and are complaining inmase then Motorola will issue a patch to verizon to get out to the affected users.
    Of course now that Google owns Motorola Mobility and has laid off loads of workers it may never issue an os patch.

  • I keep track of family totals for fundraising at a school, I want a family name and totals for each fundraiser and then at the end of the year I would like an alphabetized list.  Can I do this in numbers?

    in numbers, how would I make a line for each family (100+)  a column for each fundraiser. and at mid year, and year end be able to print an alphabetical listing?
    example:     entertainment books          Chip Shoppe       Yankee Candle
    Smith          $350                                   $245                    $100
    Total at the end of the line, but I could live without.  I am just trying to lose the paperwork, and have it in the ipad for when parents approach me at meetings.
    Help!

    HI m,
    Using Numbers '09 (the Mac version), I'd use a table with one header row and two header columns.
    Family     Total     Ent.Books     Chip S.     Y. Candle
    Smith, J      $695        350            245             100
    Jones, T      $765        250            445               70
    An ascending sort on column A will put the families in alphabetical order (and carry the rest of the row along with them).
    The formula =SUM(2) in B2, and filled down from there, keeps the total for each family right beside the family name.
    You could add a Footer row at the bottom to keep totals for each column. Formula for column B: =SUM(B)
    I would leave the currency signs ($) off the amounts—they just clutter up the table.
    This assumes that the features listed are all supported on Numbers for iOS, the version running on your iPad.
    Regards,
    Barry

  • How do i start a motion tween by clicking a button and stop it at the end of the tween.

    Hi guys,
    I am creating a website for a project and i am trying to activate a box bropping down from another box when i click on the enter here button i have created. I have set the motion tween and its working when i preview i just unsure of the correct actionscript to start this tween when i have clicked the entere here button or how to stop it at the end of the tween.
    I am scared i may have made the layers in the wrong place, they are all currently in scene 1. does my second box that is dropping down need to be set inside the layers of the first box?
    Bit of a newbie at this.
    Thanks in advance!

    Create the dropping box movieclip as an animation by itself with a stop() coomand in the first frame and a stop() command in the last frame.  The click of the button should tell the movieclip to play(); at which point the animation should play and stop at the end.
    Another option would be to use an actionscript Tween to make the box drop.  Going that route the animation is what you code it to be and there is no need to have to stop it as it will end where you tell the Tween to end at.

  • I have the iPhone 3GS and I was updating to the IOS 5 version when at the end of the update it said updated failed. Now my phone is not recognized by my computer or any computer. The computer says it is a unknown device and my phone will not do anything.

    Need help finding out what happened to my phone and what I can do. After trying to update my iPhone 3GS to IOS 5 my phone will no longer work and is an unknown device to any computer. It is like it wiped out everything on the iPhone and has no hardware or data on it. At the end of the download and update of IOS 5 it said there was an error during the process and gave me no option but to push ok and know phone is not working. The screen shows the USB plug and iTunes symbol, but computers will not recognize device.

    What was the error number?  That would be very useful since the following gives actions for various errors.
    http://support.apple.com/kb/TS3694
    Try manually placing the iPod in recovery mode to see if that will make the iPod visible in iTunes.  See:
    http://support.apple.com/kb/HT1808

  • After download itunes installation began in windowx xp near the end of the installation the message says: it was not possible to write the value to the key Software / Classes / .mpg / OpenWithList / iTunes / .exe. Already reinstalled 3 times and always sa

    After download itunes installation began in windowx xp near the end of the installation the message says: it was not possible to write the value to the key Software / Classes / .mpg / OpenWithList / iTunes / .exe.
    Already reinstalled 3 times and always says the same message.
    thank you

    Only two had virus on windows XP this week and wiped them with Avast. The itunes asked me to install the update, and so I did. but it always gives me that message.

  • I have a new computer running os10.9. my old computer ran cs5.5(upgrade version). I am trying to get CS5.5onto my new computer. when i load cs5.5 towards the end of the install it asks for the cs5.5 serial number. i put that in and everything is accepted

    I have a new computer running os10.9. my old computer ran cs5.5(upgrade version). I am trying to get CS5.5onto my new computer. when i load cs5.5 towards the end of the install it asks for the cs5.5 serial number. i put that in and everything is accepted but then it asks for a serial number for a full version of a product which men is design premium cs3 but it doesn't give me that product as a choice from the drop down menu. it only gives me adobe master collection cs3. why when i have purchased all these different upgrades can i now not use them and how can i sort this out. i need cs5.5 on my new computer.

    Contact Adobe support:
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )

Maybe you are looking for