How to know which leaf node i click and how to add a listener to each node?

hi! hello to all members, i have a problem i know how to create a listener, but i dont know how to add a listener to each leaf node. here is the scenario i want to do, i have a JTree where theres a topic that you can select on each leaf node, so when the user click the specific topic it will open another JFrame,which i dont know how to do it also, that its! the next problem will be how do i know which leaf node i select, so that i can open a right topic before the JFrame will open?please, i am very need this to solve quickly as possible. thanks again to all members.

What you have to do is to add a mouse listener on your JTree. Try something like this:
tree.addMouseListener(new java.awt.event.MouseAdapter() {
         public void mouseReleased(MouseEvent e) {
            tree_mouseReleased(e);
private void tree_mouseReleased(MouseEvent e) {
      TreePath selPath = tree.getSelectionPath();
      // Check If the click is the Right Click
      if (e.isPopupTrigger() == true) {
      // This is your right Click
       else {
                 // This is your Left Click
}Your other problem: Set the userObject on nodes and on left click compare it with your object, if it matches, display the appropriate file. Alternatively, if your nodes are unique, you can match the names to open the file.
Hope this Helps
Regard
Raheel

Similar Messages

  • I work for Lionbridge Inc, and am having trouble seeing the mobile landing page format. They said it doesn't work for firefox 4.0 but it does for firefox 3.6. How do I know which program I'm in and how do I change it to 3.6?have

    I do internet website rating and when I try to rate a mobile page, I first go to tools, then to mobile plugins, then put mark by mobile plugins. But when I go to the mobile page, it doesn't disply the page like you would see on your phone. I have to scroll to the right or left to see the whole page. I have downloaded the mobile downloads several times. My co. said I need firefox 3.6 because 4 won't work. How can I tell which version I have and how do I download 3.6? Thank you, Sandy Whittington

    I do internet website rating and when I try to rate a mobile page, I first go to tools, then to mobile plugins, then put mark by mobile plugins. But when I go to the mobile page, it doesn't disply the page like you would see on your phone. I have to scroll to the right or left to see the whole page. I have downloaded the mobile downloads several times. My co. said I need firefox 3.6 because 4 won't work. How can I tell which version I have and how do I download 3.6? Thank you, Sandy Whittington

  • How to know the model of my Dv6 and how to install switchable graphics driver

    hi,
    I have a HP pavilion dv6 but I don't know what model is to download the drivers.
    Here are the specs:
    (this was purchase in Europe Portugal)
    - Intel core I5 M480 2.67Ghz
    - 500GB HDD 5600rpm
    - HD 6650
    - 4GB RAM
    - Finger print reader
    - 3x USB
    -Dvd Rom
    - x1 SD CARD reader
    - x1 esata
    - x1 HDMI
    - x1 Vga port
    - Camera HP trueVision
    - Dobly Advance Audio ALTEC lansing
    - Win7 Home Prem 64bit
    I need to install the AMD 6650 Driver with the switchable drivers options currently it only detects the Intel HD Graphics, installing the latest driver from AMD for the mobil 6650 will not work it doesn't dettect the graphics card.
    How can I know my laptop model ? and how to install the switchable and AMD drivers.. the laptop came with no CDs.
    Thank you,
    Arthur

    Get your full Model number or Product number from the Service Tag attached to bottom of laptop (may be under battery)
    How Do I Find My Model Number or Product Number
     Once you have the info, use the button at top of this page titled "Support", then click "Download drivers" from the menu. Enter your Product Number. After entering PN click 'Go". On the next page use the dropdown menu to select your Operating System, click Next. A list will populate with drivers/software.
    ******Clicking the Thumbs-Up button is a way to say -Thanks!.******
    **Click Accept as Solution on a Reply that solves your issue to help others**

  • How To know Which Columns are not null and Which are null

    Hi Freinds,
    I want to Know ,How by Wrting a Query we can get the Names of The Columns from the Table which is set to not-null or null,
    Thanks
    Shoaib

    SELECT * FROM user_tab_columns
    WHERE table_name='Your_Table_Name'Check NULLABLE column.

  • How to determine which languages available with portal, and how to install

    I have a customer who may have a need for languages that might not be default delivered with the portal.  They are able to install languages in an ABAP environment (unicode).  What I'm trying to understand is:
    1.) What languages are available after a NW70 portal installation?  How can I determine this?  The pull-down list of languages in the UME record for a user is extensive, but they aren't all actually active because I tried some like Korean and the logon to portal was still English.  But then I tried Thai and that seemed to work, as did French, Spanish, etc.
    2.) How can I install needed langauges for the portal?
    I realize that even with the language support, the actual portal content needs to support those.  But that's an entirely different issue.

    Hi,
    In this thread you have informations you need:
    How to add Hindi language in Portal
    Regards,
    Praveen Gudapati

  • How to know which master data objects need to activated  in R3

    SALES OVERVIEW CUBE -0SD_C03
    How to know which master data objects need to activated from delivery version to active version in R/3 for a particular standard cube like 0SD_C03.
    its very urgent please advise.
    R/3 in RSA5
    Sales Master Data
    0ACCNT_ASGN_TEXT               Account assignment group for this customer   
    0ACCNT_GRP_TEXT                Customer account group                       
    0BILBLK_DL_TEXT                Locked                                       
    0BILBLK_ITM_TEXT               Billing block for item                       
    0BILL_BLOCK_TEXT               Billing block in SD document                 
    0BILL_CAT_TEXT                 Billing Category                             
    0BILL_RELEV_TEXT               Relevant for Billing                         
    0BILL_RULE_TEXT                Billing rule                                 
    0BILL_TYPE_TEXT                Billing Type                                 
    0CONSUMER_ATTR                 Consumer                                     
    0CONSUMER_LKLS_HIER            Consumer                                     
    0CONSUMER_TEXT                 Consumer                                     
    0CUST_CLASS_TEXT               Customer Classification                      
    0CUST_GROUP_TEXT               Customer Group                               
    0CUST_GRP1_TEXT                Customer Group 1                             
    0CUST_GRP2_TEXT                Customer Group 2                             
    0CUST_GRP3_TEXT                Customer Group 3                             
    0CUST_GRP4_TEXT                Customer Group 4                             
    0CUST_GRP5_TEXT                Customer Group 5                             
    0DEALTYPE_TEXT                 Sales Deal Type                              
    0DEL_BLOCK_TEXT                Delivery block (document header)             
    0DEL_TYPE_TEXT                 Delivery Type                                
    0DISTR_CHAN_TEXT               Distribution Channel                         
    0DIVISION_TEXT                 Division                                     
    0DLV_BLOCK_TEXT                Schedule line blocked for delivery           
    0DOC_CATEG_TEXT                SD Document Category                         
    0DOC_TYPE_TEXT                 Sales Document Type                          
    0INCOTERMS_TEXT                Incoterms (Part 1)                           
    0INDUSTRY_TEXT                 Industry keys                                
    0IND_CODE_3_TEXT               Industry code 3                              
    0IND_CODE_4_TEXT               Industry code 4                              
    0IND_CODE_5_TEXT               Industry code 5                              
    0IND_CODE_TEXT                 Industry code                                
    0ITEM_CATEG_TEXT               Sales document item category                 
    0ITM_TYPE_TEXT                 FS item type                                 
    0KHERK_TEXT                    Condition Origin                             
    0MATL_GRP_1_TEXT               Material Group1                                         
    0MATL_GRP_2_TEXT               Material Group 2                                         
    0MATL_GRP_3_TEXT               Material Group 3                                         
    0MATL_GRP_4_TEXT               Material Group 4                                         
    0MATL_GRP_5_TEXT               Material Group 5                                         
    0MATL_TYPE_TEXT                Material Type                                            
    0MAT_STGRP_TEXT                Material statistics group                                
    0NIELSEN_ID_TEXT               Nielsen ID                                               
    0ORD_REASON_TEXT               Order reason (reason for the business transaction)       
    0PICK_INDC_TEXT                Indicator for picking control                            
    0PRODCAT_TEXT                  Product Catalog Number                                   
    0PROD_HIER_TEXT                Product Hierarchy                                        
    0PROMOTION_ATTR                Promotion                                                
    0PROMOTION_TEXT                Promotion                                                
    0PROMOTYPE_TEXT                Promotion Type                                           
    0PROV_GROUP_TEXT               Commission Group                                         
    0REASON_REJ_TEXT               Reason for rejection of quotations and sales orders      
    0REBATE_GRP_TEXT               Volume rebate group                                      
    0RECIPCNTRY_TEXT               Destination country                                      
    0ROUTE_TEXT                          Route                                                    
    0SALESDEAL_ATTR                Sales deal                                               
    0SALESDEAL_TEXT                Sales deal                                               
    0SALESORG_ATTR                 Sales organization                                       
    0SALESORG_TEXT                 Sales Organization                                       
    0SALES_DIST_TEXT               Sales district                                           
    0SALES_GRP_TEXT                Sales Group                                              
    0SALES_OFF_TEXT                Sales Office                                             
    0SCHD_CATEG_TEXT               Schedule line category                                   
    0SHIP_POINT_TEXT               Shipping point/receiving point  
    In BW
    Base Unit of Measure     0BASE_UOM
    Bill-to party                    0BILLTOPRTY
    Calendar Day                  0CALDAY
    Calendar Year/Month      0CALMONTH
    Calendar Year/Week      0CALWEEK
    Change Run ID              0CHNGID
    Company code              0COMP_CODE  
    Cost in statistics currency          0COST_VAL_S
    Credit/debit posting (C/D)            0DEB_CRED
    Distribution Channel       0DISTR_CHAN
    Division                                     0DIVISION 
    Number of documents    0DOCUMENTS
    Sales Document Category          0DOC_CATEG
    Document category /Quotation/Order/Delivery/Invoice 0DOC_CLASS
    Number of Document Items         0DOC_ITEMS
    Fiscal year / period
    Fiscal year variant                      0FISCVARNT
    Gross weight in kilograms           0GR_WT_KG
    Number of Employees    0HDCNT_LAST
    Material                                     0MATERIAL
    Net value in statistics currency    0NET_VAL_S
    Net weight in kilograms 0NT_WT_KG
    Open orders quantity in base unit of measure 0OPORDQTYBM
    Net value of open orders in statistics currency 0OPORDVALSC
    Payer                            0PAYER
    Plant                             0PLANT
    Quantity in base units of measure 0QUANT_B
    Record type                   0RECORDTP
    Request ID                    0REQUID
    Sales Employee            0SALESEMPLY
    Sales Organization         0SALESORG
    Sales group                   0SALES_GRP
    Sales Office                   0SALES_OFF
    Shipping point                0SHIP_POINT
    Ship-To Party                0SHIP_TO
    Sold-to party                  0SOLD_TO
    Statistics Currency                    0STAT_CURR
    In R3 RSA5 we have all the Master data data sources as mentioned above, and BW also. How to find the related Master data Infosource in R/3 Master data Data sources.
    Thanks in advance,
       Bhima.
    Message was edited by: Bhima Chandra Sekhar Guntla

    Hi,
    <i>How to know which master data objects need to activated from delivery version to active version in R/3 for a particular standard cube like 0SD_C03.</i>
    I think, you are looking for master data sources(text,attributes,hier).Am i right?
    If so, This cube has almost all SD master data characterstics. So you can activate all the all master data datasources of SD in r/3 (SD-IO).
    Any way you requirement does not stop only by using this cube . You will activate all other cubes in SD also. So if you want to activate only needed master data datasources when you are activating a cube, the job becomes senseless. There is no problem(wrong) in activating all master data available under that application , even though you want to activate only one cube.
    With rgds,
    Anil Kumar Sharma .P

  • How do it know which backup files to keep and which to delete?

    How do you know which backup files to keep and which to delete?

    If you still have all devices, just delete all. They will re backup.

  • How to know which interfaces are going to which switch?

    How to know which interfaces are going to which switch ?
    I know that cdp will show this information. But CDP will not show info about the devices connected to my device and whose link between is administratively down.
    Regards,
    Chandu

    I don't want to the end devices location.
    For example, i have a switch that connect to multiple switches few using etherchannels and few using stand-along ports.
    So assume that one of the link whether it may be entire port-channel or a stand alone link that connects to another switch has been shut down manually by some x person...
    Then how can i know that which interfaces are connecting to that switch. In this case i think CDP will not  help because it will hold the information of ports that are up.
    Regards,
    Chandu

  • How to know which table in the database a form is accessing

    Actually Im new to oracle applications,
    Im getting an error when i open a form from system administrator responsibility saying that table doesnot exist.
    My basic doubt is, how to know which table in the database a form is accessing.
    Any response is higly appreciated.
    Thanks,
    Praveen
    Edited by: user10239520 on Sep 10, 2008 7:07 AM

    Take a look at the following thread:
    Is there a query log in EBS?
    Re: Is there a query log in EBS?

  • How I know which manageability tools(Oracle Change Management Pack,Oracle C

    Dear all,
    How I know which manageability tools(Oracle Change Management Pack,Oracle Configuration Management Pack,Oracle Diagnostic Pack,Oracle Tuning Pack, etc.) are installed on my oracle databases? Is there v$view to look at? Thank you in advance for your help.

    The usual method is described in http://download.oracle.com/docs/cd/B19306_01/license.102/b14199/options.htm#CIHGFIAF

  • How to know which object is in which transport requeset

    hi frnds
    how to know which object is in which transport request

    hi Preethi
    try with transaction se01 then clic on the tools icon under the menu you will get a list of function.
    then select search for object in transport request (maybe the text is a bit different) then enter information like for example R3TR  OSOA and the name of a datasource. if you don't know the meaning of R3TR use the match code and use it also for objects you want to find infosource infoobject etc... don't forget to mark the flag select if your transport request is released or not and then execute you will get the list of all transport requests containing your search object.
    hope this could help you
    best regards
    Boujema

  • My Mac Mail says that I have a plug in missing.  How do I know which plug in is missing and where do I get it?

    My Mac Mail says that I have a plug in missing.  How do I know which plug in is missing and where do I get it?

    Does this happen ONLY with Mail? Could you close all other applications and open Mail and check again? If this is still happening, please post a screenshot here.

  • HT201744 How do you actually know where a Spotlight file is?  I mean all well and good Spotlight identifies it but I want to know which file has been identified and where it is......

    How do you actually know where a Spotlight file is?  I mean all well and good Spotlight identifies it but I want to know which file has been identified and where it is......

    To know where the Spotlight file is, highlight it in Spotlight and hold the Command key, so you will see its location at the bottom of the window

  • How to know which type of jdbc driver used in my application

    How to know which type of jdbc driver used in my application.

    My approach will be....
    Type1: you have to have ODBC s/w install on your machine...even the connection string starts with jdbc:odbc....so it can be identifed easily
    Type2: you have to install client s/w in your machine...if you are using oracle oci driver ...you need to install oracle client s/w
    Type3: you use servername / port to connnect to middleware
    Type4: you do not need any client s/w
    So, If your application works without any client s/w on your machine....you might be using Type4/Type3 driver.....otherwise Type2
    Someone pls add more ....

  • How to know which type of apple device am using

    how to know which type of apple device am using

    Check iPad model with the Serial Number
    https://selfsolve.apple.com/agreementWarrantyDynamic.do
    Settings>General>About>Serial Number

Maybe you are looking for

  • Mother board failure in Compaq Presario C770TU Notebook PC

    Dear, My  Compaq Presario C770TU Notebook PC has an problem during windows installation. it hangs out during the installation process. when the step of 39 minutes is going on. earlier i have changed my battry from hp care centre. i have shown to IT p

  • Tree Layout  and a Where Clause

    I have built a uix application using Jdev (10.1.2) + Jheadstart (10.1.2). I followed Jheadstart for ADF developer’s guide (10.1.2) for creating a page with a recursive tree, tree layout style and it works well. Now I need to apply a where clause, pro

  • Cost Element Description in PCA Report Group P&L

    Hello, You can use SARP for display mode Tree PCA1 In the first coloumn (number and description)  instead of cost element description, cost element number appears again like this: 600000   006000000  (wrong) 600000   Sales Income  (correct) Choose re

  • SAP Business Explorer Analyzer Performance testing

    Hi, All I don't have any experience in SAP at all. So maybe I will ask silly questions. I was asked to provide performance testing for SAP Business Explorer Analyzer. As you know it is Excel base application with ActiveX control from SAP. HP Loadrunn

  • Why do I get a "Transcode Failed" message?

    Dear friends on the forum; I have created a complex project in Encore with several levels.  It starts off with an opening menu whose choices are two video files and a link to a sub-menu.  This sub-menu then offers links to several sub-sub menus which