How can I view the newly added node in a JTree

Hi! I have a problem with my project. I set up a JTree. At first it has a node that contains FARInfo object. When I click this node, the other program in the package will pop up a form to let user input and submit, then it will add a new node into the other node. The new node will contain FilledInfo object. But I cannot view this newly added node. The source code related with the 2 different object is as following:
tree.addTreeSelectionListener( new TreeSelectionListener()
public void valueChanged(TreeSelectionEvent e4)
DefaultMutableTreeNode node = ( DefaultMutableTreeNode )
(tree.getLastSelectedPathComponent ());
Object nodeInfo = node.getUserObject();
if (node.isLeaf())
if ( nodeInfo instanceof FARInfo )
FARInfo category = (FARInfo) nodeInfo;
displayURL ( category.categoryURL );
displayForm ( category.farFormName );
if ( DEBUG )
System.out.print ( category.categoryURL + ":\n" );
else if ( nodeInfo instanceof FilledInfo )
     FilledInfo category2 = ( FilledInfo ) nodeInfo;      
     displayFilledForm ( category2.num );
}else
return;
My question is: how to deal with the nodes containing 2 different objects: FARInfo and FilledInfo? FilledInfo is created by the other program in the package. Thanks for your help!

I used insertNodeInto() to inser a new node into the tree, and it can be displayed. But when I used addTreeSelectionListener() to click on the newly added node, it cann not reaspond the click. Following is my original addTreeSelectionListener(). You see, if you click a node of FARInfo, then it will open a form, and after user filled in and submit it, a new node will be added into the Jtree. If you click a node of FilledInfo, then the user should view the content of this new node. But now, it seems that the sencond click cannot work. Thanks for your help.
tree.addTreeSelectionListener( new TreeSelectionListener()
public void valueChanged(TreeSelectionEvent e4)
DefaultMutableTreeNode node = ( DefaultMutableTreeNode )
(tree.getLastSelectedPathComponent ());
Object nodeInfo = node.getUserObject();
if (node.isLeaf())
if ( nodeInfo instanceof FARInfo )
FARInfo category = (FARInfo) nodeInfo;
displayURL ( category.categoryURL );
displayForm ( category.farFormName );
if ( DEBUG )
System.out.print ( category.categoryURL + ":\n" );
else if ( nodeInfo instanceof FilledInfo )
FilledInfo category2 = ( FilledInfo ) nodeInfo;
displayFilledForm ( category2.num );
}else
return;

