How do I get a dotted line to connect nodes in a JTree?

I am trying to recreate a Windows Explorer application, does anyone know how they get the dotted lines to connect the nodes in the JTree????

JTree uses a specific line style to represent the edges between nodes. The default is no edges, but we can set JTree�s lineStyle client property so that each parent node appears connected to each of its child nodes by an angled line:
myJTree.putClientProperty("JTree.lineStyle", "Angled");
We can also set this property such that each tree cell is separated by a horizontal line:
myJTree.putClientProperty("JTree.lineStyle", "Horizontal");
To disable the line style:
myJTree.putClientProperty("JTree.lineStyle", "None");
As with any Swing component, we can also change the UI resource defaults used for all instances of the JTree class. For instance, to change the color of the lines used for rendering the edges between nodes as described above, we can modify the entry in the UI defaults table for this resource as follows:
UIManager.put("Tree.hash", new ColorUIResource(Color.lightGray))
Hope this serves your purpose.
Regards,
Sachin Shanbhag

Similar Messages

  • How to make a curve dotted line

    Hi there,
    Since now 2 days I am trying to figure out how to make a curve dotted line with photoshop CS3 on WinXP. I know how to make a strait line using the line tool.
    Now, how to make a curve line ? I tried the pen tool, but it ended up with a filled shape rather than with a curve line
    How to set the thickness of this curve ?
    How to make a dotted curve ?
    Of course, I don't want to use hand-drawings with the brush.
    Thanks a lot for your help,
    Alex_pier

    Used the Pen tool, but click on the correct icon on the top left on the Options Bar. That way you can get a Path instead of a Shape Layer.
    Once you have your Path you can stroke it with a Brush or any drawing tool. Various options appear in the Brushes palette. For a dotted line you will need to increase the spacing. If you want dashes, use a square brush and set the Angle Jitter to Direction.

  • How do I make a dotted line in Illustrator?

    I've figured out how to make a dashed line (under Stroke), but how do I make a dotted line? Little round circles, one after the other that I can resize, turn into a circle, stick to a path?
    Thanks

    The string of pearls was done on CS2
    The orange "pearls" had a stroke weight of 40 pt, Dash 0, Gap 42 and a new black stroke behind with a weight of 42 pt.
    Then the stroke was copied, coloured just white and moved a bit to make the white "highlights". Weight 10 pt, Dash 0, Gap 42.
    I suppose, if one could be bothered, it would be possible to make a string of pearls with alternating big and small pearls by using a combination of dash settings on New Strokes. Should work all right as long as the Dash is a constant or an exact multiple. I can't be bothered!
    I don't understand that bit about having the last gap as 0. The pearls came out fine with just one setting for the dash and one for the gap. The other boxes weren't filled in.

  • TS3276 My 3 mail accounts are all off-line. How do I get them on-line?

    My 3 email accounts are off-line.  How do I get them on-line?

    If you go to Mail>Mailboxes Menu - is Take All Accounts Online and option? Does it re-connect them.
    Are the Mailboxes with different providers? If they're all the same provider perhaps there are problems at their end, rather than yours.
    I assume your internet connection isn't playing up.

  • Getting a dotted line around .swf files in my flash site now. this is new as of Firefox 3. Using 4 on a MacBookPro. tried "style outline none" fix. doesn't work. any help?

    Question
    getting a dotted line around .swf files in my flash site now. this is new as of Firefox 3. Using 4 on a MacBookPro. tried "style outline none" fix. doesn't work. any help?

    /* stops annoying focus-selection boxes in FF3 */
    *:active, object:focus, embed:focus
    outline: none;
    }

  • How to draw a straight  dotted line on Bar chart at 70%?

    Hi
    Could you please let me know how to draw a straight dotted line on BAR CHART at 70%?
    Thank you

    Hi,
    This may vary depending on what version of crystal you are using.
    Right click on the graph & go to 'chart options' & choose 'Grids'
    In the grids pane go to the grids tab.  From there check the 'draw custom line at' and specify where you want to draw the custom line.
    Once the line is drawn highlight the line, right click and go to 'chart options' & 'selected item'.
    select what format you want the line to look like (choose the dashed one).
    good luck!

  • How can we get the selected line number from JTextArea ?

    how can we get the selected line number from JTextArea ? and want to insert line/string given line number into JTextArea??? is it possible ?

    Praitheesh wrote:
    how can we get the selected line number from JTextArea ?
    textArea.getLineOfOffset(textArea.getCaretPosition());
    and want to insert line/string given line number into JTextArea??? is it possible ?
    int lineToInsertAt = 5; // Whatever you want.
    int offs = textArea.getLineStartOffset(lineToInsertAt);
    textArea.insert("Text to insert", offs);

  • How do I get the shape/line 'properties window' on Photoshop sc4. (mac)  It shows it on the help videos but I cannot find it?

    How do I get the shape/line 'properties window' on Photoshop sc4. (mac)  It shows it on the help videos but I cannot find it?

    For a crisp border of any color or any size, Just expand the "Canvas" by 0.5 inches or whatever dimension your file needs.

  • Error  message :  capture  device  off line;  how  do I get it on line

    error  message,  capture  device  offline,  how  do I get it on line?

    Hi Fathahks,
    Which version Premiere pro are you using?
    make sure that the device is properly connected. Also try with a different firewire cable/ legacy drivers for firewire.
    are you able to capture in DV?
    Try the steps & see if they help.
    Thanks

  • My new smart TV recognizes my network, & asks, "Please enter you WEP keys (10 or 26 hex digits)" but my netwotk uses a password of 6 characters. How can I get my smart TV to connect to my network?

    I have a current iMac with the latest OS update.
    My new smart TV recognizes my network, & asks, “Please enter your WEP keys (10 or 26 hex digits).  My  Airport Express, an early model, only requires a password of less than 10 characters.
    When I open “airport utility,”on my iMac it tells me this version doesn’t support my base station & says go to “Airport Service & Support.”  That’s what got me here.
    My earlier MacBook runs OS 10.6.8. Its version of  Airport Utility works. Its Airport ID has 17 characters, & uses the same password to access the internet, but it also has a “wireless password” of 26 characters, but only shows me the dots. i haven’t the foggiest notion  what the characters are, if I put them in there years ago when i did the original configuration, or if they got there otherwise..
    I’m afraid of changing those settings for fear that I’l mess up the whole thing.
    How can I get my smart TV to connect to my network, ?

    Please check out the following AirPort User Tip on how to recover AirPort passwords.

  • I am using an Airport Extreme for wireless and a Netgear VPN Switch for wired connections.  How do I get the two networks to connect?

    I am using an Airport Extreme for wireless and also have a Netgear VPN Switch (FV5318) for internal wired ethernet connections.  How do I get the two networks to connect to each other?

    Tesserax, I would like to keep the Airport Extreme in nplace before the Netgear FVS318 switch because I am using all of the 8 ethernet outputs distributed to 8 differerent locationsl  This way I can just use one of the LAN outputs from the Airport to feed the FVS318.  Here is what I think I am hearing you say:
    Tne reason why the wired and wireless devices are not communicating is because the FVS318G is also a DHCP server and in conflict with the AEBS.
    To remedy the situastion here is probably what I need to do in order:
    1. Change the LAN IP Address of the Netgear FVS318G to be the same subnet of the Airport Extreme.
    2. Then, disable the Netgear FVS318G as a DHCP server.
    3. Make sure the ethernet cable from the LAN port of the Airport Extreme connectis to the LAN port of the Netgear FVS318G.
    4. Restart everything.
    Can you provide me the steps I need to take to get the right IP addresses from the Airport Extreme to put into the Netgear to fix the conflict?  I have the Airport Utility.  I also have two airport express hot spots, and two Apple TVs in addition to computers attached to the 8 ethernet lines.
    Thank you.
    Steve

  • I had a new hard drive replaced in my imac. Now my 1st generation apple TV does not appear under devices in itunes. How do I get my apple tv to connect to my computer? My OS is 10.6.8

    I had a new hard drive replaced in my imac. Now my 1st generation apple TV does not appear under devices in itunes. How do I get my apple tv to connect to my computer? My OS is 10.6.8

    Welcome to the Apple Community.
    Navigate to Settings > Computers > Your Library on the Apple TV, you may be told you will lose all synced content, but you can't doing anything abouty this, you won't lose any purchased content that has yet to be transferred. Then select Settings > Computers > Connect To iTunes, note the passcode that appears on screen, click on the device in iTunes and enter the passcode when prompted.

  • Hi! I sold my Iphone on ebay. The seller wants to connect the Iphone with his Apple ID, but it did not work because it says that the Iphone is already connected with another Apple ID. How can I get rid of this old connection? What do I have to do?

    Hi! I sold my Iphone on ebay. The seller wants to connect the Iphone with his Apple ID, but it did not work because it says that the Iphone is already connected with another Apple ID. How can I get rid of this old connection? What do I have to do?

    What to do before selling or giving away your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT5661
    MaggySimpson wrote:
    Hi! I sold my Iphone on ebay.
    Follow the instructions to remove a device you no longer have.
    From here  >  http://support.apple.com/kb/PH13695?viewlocale=en_US

  • How do I get my personal laptop to connect to my Personal Hotspot on my IPhone 4S after I downloaded IOS6? The laptop connected before I updated my phone. Now it does not.

    How do I get my personal laptop to connect to my Personal Hotspot on my IPhone 4S after I downloaded IOS6? The laptop connected before I updated my phone. Now it does not.

    http://support.apple.com/kb/TS2756
    http://support.apple.com/kb/index?page=search&src=support_site.home.search&local e=en_US&q=personal%20hotspot

  • How do you get your iPhone to stop connecting to face time while on a voice call? And it also does this when I'm on the phone with someone who doesn't have an iPhone. I look down at my phone while on a call and it says connecting to face time

    How do you get your iPhone to stop connecting to face time while on a voice call? And it also does this when I'm on the phone with someone who doesn't have an iPhone. I look down at my phone while on a call and it says connecting to face time

    How are you dialing these calls?

