Hi..............I Stuk up with a problem in JTree Please, help me any one..

Hi,
I created a JTree where the DefaultMutableTreeNode is created at run time and for this node, the leaf items are added dynamically.....Now my problem is, I should get a popup menu when i click on the treenode particularly-----
* Node1
-------Node11
-------Child1
In this I want a popup only for the Node11 & its child elements if there is any Node2 also i don't want a popup and also for Node1 i don't want, when I am trying this I am getting the Popup to all nodes and child elements, please, help me any one who cross over this problem.............
Thanks In Advance,
Regards,
Sarikakiran

Firstly, do you know how to detect the right click? (Use a MouseListener.)
When you receive the MouseEvent for the right-click, you can get the coordinates of the click (i.e. where on the JTree the mouse was clicked).
You can then use JTree.getPathForLocation to get the path for the clicked node, which is a TreePath object. Use TreePath.getLastPathComponent to find which node was actually clicked on.
Having determined which node was clicked, you can then make a decision about whether to show a popup menu.

Similar Messages

  • Major Problem with Mac OS 10.4 Please Help

    Hey guys
    OSX froze when I was on Firefox. The cursor moved onscreen when I moved the mouse, but clicking on anything yielded no results. I couldn't force quit, use the apple menu, or even open other programs. So I turned off the computer and turned it back on. Even after doing this, clicking on different things still does nothing. I don't know how I can fix this problem without opening any programs!!
    On a side note, I recently installed Windows XP Pro with Boot Camp. This might have something to do with the problem.
    I'd really appreciate any advice on what I can do.
    Thanks...

    Alex,
    Sounds like disk/directory corruption and you need to run Disk Utililty to check & repair.
    Put the DVD in the machine and restart holding down "C". This should boot from the DVD. After answering the language don't choose an installation but go to the Utilities menu at the top of the screen. From there Disk Utility can be selected. Run verify and see what messsaged come up.
    Another option is to start by pressing shift. This loads minimal drivers and also (I think) runs a file system check in the process. If it starts you can run disk utility from there but you can only repair the startup volume (disk) when booted from the DVD.
    Hope this helps.
    Richard

  • Hi, iam facing proble in synchronizing 4 ni 4472 cards input with pxi -6052e analog output. please help me out to sort out this problem

    hi, iam facing problem in synchronizing 4 ni 4472 cards input with pxi -6052e analog output. please help me out to sort out this problem

    Hi achyuth,
    Thank you for posting on the National Instruments forum.
    I am not sure what you are trying to do.  Are you trying to input and output at the
    same time?  Are you just trying to
    synchronize all of your inputs?  Do you
    want them to run off the same clock?  If
    you could, give me some more information so I can understand your problem
    better.
    In the meantime, this might help you:
    PXI Timing,
    Triggering, and Synchronization Capabilities of E-Series Multifunction Data
    Acquisition ...
    PXI Timing and Synchronization
    Thank You,
    Nick F.
    Applications Engineer

  • I have problem when transferring book (PDF/Epub) from Computer to iPad with the new iTune? Please Help....

    I have problem when transferring book (PDF/Epub) from Computer to iPad with the new iTune? Please Help....

    With iTunes 11 you can enable the left-hand sidebar via control-S on a PC, option-command-S on a Mac. If you are trying to get it to the iBooks app then with the sidebar enabled the process should be similar to how it was on previous versions of iTunes e.g. add it to your iTunes library via File > Add To Library, connect the iPad and select it on the left-hand sidebar, and then use the Books tab on the right-hand side to select and sync it to the iBooks app.

  • HT1386 i tried to sync my ipad to my itunes using usb but it will say not charging,, i can sync with my ipod touch without any problem... please help..

    i tried to sync my ipad to my itunes using usb but it will say not charging,, i can sync with my ipod touch without any problem... please help..

    From http://support.apple.com/kb/HT4060 :
    The fastest way to charge your iPad is with the included 10W USB Power Adapter. iPad will also charge, although more slowly, when attached to a computer with a high-power USB port (many recent Mac computers) or with an iPhone Power Adapter. When attached to a computer via a standard USB port (most PCs or older Mac computers) iPad will charge, but only when it's in sleep mode.
    iPods need less power to charge them (their wall charger is half the power of the iPad's, 5W as opposed to 10W), so are more likely to charge via USB

  • It won't let me drag an effect from the browser all of a sudden. I have always been able to do before. I am using effects from favorites bin and when I try to drag it, it won't move. I have never had this problem before. Please help.

    It won't let me drag an effect from the browser all of a sudden. I have always been able to do before. I am using effects from favorites bin and when I try to drag it to the timeline, it won't move. I have never had this problem before. Please help.
    P.S. I have tried other effects including transitions and it still won't let me drag.

    Wow that was really quick, thank you so much.  Im not sure at all which version it was because i said it was around 4 years ago he bought it.  I know it isn't under his username, since he's a PC person (ugh) so i know its probably registered to one of our actual names.  isn't there some way to look it up since we did register it, because I'm not even sure where the disks are from when we bought it (we've moved a lot and also have two storage lockers, i know i would have kept it with other disks) but my cd rom drive is actually broken on my computer as well ( i think it got stepped on and is now squished and won't eject or run disks.)
    So is there anyway they can look up that its registered to one of our names since we did register it when we bought and installed it, or do i really have to find the disk with some sort of proof of purchase (i know there would be no receipt after all this time)
    either way, ill do what you suggested to the best of my abilities and thank you so much for answering my questions, i can't even open the program as its incompatible and find out the info from that) so I'm in a bit of a pickle and your response was so thorough and it didn't seem to be posted long enough to even write a well researched response, thanks, all the best,
    sarucia

  • Unable to sync iMac address book with iPad. Can you please help?

    Unable to sync iMac address book with iPad. Can you please help?

    I have the same problem as Sheilaza but haven't been able to solve it using the advice offered.  The same problem applies to my Calendars. When I look at my iPad settings in iTunes, it says:
    Sync Contacts
    Your contacts are being synced with your iPad over the air from iCloud.
    Over-the-air sync settings can be changed on your iPad.
    and the same for Calendars.
    On the iPad, in iCloud settings, I have checked 'Contacts' and 'Calendars' as 'ON' but the Calendar remains blank and the Contacts are a very old version that was somehow created when I set up the iPad initially.
    Any ideas?
    Thanks.

  • Am just ****** n not happy with my iphone 5 does this happened to any one else its just lose n rattle from every where power button volume rocker its very annoying every time it vibrates or am talking to some 1 on the phone lil loude..

    am just ****** n not happy with my iphone 5 does this happened to any one else its just lose n rattle from every where power button volume rocker its very annoying every time it vibrates or am talking to some 1 on the phone lil loude..

    It looks this community is not active or the support team don't have time to provide their inputs for the problems posted on this community.

  • HT204269 itunes showing 'backup is corrupt or not compatible with the firmware you restored'.Please help.

    itunes showing 'backup is corrupt or not compatible with the firmware you restored'.Please help.

    Hi Ckuan,
    Thanks a lot for your advice.    
    Deleting the correupted back up means to delete the information of one month since the last back up I made is one month ago.....right? 
    This back up I made right before I restored my iphone.  During the restore however my OS was upgraded to 5.1.1. and reading the comments on the internet it seems I am not the only one whom experience this problem. 
    Can it be that if I downgrade my OS back to 5.1. the back up will not be considered as corrupted?  If so, how do I downgrade the iphone?
    Thanks in advance.

  • I am not able to launch FF everytime i tr to open it, it says FF has to submit a crash report, i even tried doing that and the report was submitted too, but stiil FF did not start, and the problem still persists, please help me solve this issue in English

    Question
    I am not able to launch FF everytime i try to open it, it says FF has to submit a crash report,and restore yr tabs. I even tried doing that and the report was submitted too, but still FF did not start, and the problem still persists, please help me solve this issue
    '''(in English)'''

    Hi Danny,
    Per my understanding that you can't get the expect result by using the expression "=Count(Fields!TICKET_STATUS.Value=4) " to count the the TICKET_STATUS which value is 4, the result will returns the count of all the TICKET_STATUS values(206)
    but not 180, right?
    I have tested on my local environment and can reproduce the issue, the issue caused by you are using the count() function in the incorrect way, please modify the expression as below and have a test:
    =COUNT(IIF(Fields!TICKET_STATUS.Value=4 ,1,Nothing))
    or
    =SUM(IIF(Fields!TICKET_STATUS=4,1,0))
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • HT1338 When I connect my Macbook Pro to my Dell DLP projector, either via cable or wirelessly, I just see a dark screen with the mouse and mouse trails only, can any one help?

    When I connect my Macbook Pro to my Dell DLP projector, either via cable or wirelessly, I just see a dark screen with the mouse and mouse trails only, can any one help?

    jpmarkques post is a good start point, after folling his directions, you can try detect displays. Also try different rsolution and refresh rates.
    Most of the projectors I have used support a 1024X768 res.
    Youcan also try a pram reset if it still does not detect.
    Leave theproctor connected and powered up, power down the MBP.
    Power back up the MBP and hold the following keys before you hear the start up chime:
    Option, command, P,R (no commas) continue to hold these keys till you hear the start up chime 2 times.

  • I updated to Firefox 7 and now the scrollwheel on my touchpad doesn't work. Have tried updating my device driver, and restarting with add ons disabled. Please help!

    OS- Windows 7
    Upgraded from Firefox 3. I tried updating to FF 4 a while ago and had the same problem, so I went back to 3. Decided it was time to upgrade and the problem recurred. Please help!

    Try to modify the pref <b>ui.trackpoint_hack.enabled</b> on the about:config page from the default value -1 to 0 or 1 to see if that makes the scroll pad work.
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    *Use the Filter bar at to top of the about:config page to locate a preference more easily.
    *Preferences that have been modified show as bold (user set).
    *Preferences can be reset to the default via the right-click context menu if they are user set
    *Preferences can be changed via the right-click context menu: Modify (String or Integer) or Toggle (Boolean)

  • Users of imovie experience a lot of problems and crying for help and no one at Apple did not respond I do not understand how a company like Apple puts experts to help users Please note that anonymous experts in Internet offer their help for money

    Users of imovie experience a lot of problems and crying for help and no one at Apple did not respond
    I do not understand how a company like Apple puts experts to help users
    Please note that anonymous experts in Internet offer their help for money

    Users of imovie experience a lot of problems and crying for help and no one at Apple did not respond
    I do not understand how a company like Apple puts experts to help users
    Please note that anonymous experts in Internet offer their help for money

  • I am running an Apple imac G-5 with OS 10.5.8. I am getting the message that my version of Safari is no longer working. I downloaded a newer version of Safari and I got the message that it would not work with my OS 10.5.8. Does any one have a suggest

    I am running an Apple imac G-5 with OS 10.5.8. Processor: 2 GHz. Memory: 2 GB DDR SDRAM.  I am getting the message that my version of Safari is no longer working. I downloaded a newer version of Safari and I got the message that it would not work with my OS 10.5.8. Does any one have a suggest

    Your post somehow found its way to a little-viewed forum for an obsolete Apple productivity program. I have asked the Hosts to move you to a more active and appropriate forum for your product.

  • Cannot install windows 7 on brand new mac mini with 256 g sdd? Please help.

    Cannot install windows 7 on brand new mac mini with 256 g sdd? Please help.
    Have tried all tricks found on the net and followed every advice from apple support.
    Still black screen with blinking curser when mini is rebooting following partitioning via bootcamp.
    Very nice and fast mashine, wouldnt like to return it.
    thanks allan

    Is that an Apple SSD?
    what model is it?
    Is there a firmware update if non Apple?
    Lion is not server version.
    Windows is ? ISO or retail?
    Google macmini Windows 7 SSD Apple Boot Camp

Maybe you are looking for

  • Validation of a field in select statement

    In selection screen, skunag(vbrk-kunag) and swerks(vbrp-werks) fields are there.these two fileds are obligatory. If skunag field values start with 'P'.I have to remove the initial 'P' in that values,because I have to validate that field with ztable-k

  • Db_hotbackup segfaults with -D option

    Running db_hotbackup with the -D option, along with a DB_CONFIG that does not contain a set_lg_dir command gives a segmentation fault. The script below tells the tale. This is with BDB 4.8.30. There's a simple workaround, so we're not stuck. $ ./ex_t

  • The Weather Channel is gettign on my nerves

    Intellicast app. Both Android and iOS - sorry, WM, no one knows how to program for you :`(

  • Embedding fonts with an application

    This is a multipart question so I will put up some bucks for a good answer. I am writing an application and have a set of fonts that I want to bundle with it. I want the application to use ONLY these fonts and not have access to any other system font

  • Data Guard Archive Latency with Physical Standby

    I'm trying to get a latency number that tells me how long it took ARCH to move an archive file from the Primary instance to the physical standby instance and "apply it". I see lots of numbers but I can't make heads or tails of them. Does a metric suc