Similar Messages

  • How can I view the Firefox Reading List?

    I am running Firefox on Android 2.3.4. I am reading about the Firefox "Reader Mode" [1], which states:
    "By tapping the readinglist1 icon, you can add the current page to your reading list (a special folder in your bookmarks list)"
    "Note: The reading list folder will not be shown until the first item is added to the list. If all the items in the list are removed, the reading list will be hidden again."
    Once I add the current page to my reading list, the screen changes and I am presented with different navigation controls. From here, the documentation says that:
    "By tapping the readinglist2 icon, you can display the reading list. "
    I have several items in my Reading List. However, I can only see the 'readinglist2' icon when I am viewing a page which has been converted to the Reader Mode. If I browse my bookmarks I do not see a folder for the reading list.
    How can I view the items which I added to my "Reading List"?
    [1] https://support.mozilla.org/en-US/kb/how-enable-reader-mode-firefox-android?fpa=1

    You can open any chrome file in Firefox via the location bar, provided you know the path.<br />
    XML (XUL) files need a view-source: prefix.
    chrome://browser/skin/browser.css
    chrome://browser/content/browser.css
    resource:///defaults/pref/firefox.js
    resource:///greprefs.js

  • How can I view the USMT recovery key in SQL report

    Hello all,
    Can anyone help me to provide sql query for below link… What I am looking is Just to create a report with all computers that has computer association any type with the recovery key information.
    http://www.windows-noob.com/forums/index.php?/topic/1763-how-can-i-view-the-usmt-recovery-key/
    I have tried below but not working so looking for help…..
    SELECT     TOP (100) PERCENT dbo.v_StateMigration.SourceName, dbo.v_StateMigration.SiteCode, dbo.v_StateMigration.SMPServerName, 
                          dbo.v_StateMigration.SourceMACAddresses, dbo.v_StateMigration.RestoreMACAddresses, dbo.StateMigration.StateEncryptDecryptKey, 
                          dbo.StateMigration.StorePath, dbo.StateMigration.StoreSize
    FROM         dbo.StateMigration INNER JOIN
                          dbo.v_StateMigration ON dbo.StateMigration.SMPServerName = dbo.v_StateMigration.SMPServerName CROSS JOIN
                          dbo.v_UserStateMigration
    WHERE     (dbo.StateMigration.StorePath IS NOT NULL) AND (dbo.StateMigration.StoreSize IS NOT NULL)
    ORDER BY dbo.v_StateMigration.SourceName

    Try this.
    SELECT Distinct
    SM.SourceName,
    SM.SiteCode,
    SM.SMPServerName,
    SM.SourceMACAddresses,
    SM.RestoreMACAddresses,
    SMT.StateEncryptDecryptKey,
    SM.StorePath,
    SM.StoreSize
    FROM
    dbo.v_StateMigration SM
    JOIN dbo.v_UserStateMigration UM on SM.RestoreClientResourceID= UM.RestoreClientResourceID
    join dbo.StateMigration SMT on SM.SMPServerName = SMT.SMPServerName
    WHERE
    (SM.StorePath IS NOT NULL)
    AND (SM.StoreSize IS NOT NULL)
    ORDER BY
    SM.SourceName
    http://www.enhansoft.com/

  • How can I view the complete score with all tracks? I seem to only be able to view one track at a time. Thanks

    How can I view the complete score with all tracks? I seem to only be able to view one track at a time. Thanks

    JoBrooke wrote:
    I seem to only be able to view one track at a time.
    unfortunately, that is how GB works, it only offers a score for a single track at a time

  • How can I view the size of a particular event in iPhoto '11?

    How can I view the size of a particular event in iPhoto '11? The 'Get Info' option is not displaying the size of the event like it used to in iPhoto 8.

    But the event does not really have a size - you can export the photos and make the size pretty much what you want - while it is in iPhoto it is an event
    I guess that iPhoto could report the size of the original photos as imported - or the size of the modified photos if exported as JPEGs - or the size of the modified photos if exported with a maximum dimension of 1080 - but the event simply is photos and does not have a "size" until you export it
    Obviously you want to know the size but the question was
    what is your puprose for knowing the size?
    WIth that information maybe there is a way to get you what you want
    But the basic answer is simply that an event does not have a size - an event is a collection of photos and each photo has either two or three versions in the iPhoto library and each photo can be exported for outside use in several formats and at any size
    LN

  • How can I view the number of reproductions in a column beside of the song in the "Artists" tab?

    How can I view the reproduction number in a column beside of the song in the "Artists" tab?

    Hi DirtyDawg,
    COUNTIF is your friend here.
    If your source is in column C and your streams are 1, 2 and 3:
    =COUNTIF(C,"=stream1")
    =COUNTIF(C,"=stream2")
    =COUNTIF(C,"=stream3")
    These need to be in a footer or header row or in a different column than C.
    hope this helps,
    quinn

  • How can i view the data from Access DB in oracle

    pls tell me that how can i view the data of MS ACCESS DATABASE in ORACLE.i was use ODBC of ACCESS DATABASE AND THEN CREATE DATABASE LINK IN ORACLE BUT NOT YET SUCCEEDED.PLS TELL ME THE PROCEDURE.
    regard's

    hi,
    u nedd to use Oracle Hetrogeneous Services,,
    full details of the procedure u may fing on metalink
    Regards

  • How can I view the underlying URL to a hypertext link in text from galley or story mode?

    How can I view the underlying URL to a hypertext link in text from galley or story mode?

    click inside the hyperlink and open Window > Hyperlinks (in InCopy). The link is highlighted there. If you can't see it in the editable field, double-click the highlighted entry and it'll open in a dialog box.
    AM

  • How can I view the contents of a free trial for adobe fireworks cs6 on mac

    how can I view the contents of a free trial for adobe fireworks cs6 on mac.
    My friend told me to find the application in finder then hit control and click it and then it should give you the option to click
    "view package contents"
    This was not the case
    please help thank you

    When posting in Apple Communties/Forums/Message Boards.......It would help us to know which iMac model you have, which OS & version you're using, how much RAM, etc. You can have this info displayed on the bottom of every post by completing your system profile and filling in the information asked for.
    CLICKY CLICK---> https://discussions.apple.com/docs/DOC-3602
    CLICKY CLICK-----> Help us to help you on these forums

  • After downloading a pdf from a website, how can I view the file in Safari 6.0.4 (just as I can in Safari 5.0.6)?  I bet that it's simple, but I've missed something, somewhere, and a solution will be greatly appreciated.

    After downloading a pdf from a website, how can I view the file in Safari 6.0.4 (just as I can in Safari 5.0.6)?  I bet that it's simple, but I've missed something, somewhere, and a solution will be greatly appreciated.

    Hello Kirk,
    Thank's for your efforts, and I just wish that this was the solution.  Unfortunately, it isn't because, after double-clicking on the pdf in the website, it simply "opens" in another Safari window as a black screen - the pdf is there, somewhere, but not visible (either as an icon, or as a document). 
    When I right-click in the black Safari window, where the file is supposed to be, the only option available to display the file is to "Open file in Internet Explorer" (which is not what I want to do).  Other options include saving or printing the pdf, which I don't want until I've confirmed that it's the form that I want.  The same options are offered if I right-click on the file icon in the website.
    Any other suggestions, please?

  • How can I view the videos of adobe flash player that apple no longer support?

        How can I view the videos from the internet and networking of adobe flash player that apple no longer support?

    Flash Player version 10.1.102.64 is the last version available to PPC Mac users. However, this Flash version won't work for many videos on Facebook, YouTube and other sites. Adobe's latest version, 10.2.x or later, is only for Intel Macs. Adobe will not provide a newer Flash version for PPC Macs.
    The message requesting that you download Adobe Flash Player takes you to Flash Player requiring an Intel processor. Doesn't work on a PowerPC processor. I found a hack, installed it & it works with Firefox, TenFourFox & Safari.
    Download this http://www.steelbin.com/FPforFBPPC.zip to your desktop, unzip it, and replace the current Flash Player plug-in which is in your main/Library/Internet Plug-Ins folder, (not the user Library). Save the old one just in case this one doesn't work.
    Hack Allows PowerPC Macs to Access Flash 11 Content
    http://lowendmac.com/ed/royal/12sr/flash-11-and-powerpc.html
     Cheers, Tom

  • How can I view the number of tunes in the Library? The number shows for Playlists but not for the total Library.

    How can I view the number of tunes in the Library? The number shows for Playlists but not for the total Library.

    Hello,
    I apologize for submitting this question.  Soon after I posted it I saw a similar question that had my answer..
    Again, my bad for not looking first.
    Ron Morris

  • How can i view the variables of the session memory

    Hi experts
       How can i view the variables of the session memory.Such as I want display the variables of memory which id is 'BULRN' in ABAP debug.
    In program i can use import from memory id visit the momery of session,but i don't know the name of variables which store in momery of my session.

    Its not possible to view in the debug mode..
    SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens
    SAP global memory retains field value through out session.
    set parameter id 'MAT' field v_matnr.
    get parameter id 'MAT' field v_matnr.
    They are stored in table TPARA.
    ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data
    to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.
    ABAP memory is temporary and values are retained in same LUW.
    export itab to memory id 'TEST'.
    import itab from memory Id 'TEST'.
    Here itab should be declared of same type and length.

  • How can I view the text messages sent and received from my phone?how can I view the past text messages sent to my phone

    How can I view the text messages sent and received on one of the other phones on my plan?

    You would have to view them on the other phone.

  • How can we view the error message numbers in the web ui?

    Dear all,
    How can we view the error message numbers in the web ui? It gives the error but no number.  It is possible to debug in web UI so how can we accomplish this?
    Thanks,
    FK

    Hi  Fakhan,
    You can absolutely do that.
    Check the class: CL_BSP_MESSAGES
    Also if you want to find out the exact Message Class and Message Number, go to table T100, type text in field TEXT, you will get Message Class and Message number in fields ARBGB and MSGNR respectively.
    I hope this helps.
    THanks
    Vishal

