Help!What should I handle the selectionListenner of my Tree.

In our project,The gui is divided into two parts by a splitpane.In left part,there is a tree which lists many functions by leaf nodes,the right part will show the data needed.I want to add a new module to the right part when one tree node is clicked.When another node is clicked then another component will be added.
What should I do with the selectionListener to guarantee adding the correct module into right part associated to the corresponding function node?

Hi,
You need to create your own component X (say extending JPanel) and
add the following to the listener method.
JRootPane itsParent = y.getRootPane();
//y is the current instance of X
itsParent.getContentPane().remove(y);
x = new X(); //(A new instance of X)
getContentPane().add(x);
validate();
Of course you have to put logic to verify that y exists, before removing it.
Hope this helps.
Surath Rath.
Houston,TX
04/28/2003

Similar Messages

  • While updating my ipad to new software through itunes it got stuck and does not work anymore - it just displays the screen with symbols of itunes and the cable to connect to it - help - what should i do?

    while updating my ipad to new software through itunes it got stuck and does not work anymore - it just displays the screen with symbols of itunes and the cable to connect to it - help - what should i do?

    Disconnect the iPad, do a Reset [Hold the Home and Sleep/Wake buttons down together for 10 seconds or so (until the Apple logo appears) and then release. The screen will go blank and then power ON again in the normal way.] It is 'appsolutely' safe!, reconnect and follow the prompts.
    If that does not work then see here http://support.apple.com/kb/HT1808

  • I need to get into contact with Adobe support on renewal of my CC subscription which does not work but I cannot find any PHONE number just the referral to this forum - help, what should I do?? Thanks!!

    I need to get into contact with Adobe support on renewal of my CC subscription which does not work but I cannot find any PHONE number just the referral to this forum - help, what should I do?? Thanks!!

    Use the web chat:
    Contact Customer Care
    Mylenium

  • I bought iphone5 from ol and i didn't know the phone is stolen/lost and i paid 400$.. plz help what should i do?

    i bought iphone5 from ol and i didn't know the phone is stolen/lost and i paid 400$.. plz help what should i do?

    Hand it over to the police if you cannot get a refund.
    You will never be able to use it, it's Activation Lock you're facing and cannot be bypassed without the original Apple ID & password.

  • Ok my phone was wet in a pool did the rice thing and then dryed it and it comes on when plugged to the wall. it says to connect to itunes and when I try to plug it to my computer on itunes it shuts off? help what should I do:(

    ok my phone was wet in a pool did the rice thing and then dryed it and it comes on when plugged to the wall. it says to connect to itunes and when I try to plug it to my computer on itunes it shuts off? help what should I do:(

    Connect to iTunes alert (picture of iTunes logo and USB connector) - iOS: Unable to update or restore - http://support.apple.com/kb/HT1808 - recovery mode
    If it still won't do anything, make an appointment with Apple and be prepared to get a refurbished phone at out of warranty prices.
    iPhone 4, iPhone 3GS,
    iPhone 3G, Original iPhone     $149

  • I want to know what should do if the SPID : 12 Checkpoint is taking time.

    Hi Team,
    I want to know what should do if the SPID : 12 Checkpoint is taking time.
    I can't kill it also.
    Thanks

    It was taking quite long therefore I have pasted here the comments and there was a activity for database restore was pending on that database due to which I have to restart the instance service.
    If next time it will occur what should I do?
    Nothing you cannot do anything reason being it is system process. I guess i said same thing in my comment before. Its just there because system is running checkpoint. I upfront cannot suggest what you should do but I have seen this on many prod databases and
    it is normal. Dont restart SQL Server services if database is in middle of restore
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • I bought an apps "Latitude". when i tried to see my friends list its showing error - "nsurlerrordomain error 999". Please help what should i do??

    I bought an apps "Latitude". when i tried to see my friends list its showing error - "nsurlerrordomain error 999". Please help what should i do??

    Google 'nsurlerrordomain error 999' and see the hits there!

  • HT1338 I receive this message ,repeatedly,when I try to update an App through App store:Error code 1009.Please help,what should I do?

    I receive this message ,repeatedly,when I try to update an App through App store:Error code 1009.Please help,what should I do?

    The App Store is not available in Iran.

  • HT4993 My iPhone has barely any service while my dads same phone has full bars an I've reset network settings called ##873283# and nothing helps what should I do

    My iPhone has barely any service while my dads same phone has full bars an I've reset network settings called ##873283# and nothing helps what should I do

    take a look at this link   reset network settings http://www.apple.com/support/iphone/assistant/wifi/#section_5
    My bad, it doesn't really give you the details that you were looking for.
    For wifi - you would have to reenter the password.  I'm not sure about celluar data.

  • What should i do the derby database can't be connected?

    i downloaded the j2eetutorial of Sun ,and i practice the bank examples of J2EE platform, the other steps finished successfully according the pdf tutorial ,and formed the BankApp.ear ,but when i run the web client and the application client ,when accessed the database ,it can't show the data in the database.i try many times, but it still doesn't work ,what should i do ?please help me deal the problem,thank you very much.

    the exception stack traces:
    [#|2007-06-22T10:50:45.500+0800|WARNING|sun-appserver-pe8.2|javax.enterprise.system.container.ejb.entity.finder|_ThreadID=16;|JDO74004: Bean 'CustomerBean' method ejbFindByPrimaryKey:
    com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a JDBC SQLException while executing the SQL statement:
    SQL statement<select t0."CUSTOMERID", t0."PHONE", t0."STREET", t0."STATE", t0."EMAIL", t0."ZIP", t0."MIDDLEINITIAL", t0."FIRSTNAME", t0."CITY", t0."LASTNAME" from "CUSTOMERBEAN" t0 where t0."CUSTOMERID" = CAST (? AS VARCHAR(32672))> with input values:java.lang.String:200.
    Please examine the SQLException for more information.
    NestedException: org.apache.derby.client.am.SqlException: Table 'CUSTOMERBEAN' does not exist.
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.throwJDOSqlException(SQLStoreManager.java:614)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:448)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:345)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.retrieve(SQLStateManager.java:2024)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.reload(SQLStateManager.java:1162)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.reload(SQLStateManager.java:1118)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:633)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper.getObjectById(PersistenceManagerWrapper.java:245)
         at com.sun.ebank.ejb.customer.CustomerBean1668466742_ConcreteImpl.ejbFindByPrimaryKey(CustomerBean1668466742_ConcreteImpl.java:538)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:983)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:147)
         at com.sun.ejb.containers.EntityContainer.invokeFindByPrimaryKey(EntityContainer.java:738)
         at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:181)
         at $Proxy27.findByPrimaryKey(Unknown Source)
         at com.sun.ebank.ejb.customer.CustomerControllerBean.getDetails(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:153)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:957)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:158)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:151)
         at $Proxy18.getDetails(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:123)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:648)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:192)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1709)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1569)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:951)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:181)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:721)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:469)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1258)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:409)
    NestedStackTrace:
    org.apache.derby.client.am.SqlException: Table 'CUSTOMERBEAN' does not exist.
         at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
         at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source)
         at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source)
         at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source)
         at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source)
         at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source)
         at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source)
         at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source)
         at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source)
         at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source)
         at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source)
         at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source)
         at com.sun.gjc.spi.ConnectionHolder.prepareStatement(ConnectionHolder.java:362)
         at com.sun.jdo.spi.persistence.support.sqlstore.sql.generator.DBStatement.<init>(DBStatement.java:64)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:419)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:345)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.retrieve(SQLStateManager.java:2024)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.reload(SQLStateManager.java:1162)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.reload(SQLStateManager.java:1118)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:633)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper.getObjectById(PersistenceManagerWrapper.java:245)
         at com.sun.ebank.ejb.customer.CustomerBean1668466742_ConcreteImpl.ejbFindByPrimaryKey(CustomerBean1668466742_ConcreteImpl.java:538)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:983)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:147)
         at com.sun.ejb.containers.EntityContainer.invokeFindByPrimaryKey(EntityContainer.java:738)
         at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:181)
         at $Proxy27.findByPrimaryKey(Unknown Source)
         at com.sun.ebank.ejb.customer.CustomerControllerBean.getDetails(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:153)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:957)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:158)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:151)
         at $Proxy18.getDetails(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:123)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:648)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:192)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1709)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1569)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:951)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:181)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:721)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:469)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1258)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:409)
    |#]

  • Am owe and i want to Payment of debt what should i do the gift card

    I bought some app from my iphone via credit card and after a period has been suspended my account and I can not download more because i owe 9$ i tried to change the credit card he told me : please contact itunes support to complete this transaction and i tried to buy a itunes
      giftcard he told me not suitable for your country what should i do to solve this problem and download more app again ???

    Please explain wha typu mean by "locked". Is it locked to another carrier? Did you forget a passcode? Is it asking for an Apple ID that is not yours? The answer to your question depends on what type of lock you are seeing.

  • HT204088 I'm changing my payment method, but it keep asking me to contact I tunes support. Please help, what should I do?

    Hi all,
    I'm having trouble update and purchase any app on my I pad. Whenever I want to update it, it keep asking me to change my payment methods, after I change my credit card info, it said that I have to contact iTunes support.
    What should I do then? Please help

    Do what it says, contact iTunes support.
    http://www.apple.com/support/itunes/contact/

  • My little brother messed up with my iPod touch 4th Gen by entering the wrong password , now all data is beeing erased what should I do.The iPod is just showing the Apple Logo and some buffering icon below it.Need help fast!I'm really worried!

    I really need help this has happend 5 hours ago and the ipod os still showing the apple logo and the buffering icon below it!
    It re booted several times till now.
    Need help fast!

    - I suspect that he went to Settings>General>Reset>Erase all content and settings.  For 1G or 2G iPod that can take hours and it will likely stall out if not connected to a charging source.
    Try the following:
    - A reset.
    Reset iPod touch:  Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - The connect to computer and try to restore via iTunes.
    - Id something is still showing onthe screen, disconnect from computer/charging source and let the battery fully drain. After charging for an hour, Try the reset and restore.
    - If you can turn the iPod off, se if placing the iPod in recovery mode and then restore. For recovey mode:
    iPhone and iPod touch: Unable to update or restore

  • I have a white/grey screen and none of the suggested operations have helped, what should I do?

    I have a white/grey screen and none of the suggested options have worked - I have tried all the suggestions on Apple support

    Ok, I've had this problem before and contacted Applecare support and they told me that it was an issue with the RAM inside the Mac or something like that. They told me to refresh the ram, and it fixed the problem so that's what I'd recommend.  Here's how to do it.
    Hit Power button, then press and hold Command + R + Option + P at the same time.
    This resets the residual ram that is causing the start up to hang.
    Try that, I hope it works for you.
    broken_mirror

  • The Firefox *.htm/*.html icon is missing in Windows 7 x64 and no fixes I've seen have helped, what should I do?

    Hi, I am having similar problem to other people that I have found on this forum in that on my computer, when Firefox is first installed from fresh, Windows 7 displays the correct icon for htm/html files, but when I restart, these icons are replaced with the generic "I don't know" icons. So far I have tried to fixes this issue with the following methods to fox this issue, none of which have worked:
    - rebuilding the icon cache by deleting iconcache.db
    - setting defaults programs from Firefox to IE then back to Firefox
    - adding the registry keys Old Icon -> FirefoxHTML -> DefaultIcon from HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{42042206-2D85-11D3-8CFF-005004838597} to HKEY_CLASSES_ROOT\CLSID\{42042206-2D85-11D3-8CFF-005004838597}
    - changing the Windows Zoom settings from 100% to 150% and back
    - Using the programs Types, to delete and recreate the htm associations.
    Also, I know that I have been able to fix this issue before when I have had to reinstall Windows before, but I cannot remember how exactly, aprt from that I did involve editing the registry, but possible not in the way I found on the forum.

    Steve1951 at
    '''http://windowssecrets.com/forums/showthread.php/135115-Icons-for-Firefox-missing-in-Windows-Explorer.''' Found the solution which worked for me. See his quote below:
    Here is what I did to fix the problem:
    1. I deleted registry key HKEY_CLASSES_ROOT\FirefoxHTML\ShellEx\IconHandler (I completely deleted the key, not just set it to no value).
    2. I set registry key to HKEY_CURRENT_USER\Software\Classes\FirefoxHTML\Def aultIcon to C:\Program Files (x86)\Mozilla Firefox\firefox.exe,1
    3. I changed the file association from Firefox to Internet Explorer and then from Internet Explorer back to Firefox [ I logged off and on again so that the registry changes would take effect].
    Now all is functioning properly.
    Thanks Steve1951 this totally fixed my problem
    Randy

Maybe you are looking for