The Jtree is not refreshing with new values when mouse click on the node

hi ,
I am creating a tree from a vector .The values in the vector is coming from the JTable data after satisfing the some condition. But the data in the Jtable is changing time to time so the data in the vector is also changing .
But the problem is that when first I create a tree with that data the tree is created but for the next time I click on the tree node the tree is not changing i.e. it is not created with the new values that is stored in the vector at that time .what to do .Please help
I am using DefaultMutableTreeNode for creating the tree .In starting I have created one root and the one it's child .Now the next subtree of the root child have to be created by this vector data. this subtree should be updated according to the values in the vecter.
public void valueChanged(TreeSelectionEvent e) {
//code here
subtreecreat();
//some function that create tree after cheching the some condition here
subtreecreat() {
Enumeration en=vector.elements();
while(en.hasMoreElements())
DefaultMutableTreeNode servername = new DefaultMutableTreeNode(en.nextElement());
node.add(servername);
Please help it is very urgent
Thanks in Advance,
anum

Well, you can either use a custom TreeModel that tracks your Vector, or you can use a DefaultTreeModel and call model.reload(node) to refresh the tree below the specified node.

Similar Messages

  • UIInput will not refresh with new value

    I have the following JSF component
    <h:inputText id="entryfee" binding="#{entryform.evententryfee}" value=""/>
    in a onchangeevent in another component I have the following
    double entryfee = 100.0;
    FacesContext mycontext = FacesContext.getCurrentInstance();
    evententryfee.setValue(String.valueOf(entryfee));
    evententryfee.updateModel(mycontext);
    evententryfee is updated but the new value is not displayed by the component
    How do I refresh the display to show the new value ?

    Why do you use the component binding instead of a normal value binding?
    You can write
    <h:inputText id="entryfee" value="#(entryform.entryfee}"/>
    Anyway, a component binding does not overwrite the attribute whichi is explictly specifed by the tag.
    So, if you insist to use the component binding, you can write
    <h:inputText id="entryfee" binding="#{entryform.evententryfee}"/>

  • I'm running firefox 3.6.18 and after the latest windows xp update, I do not get a new tab when I click on the "+" button to get a new tab. A new tab is inserted when I open clik on a link form something in the current window.

    windows xp pro version 2002 SP 3.
    firefox 3.6.18

    This issue can be caused by the Ask<i></i>.com toolbar (Tools > Add-ons > Extensions)
    Your system details show that toolbar in the user agent as AskTbAD2/3.12.2.16749
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • My firefox won't create a new tab when I click on the tab. It will create a new window. It worked fine till this morning. I've rebooted several time to see if that would make a difference. It doesn't.

    I can only create tabs by clicking on a link in an email or a program or a link in the window I am viewing. It will NOT create a new tab when I click on the tab to create a new tab, nor will it create a new tab when I right click on the tab & click on create a new tab. I'm used to using tabbed browsing all the time & it's driving me nuts. HELP!
    I have not downloaded any new updates on any software or downloaded any new software in the hours before this started happening.
    Just to clarify about my original question. I meant to say that firefox will create a new window when I right click & click on create a new window but will not create a new tab when I click on create a new tab. I think what I wrote may have been somewhat confusing.

    Do you have that problem when running in the Firefox SafeMode? <br />
    [http://support.mozilla.com/en-US/kb/Safe+Mode] <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    If not, see this: <br />
    [http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes]

  • I downloaded latest software on iphone 4 and installed new software on my imac (snow leopard 8.6 and now phone not synching with new itunes. Itunes does recognize the phone but the itunes is totally different now. It doesn't look anything like the previou

    I downloaded latest software on iphone 4 and installed new software on my imac (snow leopard 8.6)and now phone not synching with new itunes. Itunes does recognize the phone but the itunes is totally different now. It doesn't look anything like the previous vesions. I can't even find a tab for synching. very strange. any help is appriciated.

    iTunes 10.7 is compatible with Snow Leopard.
    You can download it here: http://www.apple.com/itunes/

  • With FireFox as my default browser, I create a shortcut on the desktop as per instructions in 'help' but when I click on the shortcut it opens in a browser which is not even running.

    With FireFox as my default browser, I create a shortcut on the desktop as per instructions in 'help' but when I click on the shortcut it opens in a browser which is not even running.

    -
    Make absolutely certain that FireFox is designated as your default browser.
    Do this: Tools / Options / Advanced / Check Now / correct the setting
    OR right click on any shortcut icon / Open With / Choose Default Program / select desired Browser / check Always... box / OK
    ----SOLVED-----------
    -

  • The HDMI adapter that came with New mac mini, would fit on the connection coming from my old mini. My monitor has receptor same as the end of the adapter.

    The HDMI adapter that came with New mac mini, would fit on the connection coming from my old mini. My monitor has receptor same as the end of the adapter.

    I found out that I have 2 female ends, my question is where can I find the adapter with 2 male connectors? and what about power supply to monitor?

  • I am trying to configure my SCXI-1540 card for excitation voltage and frequency using MAX - but it is not giving me that option when I click on the card and then properties​, am I looking in the wrong place?

    I am trying to configure my SCXI-1540 w/1315 card for excitation voltage and frequency using MAX - but it is not giving me that option when I click on the card and then properties, am I looking in the wrong place?
    I have LabVIEW Express 7.0 Professional - SCXI-1000 Chassiss - along with SCXI-1112, and SCXI 1520/1314 - cable to the PCI-6052E is attached to the 1520 card.
    MAX says it recognizes all the cards in the chassiss.

    Jeremy, Thanks for the reply.
    I tried to set up the system as DAQmx.
    I had MAX auto-detect the set-up - and it recognized all the cards - but did not select the 1315 accessory on the 1540 card - I had to do that manually - but in the configuration section I would select the accessory and it would deselect itself. I had to get out of the set-up and then right click on the 1540 card and click on the "Accessories" tab and select the 1315 terminal block that way.
    It didn't seem right that the system should behave that way, but I pressed onward.
    I then tried to create a new DAQmx Task
    When I create new DAQmx task and then click on Analog Input no "Position" Tab appears for me to select, all I get are:
    Analog>>Voltage
    Analog>>Temperature
    Ana
    log>>Strain
    Analog>>Current
    Analog>>Resistance
    Analog>>Frequency
    Analog>>Custom Voltage with Excitation
    Do you think there might be something wrong with either my hardware or perhaps my configuration that is not allowing it to recognize the 1540/1315 in DAQmx?
    I had included the system report of what programs I am using, etc. as attached file nireport.txt
    After the DAQmx did not work I tried installing everything as Traditional DAQ and it did let me set-up the 1540 Card with Excitation Voltage and Frequency and gain - I then went in to the VI that I had built and tried to use the Express DAQ Assisant to read the channel that I am connected to on the 1315/1540 - when I try to use DAQ Assistant it gives me an error saying that "Device not available in NI-DAQmx. It is possible that the device is being use by traditional NI-DAQ"
    Which I guess it is since both configurations are now set-up in MAX.
    I would PREFER to use the DAQmx set-up, but I am confused as to WHY it won
    't come up with
    Analog input>>POSITION>>LVDT
    When I try to create a new DAQmx task.
    Thanks for the help so far! As you can probably tell I am new at this.
    Ryan
    Attachments:
    nireport.txt ‏2 KB

  • I purchased Adobe Design Standard in June 1993 and have not downloaded it until now. when I click on the software on my account there is no download button. How can I download the software I purchased so long ago? I hope it is not money down the drain. Is

    I purchased Adobe Design Standard in June 1993 and have not downloaded it until now. when I click on the software on my account there is no download button. How can I download the software I purchased so long ago? I hope it is not money down the drain. Is there any phone number available so I can talk to an Adobe employee?

    Which version of Design Standard are you asking about?  I don't think any Creative Suite packages existed in 1993.  I think the first CS came out in 2003.

  • HT1430 I downloaded the app from iTunes costing 99 cents and when I click on the icon on my ipad or iPhone it quickly opens and crashes..closes???? iPad, Phonebook cleanmaster crashes

    I downloaded the app from iTunes costing 99 cents and when I click on the icon on my ipad or iPhone it quickly opens and crashes..closes????
    iPad, Phonebook cleanmaster crashes

    This Apple doc should help ya out -> iOS: Troubleshooting applications purchased from the App Store

  • ADF Struts : Form not getting refreshed with new values

    I have a view object based ona entity object. It has an additional attribute(calculated attribute) selected from some other table. In my browse page, I click on edit button and change the calculated attribute in the edit page and comeback to the browse page. In the browse page, the changed calculated attribute is not getting reflected. however the database has the changed value. Now, if I query the same browse page in a different browser window, it shows the changed value. But, still the original browser window shows the unchanged value only(even after refreshing the browser). So, this is server caching. Why is the application module not refreshing the bindings? What should be done to achieve the bindings refresh?

    Did you look at:
    http://radio.weblogs.com/0118231/stories/2005/06/16/whyIsntRefreshingTheBrowserPageEnoughToRefreshTheDataDisplayed.html

  • I have apparently successfully downloaded photoshop elements 11 to my pc. i needed this older version because it is compatible with my printer when i click on the icon or on the program it will not load. what's up

    I successfully downloaded elements 11 to my pc but it won't load when I click on the program or double click on the icon. help.

    You say you downloaded, but have you completed the installation?
    On Windows there is often two files. They need to be unzipped (Extract Files) and everything placed in a single folder. From there you run setup.

  • I am trying to use sites on the internet which require Adobe Flash Player, but when I click on the free download, it says that Apple does not support this application, so I cannot use it.  This stops me viewing quite a few interesting things.  Any ideas?

    I am trying to use sites on the internet which require Adobe Flash Player, and when I click for a free download it says that "it is not available for your device because of restrictions that Apple has put in place".  Any suggestions on how to overcome this?

    Flash is not, and probably never will be, supported on the iPad : http://www.apple.com/hotnews/thoughts-on-flash/ . Plus it would be up to Adobe to make a version of their flash player that works on iOS devices, something which they have never managed to do and which they have now given up on trying to do.
    Browser apps such as Skyfire, iSwifter and Puffin 'work' on some sites, but judging by their reviews not all sites. Also some websites, especially news sites, have their own apps in the App Store, so your could try checking there for your sites (and there is the built-in YouTube app).

  • JTable will not refresh with new data from database

    Hi,
    I have a JTable that does not recoginzed when the data has changed. The table is dynmaically populated with data from the database using a table model.
    Please help!!
    public JTable getUpdateContractTable() {
    QueryTableModel model;
    String [] dlrs = getSelectedDealers();
    String [] stats = getSelectedStatuses();
    String sql = buildContractQuery(dlrs, stats);
    try {
    if(isContractSet) {
    model = new QueryTableModel();
    model.setQuery(sql);
    table.setModel(model);
    table.setColumnModel(new UpdtCtrctColumnModel());
    table.invalidate();
    table.repaint();
    //model.fireTableChanged(new TableModelEvent(model));
    else {
    model = new QueryTableModel();
    UpdtCtrctColumnModel column = new UpdtCtrctColumnModel();
    model.setQuery(sql);
    table = new JTable(model, column);
    table.createDefaultColumnsFromModel();
    table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    table.setPreferredScrollableViewportSize(new Dimension(500, 70));
    model.fireTableChanged(null);
    isContractSet = true;
    catch (Exception e) {
    System.out.println(e.getMessage());
    //JOptionPane.show
    //.showMessageDialog("Error: " + e.getMessage(),
    // "Click Ok",
    // JOptionPane.INFORMATION_MESSAGE);
    return table;
    }

    thank you for your help. i finally got it to refresh. i have a follow-up question if you don't mind answering it. i have 2 jtables where one depends on the other. when i do a refresh i want the other table to disappear, so i call the getContentPane().remove(component), but the table doesn't disappear. what should i do.
    anthony

  • Spry Data Set will not Refresh with New Data?

    I'm using the Dreamweaver CS4 "Spry Data Set" Wizard and created the following layout on one of my pages:
    In the wizard, under "Specify a Data Source", I chose "HTML", and selected my cfm page that has a simple Table with the datasource below:
    <cfparam name="URL.id_com" default="1">
    <cfquery name="rsTickets" datasource="Ctickets">
    SELECT ticketNum, ticketType, ticketDate, acctNum, firstName, lastName, businessName, city, status, owner, ticketDetails
    FROM tickets
    WHERE acctNum = <cfqueryparam value="#URL.id_com#" cfsqltype="cf_sql_numeric">
    </cfquery>
    When I display the page in IE8, The Spry Master/Detail page will not filter my records based on the URL parameter?
    (Note: All my other "Non-Spry" datasets filter fine by the URL)
    Question: How do I make the Spry data "Refresh" or "Re-run the query" so the data filters properly?
    Thanks,
    jlig

    Ben, Thanks for the reply..
    Here is my Source Data page which I created & selected in the Spry Data Wizard: http://cerberus.clearwave.com/jerry/Spry2.jpg
    (this page takes my query, filtered by the URL Acct field and makes a simple table to feed the Spry Wizard)
    - In the Spry Data Wizard, I selected the file and it properly found the table data: http://cerberus.clearwave.com/jerry/Spry3.jpg
    - Then I clicked Next and changed a few of the field types: http://cerberus.clearwave.com/jerry/Spry4.jpg
    - Next I chose Master-Detail and used the Acct field to be the Master : http://cerberus.clearwave.com/jerry/Spry5.jpg
    - Lastly, I open up the webpage, click on the Tickets Spry Tab: http://cerberus.clearwave.com/jerry/Spry6.jpg
    As you can see in the picture on this page: http://cerberus.clearwave.com/jerry/Spry6.jpg, the URL parameter is = 3902 which is the Acct number
    being passed from the previous page in my application. (Ex..http://192.168.1.77/COE/salespipeline_mi.cfm?id_com=3902)
    The first one is correct, but once I move to a different Acct number the Spry data will not update to reflect the correct Tickets?
    Once I move to say, Acct 4413, the Spry Tickets Tab does not change or update to reflect this Acct's tickets?
    (see link--> http://cerberus.clearwave.com/jerry/Spry7.jpg)
    Here is my code listing for the Tabbed Webpage: http://cerberus.clearwave.com/jerry/Spry8.txt (see images 6 & 7)
    It seems like I'm missing some kind of "Trigger" or "Requery" or "Refresh" that "Re-runs" the Source Data page (http://cerberus.clearwave.com/jerry/Spry2.jpg)..?
    Thanks again,
    jlig

Maybe you are looking for

  • SSO with SSL not working

    We've set up SSL to use with 10g AS Portal (9.0.4). Actually, all we want is to have the SSO sign in securely. So if I go to https://www.myserver.com:4446/pls/portal I get a portal page. However when I try to login it reverts back to non-SSL. Also, i

  • Having problem to run JMS tutorial

    Hi, I have successfully compiled and add MyQueue to the queue. But when I try to run the sample program from the JMS tutorial my system would produced the exact error that I have posted bellow: ========================================= F:\ttech\jeti\

  • Drag and Drop feature in start menu between right side and left side

    Hello , I think it is a good idea to allow the user to drag items and apps from the left side of start menu and drop them in the right side, and vice versa. Such feature make life easier than clicking right button and choose unpin or pin to start.

  • IPt + Apple Composite VA Cable = Music through TV speakers?

    I bought a new iPod touch over the weekend, and I plunked down the $49 for Apple's Composite AV cable, as well. I've been real happy with it so far, and the video quality is great -- at least, it looks great on my 10-year old Samsung LDTV (lo-def TV)

  • Table For Secondary Cost Elements

    Dear Folks,               Please Help me for getting details (TABLES)  of Secondary Cost elements Actual Line items Date wise and Cost Center wise Thanks in advance Regaards ASHOK K