Maybe you are looking for

  • How to inserted cells and keep formatting, copy formulas.

    Hi- I used to use Excel in the late 90's and am using Appleworks 6.2.9. Here are my problems that I cannot solve: I have an invoice with borders and SUM formulas. How do I insert new cells while maintaining both? With Excel I could click on a cell wi

  • ASAP:User exit

    Hi, Please explain me the following things 1)What is an user exit? 2)In my scenario the tax is not calculated in the invoice so now have to populate these 2 fields E_RBKPV-MWSKZ_BNK E_RBKPV-TXJCD_BNK in the user exit EXIT_SAPLMRMH_014.How to do?

  • I am running Bridge on my MacBooPro with Mavericks 10.9.4 OS X.  The program repeatedly crashes.  Frequently even when opening it crashes.

    I am unable to open Bridge as it crashes as soon as I try to open it.  This was part of my Photoshop CS6 Extended.  I have sent the error reports with my email address requesting help and received no responses back.

  • Installer error? - cannot find files

    I am running Arch 0.7 on one computer, and was going to install it on another.  However, the CDROM installation stopped with the messages error: /mnt/var/lib/pacman/current/kbd-12.1-1/desc: Nosuch file o error: /mnt/var/lib/pacman/current/kbd-12.1-1/

  • HELP: Can I see whether a connection/stmt is open??

    Hi there, anyone knows if it is possible to see if a connection and preparedstatement is open?? I'd like to be able to see this in my app, as I do close resources after execute, and must open them again if user calls method again.... Best regards, AC