Maybe you are looking for

  • Oracle 8.1.6 jre problem on Linux Mandrake 7.2

    I tried to install Oracle 8.1.6 on a Linux Mandrake 7.2 distribution using bash (sh is a link to bash) as shell and glibc 2.1.xx (this is the last Mandrake distribution) runInstaller script died complaining about command not found. Running the runIns

  • How to correct a boolean phrase in numbers?

    Hi Guys, I have been using excel to create a top 5 formula which is rather complicated and I got it from the internet.  I have transferred it into numbers but it does not work as it turns part of the formula into a boolean phrase, thus creating an er

  • Changing images in bsp application.

    hello freinds, i am new to bsp as well as SAP. now i have a task that.. i have some images in MIME. But these images r always keep on changing in its size. Now i have to display them in a client.could anyone tell me that where should i store the imag

  • DD_DOMA_GET" not released for 'remote' calls : Advice required

    Hi, This is one of the common messages that I(and many SDN'ers) received when I tried to deploy my application in WAS SP12. I read the messages and it was quite obvious, that DD_DOMA_GET needs to be RFC enabled and this would work fine. However, I al

  • How come siri doesn't find places, restaurants or maps in canada  .

    how come siri doesn't find places, restaurants or maps in canada .I am so angry that apple says that siri does all of that but forgets to say USA only !!!!