Seting the default JTree icons

Hello,
I want to edit another icons than the default icons in JTree object.
I look in the javadoc at the several methods, but I do not find a method witch can give me the possibility to setup the collapsed and expanded icon.
If some one now how to do that, it will be cool.
Thanks.

There are two common ways to change icons:
1. If you want to adjust icons for a specific tree, use the DefaultTreeCellRenderer methods:
setLeafIcon
setOpenIcon
setClosedIcon
Of course, you can get the renderer using the JTree Method:
getCellRenderer
2. To change the look-and-feel globally, use the UIManager method put, for example:
Icon yours = . . .;
UIManager.put("Tree.leafIcon", yours);
UIManager.put("Tree.openIcon", etc...);
UIManager.put("Tree.closedIcon", etc...);
//now create JTree's--Nax                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • When I put a website Icon on my desktop, how do I make firefox use the Icon native to that website instead of the default Firefox Icon?

    When I drag and drop a website onto my desktop, how can I make Firefox use the icon native to that website instead of the default firefox icon?
    I have even gone painstakingly (SEVERAL TIMES) to the sites with IE, dragged the site onto my desktop in order to obtain the site native icons for my desktop (and deleted the ones with the Firefox icon) .... but they all soon revert to the default Firefox icon.
    E X T R E M E L Y F R U S T R A T I N G !!!!!!!!!

    I don't want icons from the Firefox library.
    I want the icon that comes from the website I'm making the shortcut for.
    (If you go to a site in IE you will see the site generated icon at the left end of the URL in the address field.)
    If I make IE my default browser I am able to get (and keep) those icons as shortcuts on my desktop without a problem.
    I want to keep Firefox as my default browser.
    So I want to know how to make Firefox accept the icon that comes from the website like IE does.
    I have even gone to the trouble to use IE to create the shortcuts with the site specific icons.....but after I do that...... FIREFOX CONVERTS THEM TO THE FIREFOX DEFAULT ICON as soon as I re-boot or refresh my desktop.
    I generally prefer Firefox as a browser....but If there's no fix.....I'm going to dump Firefox.

  • Changing the default edit icon of interactive reports

    Hi,
    I have tried to look around to find a place to set the default edit icon of interactive reports and I cant seem to find it.
    Another thing is: What would be the best practice to change the icon to a new image that is NOT part of the apex installation? Right now we have 8 icons to choose from, which are all located in apex image library. Its not even located in the theme. So if I just overwrite the current default icon it would be overwritten again next time I upgrade apex.

    bjarkekr wrote:
    Another thing is: What would be the best practice to change the icon to a new image that is NOT part of the apex installation? Right now we have 8 icons to choose from, which are all located in apex image library. Its not even located in the theme. So if I just overwrite the current default icon it would be overwritten again next time I upgrade apex.I would apply an override using CSS.
    Create a style sheet and include it in all required page templates:
    .apexir_WORKSHEET_DATA td[headers="LINK"] a img {
      display: none;
    .apexir_WORKSHEET_DATA td[headers="LINK"] a:link,
    .apexir_WORKSHEET_DATA td[headers="LINK"] a:visited {
      display: block;
      /* Change dimensions to size of your icon */
      height: 18px;
      width: 18px;
      /* Change URL to location of your icon */
      background: transparent url(/i/ws/small_page.gif) no-repeat;
    }This removes the edit icon specified in the IR attributes and replaces it by showing whatever icon you want as a background image on the link element. This allows you to change the icon universally for all IRs by making a simple change to the dimensions/background image URL in one place.

  • How can we change the default folder icon

    hi, is there anyway we can change the default folder icons of OS X?

    A quick search in these forums for folder icon brings up many hits, including this one: http://discussions.apple.com/thread.jspa?messageID=3792805

  • What Are The Default Music Icons On iTunes 10?

    What Are The Default Music Icons On iTunes 10?
    So far I have:
    Alternative
    Blues
    Classical
    Country
    Dance
    Electronic
    Folk
    Christian & Gospel
    Hip-Hop
    Jazz
    Latin
    Pop
    R&B
    Reggae
    Rock
    Vocal
    World Fusion
    Which ones am I missing?

    the default apps would vary by region
    this is whats in most models below
    facebook
    hi five
    youtube
    real player
    ovi music
    radio
    bounce tales
    these are whats on most models but they would vary by region and operator
    some others would have extra or even less
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • Changing the default sun icon

    When I create a JFrame it comes with the default sun icon (the coffee cup). Suppose I want to personalise my frame with my own icon. How do I change the icon.

    Don't know exactly but I think it has to do with java.awt.Frame.setIconImage()

  • How to change the default JAD Icon image in JStudio

    Dear friends,
    I have one dought,how to change the default icon JAD image in jstudio application.Its very important to me.And one find answer please tell .

    Dear friends,
    I developed one application in jstudio.And need to set an special icon for my application.While i download my application in to mobile. The icon should be displayed in the mobile.To show my application as unique from other applications.But i dont know how to set an icon for my application. If any one find answer please reply as soon as possible.
    Thank you

  • How to hide the default arrow icon of af:tree node

    Hi All,
    I am using Oracle JDeveloper 11g R2.
    I want to hide the arrow icon which is displayed by default with af:tree node. The use case is to display custom icons for all the nodes. The problem is that when I am customizing icons of tree node, it is showing arrow as well as the icon with each node. Which doesn't seems fine. Can any one help/guide on how to hide the default af:tree node arrow icon.
    Thanks in advance.
    Regards
    Bilal
    Edited by: Bilal on 29-May-2012 01:32

    Hi,
    Use Css to change the icon style:
    af|treeTable::expanded-icon {
    content: url("/adf/1.gif");//content : none;
    outline: none ;
    af|treeTable::collapsed-icon {
    content: url("/adf/2.gif");//content : none;
    outline: none ;
    af|treeTable::leaf-icon {
    content: url("/adf/3.gif");//content : none;
    outline: none ;
    Regards,
    Raj Gopal K

  • How to revert to the default file icon for Illustrator CS4

    Hey everyone,
    It has been a few months now and I've searched most forums on how to fix this issue, but sadly, It seems the problem isn't that common. I'm using a Windows 7 machine and have installed the Adobe Master CS4 suite.
    The problem is that I can't seem to revert the illustrator file icon (how .ai files appear in the explorer) back to its original image. The image below shows you what the .ai files look like in my computer. I was hoping if there's someone who could help rectify this issue.
    Much thanks!
    Var
    p.s. I've tried the default file association tool, and have also tried switching back and forth between .ai's default program, but I still get this ugly file icon.

    This is what an Illie file icon normally looks like.
    I'm using CS3 on a Mac.
    If I understand you right you want to be able to see a thumbnail og the file's content.
    As long as you have saved your file with pdf compatability you will be able to see such a thumbnail in the Finder when you have your Finder window set as Columns and click on the file's icon. You will also see a thumbnail if you use Bridge.
    However saving Illie files with pdf compatability increases their weight enormously, so I usually don't unless there's a special reason for doing so.

  • Changing The Default Window Icons

    Is there a way to change the MDI Window Icon when the Form is run on the web. Changing the icon in client/server seems to work well with the following (attached d2kwutil.pll):
    declare
    a pls_integer;
    begin
    a := win_api_utility.get_active_window(false);
    win_api_session.change_mdi_icon(A,'newiconfilename',0);
    end;
    The problem with this is that it will always raise an error on the web because It cannot get the handle for the window (Frame) in Java. Is there a way to change the icon or am I just shooting in the dark. Any help would be appreciated.
    null

    hi sir
    my name OSAMA and wanna your help in changing MDI window
    i trying this code
    I am trying this code
    Declare
    hWin pls_integer := win_api_utility.get_active_window;
    Begin
    WIN_API_SESSION.CHANGE_MDI_ICON(hWin,'e:\e.ico',0);
    End;
    I have error
    frm-40734: internal error :pl-sql error occurred
    sorry but this is an urgent problem
    thank you sir
    osama

  • .zip icon is blank white rather than the default Tiger .zip icon.

    Recently I removed StuffIt from my Mac and now when I have a .zip file sitting on my desktop it has a generic white icon rather than the default .zip icon (which I seem to remember was white with a zip through the middle).
    I was wondering if there is way of getting .zip files associated with that icon once more. I realise this is a pretty minor issue, but I'd like to be able to fix this.
    After searching the discussion pages I came across this page - http://discussions.apple.com/thread.jspa?messageID=733697&#733697 and a user linked the poster to a page that had a terminal command to fix this issue - unfortunately the link is now dead.
    Many thanks for any help you may have.

    Hi, d.
    See my "Resetting Launch Services" FAQ.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X
    Note: The information provided in the link(s) above is freely available. However, because I own The X Lab™, a commercial Web site to which some of these links point, the Apple Discussions Terms of Use require I include the following disclosure statement with this post:
    I may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • Unable to replace the default icon with the application icon for SIS files on packaging

    Hi,
    I got hold of the earlier (now removed from Adobe) available Adobe Mobile Packager (the free version). Now the problem is that I see the default packager icon on my phone for my Flash Lite application. Also, the packager does not allow me to select my application icon. I have placed the desired icon in the output folder along with its svg; doesn't help either.

    You mentioned that you implemented loopback merge mode.  It's possible some of the settings being included in the merge are interfering with your new file associations.  Have you checked to see if there are any conflicting file
    associations in other GPOs that may be applying?  If so, you may want to experiment with loopback
    replace mode.
    Also check to see if any file associations are being set in the computer configuration settings, since you are attempting to set associations in the user configuration.  In a merge scenario the computer policy is processed after the user policy, and
    has precedence if any of the settings conflict.

  • Changing the default jdk images

    Hi ALL,
    Could any one please tell me where are the default jdk icon images stored for example the jchechbox etc. Can i replace any of the images for example if i want to change the default JCheckBox image,can i do that ?
    Thanks,
    Viral Doshi

    Hi Torgil,
    I am actually trying to get the checkbox icon exactly
    as it is shown in the windows os(Which has a white
    background and a black tick).Now even if i use the
    windowslookandfeel of swing ;it is painting an icon
    which has a gray background and a black tick).On my machine the windows look and feel paints Swing checkbox icons are identical to Windows own checkboxes (white background, black tick). How do you set the look and feel?
    I am
    able to paint the background white but i don't want
    to do that.I can use other images for the icon but
    again it involves a performance issue.
    What makes you think the performance would be noticably affected? Have you tried it?
    Is it possible by any means to show the exact windows
    icon wihtout painting and setting icons.? Is it
    possible to use native methods to call MFC components
    like a windows checkbox ? How will affect
    performance. ?I'm sure you can do that, but I'm afraid I have no idea how.

  • Show ebook cover page instead of default EPUB icon

    Hi,
    As my collection of PDF ebooks was growing, I grew to appreciate the fact that Acrobat was showing the ebook cover in Windows Explorer instead of the default icon. It allowed me to quickly search for ebooks by browsing through the covers quickly, much like I could quickly scan a bookshelf of “real” books to find the one I am looking for, remembering the layout and the colours.
    Unlike Acrobat, Digital Editions does not show the EPUB ebook cover in Windows Explorer; rather, it shows a default EPUB icon (it does show the cover in its library, but not at the Windows Explorer level).
    As a growing number of ebooks I purchase are now in EPUB format, I would find it very convenient to see the ebook cover instead of the default EPUB icon.
    Is there a way to achieve this with the current Digital Editions? Is there an obscure setting somewhere that would turn this on? If not, may I suggest Adobe to implement this feature in the next release of Digital Editions? Although I prefer to stick to official Adobe products rather than third party software, in the meantime, I am also open to third party EPUB reader that would have that capability if someone could make a recommendation.
    Philippe

    Look at your item label template

  • Default custom icon

    Hi, I restored from time machine my downloads folder.
    If i recall there was a custom icon for the "download' folder. Something maybe with an arrow.
    Now its just a plain blue folder. Any ideas how to restore the default looking icon?

    Joe Chiarelli wrote:
    Hi, I restored from time machine my downloads folder.
    If i recall there was a custom icon for the "download' folder. Something maybe with an arrow.
    Now its just a plain blue folder. Any ideas how to restore the default looking icon?
    log out/in.

Maybe you are looking for