JTree: Problems updating the nodes size

Hi,
I'm trying to update the content of a JTree and I wonder how it
really works, since the paint() method doesn't seem to call the
renderer.
My situation: Imagine a JPanel splited in two by a JSplitPane. In
the left is the tree. Each node in the tree shows two panels, one
aligned to the left, and another to the right. I need that the panel
containing the two use all the available space in the left part of the
Split panel.
My solution: I pass the left JPanel to the tree renderer, so that
it can get the width from it (inside the
getTreeCellRendererComponent()) to build the return JPanel with the
correct size. My logic is that since each time you move the JSplitPane
the JTree paint() method is invoked the renderer can return the
correct JPanel with the correct size that will be painted then in the
screen.
My problem: Doens't work. When I render the tree, the renderer is
invoked, but it doesn't change its size (I can change the color based on the width, but not the node size). Only when I collapse & expand a node, it correctly takes into account the .setPreferredSize() and returns the JPanel with the correct size.
The only way I found to update the tree involves to catch the
JSplitPane event and call updateUI() in the tree, something that, I
think, it's certainly not the correct way to do it.
Any explanation of why this doesn't work would be really great. Any
pointer to a web resource explaining in deep how Swing components work (specially the JTree) would be a godsend.
Thanks,
- Juancho

My situation: Imagine a JPanel splited in two by a JSplitPane. Got it.
In the left is the tree. In the left side of the JSplitPane is a JTree.
Each node in the tree shows two panels,Maybe... on the right side of the JSplitPane are two Panels in which the data depends on which node is selected in the JTree???
Maybe... you have a custom TreeCellRenderer which displays a pair of panels in place of the standard JLabel???
one aligned to the left, and another to the right. To the left of what??? To the right of what???
I need that the panel containing the two use all the available
space in the left part of the Split panel.Panel containing the two what??? I thought the left part of the SplitPanel contained a JTree???

Similar Messages

  • There is a problem with the font size of the itouch 4.

    I was given a new ipod touch gen4th (ios 4.3.5) by the Apple authorized repair centre in Hong Kong three days ago. However. i found that there is a problem with the font size of it. It is different from my original one. Either the playlist or the words in the webpages , the font size is not uniform. Most of the words are boldfaced. Sometimes, there are some words are smaller in size. I don't know whether I can or cannot figure out the problem and tackle it, so, should I take it back to the repair centre? Or does anybody help me to fix it or give me some suggestions? Millions of thank.

    What language is set in Setting>General>International?
    Have you tried the standard fixes:
    - Reset:
    Reset iPod touch:  Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.
    - Restore from backup
    - Restore to factoery defaults/new iPod

  • Problems updating the BAM database

    Hi Guys,
    I have an activity that runs for a long time and after executing for about 15-16 mins it causes the following exception.
    Did somebody else also faced this problem ever? I have tried configuring all possible timeout parameters but all in vain.
    Any help would be highly appreciated.
    Thanks,
    MK
    EXCEPTION DETAILS
    Problems updating the BAM database. Reason:Unable to connect to the database.
    Caused by: A lock could not be obtained within the time requested
    fuego.analyzer.UpdaterRuntimeException: Unable to connect to the database.
         at fuego.analyzer.UpdaterRuntimeException.cannotConnecToDatabase(UpdaterRuntimeException.java:80)
         at fuego.analyzer.UpdaterRunner.synchronizeMetadata(UpdaterRunner.java:494)
         at fuego.analyzer.UpdaterRunner.run(UpdaterRunner.java:273)
         at fuego.analyzer.UpdaterRunner.runUpdater(UpdaterRunner.java:176)
         at fuego.server.service.BAMRunnerService.runUpdater(BAMRunnerService.java:62)
         at fuego.server.execution.BAMUpdater.execute(BAMUpdater.java:33)
         at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:290)
         at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:465)
         at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:543)
         at fuego.transaction.TransactionAction.start(TransactionAction.java:216)
         at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:116)
         at fuego.server.execution.DefaultEngineExecution.executeAutomaticWork(DefaultEngineExecution.java:56)
         at fuego.server.execution.EngineExecution.executeAutomaticWork(EngineExecution.java:42)
         at fuego.server.execution.ToDoItem.executeAutomaticWork(ToDoItem.java:265)
         at fuego.server.execution.ToDoItem.run(ToDoItem.java:536)
         at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:752)
         at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:732)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:138)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:130)
         at fuego.fengine.ToDoQueueThread$PrincipalWrapper.processBatch(ToDoQueueThread.java:429)
         at fuego.component.ExecutionThread.work(ExecutionThread.java:816)
         at fuego.component.ExecutionThread.run(ExecutionThread.java:395)
    Caused by: SQL Exception: A lock could not be obtained within the time requested
         at com.ibm.db2cs.m.j.generateCsSQLException(Unknown Source)
         at com.ibm.db2cs.m.b.wrapInSQLException(Unknown Source)
         at com.ibm.db2cs.m.b.handleException(Unknown Source)
         at com.ibm.db2cs.m.d.handleException(Unknown Source)
         at com.ibm.db2cs.m.t.handleException(Unknown Source)
         at com.ibm.db2cs.m.s.closeOnTransactionError(Unknown Source)
         at com.ibm.db2cs.m.s.movePosition(Unknown Source)
         at com.ibm.db2cs.m.s.next(Unknown Source)
         at fuego.jdbc.FaultTolerantResultSet.next(FaultTolerantResultSet.java:553)
         at fuego.analyzer.Updater.loadInstanceInfoValues(Updater.java:1039)
         at fuego.analyzer.Updater.loadInstanceInfoValues(Updater.java:988)
         at fuego.analyzer.Updater.loadInstanceInfo(Updater.java:982)
         at fuego.analyzer.Updater.synchronize(Updater.java:252)
         at fuego.analyzer.UpdaterRunner.synchronizeMetadata(UpdaterRunner.java:480)
         ... 20 more

    Good morning justinmm357,
    I would be more than happy to help delink the secondary email address from your My Best Buy™ account.  Please send me a private message with the information below, by clicking on the blue button in my signature, and I will make sure that everything is up-to-date.
    Name
    Phone #
    Mailing address
    Email address (primary and secondary)
    Thank you for reaching out to us on the forum and for being a My Best Buy™ member!
    Derek|Social Media Specialist | Best Buy® Corporate
     Private Message

  • I have a problem updating the new ipod touch 5th generation

    I have a problem updating the new ipod touch 5th generation and I need help:
    With each attempt I receive the message:
    iTunes has detected an iPod in recovery mode.  You must restore this iPod before it can be used with iTunes.
    The iPod only displays a USB cable with an arrow pointing to an iTunes logo.
    I receive a "Are you sure..." message with the 2 options, one to Restore and Update and the other to Cancel.
    Each time I have selected the Restore and Update button and then moved through the acceptance screens.  Then iTunes begins to download the iOS 6.0.1 Software Update, which usually takes about 50 minutes.  During the download I will receive messages that an iPod has been found in restore mode.
    After the download is complete no update occurs to the iPod and iTunes displays the Device Summary screen showing derive Name as iPod and all other items as n/a.
    The iPod was working great without any known issues prior to attempting to update the OS.

    Maybe:
    iTunes for Windows: iTunes cannot contact the iPhone, iPad, or iPod software update server
    Unable to contact the iOS software update server gs.apple.com
    Error 1004, 1013, 1638, 3194: These errors may be the result of the connection to gs.apple.com being redirected or blocked. Follow these steps to resolve these errors:
    Install the latest version of iTunes.
    Check security software. Ensure that communication to gs.apple.com is allowed. Follow this article for assistance with security software. iTunes for Windows: Troubleshooting security software issues.
    Check the hosts file. The restore will fail if there is an active entry to redirect gs.apple.com. Follow iTunes: Advanced iTunes Store troubleshooting to edit the hosts file or revert to a default hosts file. See section "Blocked by configuration: (Mac OS X/Windows) > Rebuild network information".
    Try to restore from another known-good computer and network.
    If the errors persist on another computer, the device may need service.

  • After Firefox was updated, the font size on my screen was decreased for all applications. How can I increase the font size on my screen ??

    After the update, the next screen showed all the letters in smaller font, with fewer pixels. All the screens are like that now and I found nothing in the Firefox help contents. This is a problem because I have vision difficulty. So, how can I increase the font size to what it was before? My screen is about 20 inches wide.
    Also, any chance I can change all the font to Arial instead of Times New Roman?

    Thanks -- that does help!

  • Problem updating the Firmware on a PCI-7334

    About me: I am pretty new to the Labview/NI landscape so I may be missing something here! That said im very technically aware in general and believe I understand what is going on here.
    Background: This NI PCI-7334 board has been taken from currently unused project stock so current physical condition of board is not really known (ie was not recently working) although it appears to be in good physical order.
    Attempting to setup a new Labview 7 Express development environment on new PC hardware with a clean build of Windows XP Pro SP1 along with 1 x IMAQ PCI-1411 and 1 x IMAQ PCI-1408.
    Attempting to update the PCI-7334 with the latest firmware in NI Motion 6.1.2. I select the option "Update All Firmware Sectors" f
    rom the firmware tree by right mouse clicking. It starts off with the buttonless (ie No Cancel Button) file transfer progress dialog box. But after about 30 seconds I keep getting the error "Error configuring the board for download. Please ensure that the board is in a reset state and that no other application is communicating with it."
    Existing Firmware versions are listed in NiMAX as:
    68331 - 6.00.3012
    DSP - 6.00.3008
    FPGA1 - [BLANK*]
    FPGA2 - [BLANK*]
    *Listed in tree without a version
    Unusually under the General listing I get "0" for the device serial number!
    When I go into the "Status" area and choose the "Reset Device" option I eventually get these status lights (red):
    Ready to Receive
    Power Up Reset
    Modal Error Message
    0x80 Move Complete Status
    I have tried removing all other cards from the PC to ensure there is not a compatability issue.
    At this stage it would appear that it is a hardware problem so I was wondering what options I have available to g
    et this card repaired. Is repair by NI economically viable or is a new puchase a better approach? IE are repairs done at a fixed price or based on materials and labour?
    Please advise!
    Thanks, Rod.
    Attachments:
    NI_PCI-7334_Firmware_Update_Error.zip ‏115 KB

    I agree with your diagnostics. It looks like something went wrong during the last firmware update. The only solution for this problem is to send the board for repair.
    NI has fixed prices for repairs which are much cheaper than buying a new board. Please contact your local NI branch for details.
    Best regards,
    Jochen Klier
    Applications Engineering Group Leader
    National Instruments Germany GmbH

  • Problems updating the ipad2 - network error message

    I keep trying to update the ipad2 thru Itunes - which i updated to 10.5   I keep getting an error message of network connectivity. Called my internet provider, Comcast, and plugged modem directly into laptop. Still a problem. Called Apple and the guy said lower the anti-virus setting. Did that. Still getting this error message and now have had the connection from being on hold to a person ring for nearly 15 minutes. VERY DISAPPOINTED with the three different tech people I have spoken with giving me three different answers, and I'm still not updated. HELP HELP HELP

    About iTunes Store authorization and deauthorization
    iPod: Troubleshooting songs and audiobooks that won't play
    iPod does not play content purchased from the iTunes Store

  • Problem updating the infotype 1208 subtype ALUM

    Hi,
    My requirement is to update the infotype 1208 subtype ALUM with the Value "YES" when I terminate a employee in PA40. ( immediately).
    I am using the FM - HR_INFOTYPE_OPERATION which doesn't seem to work.
    I tried running a BDC for PA30 , but it is not allowing me to edit the employee and says that i am processing him.
    I feel this is an issue with locks. But not sure about how to go with.
    Are there any standard classes available or any other method to use to update this infotype while terminating.
    Regards,
    Karan.

    Hi,
    try using this method, this will convert the OLD_IMAGE, NEW_IMAGE, parameters into pnnnn table.
    this code is the following class.
    CL_IM_BR_SALARY_INCREASE,
    you need to create your own method, copy the parameters as well.
    method READ_IMAGE .
      FIELD-SYMBOLS: <f> type any.
      DATA: help_prelp TYPE prelp,
            inf_tabname(10).
      data: wa_p0008      type p0008,
            wa_p0734      type p0734.
      concatenate 'WA_P' p_infty into inf_tabname.
      ASSIGN (inf_tabname) TO <f>.
      loop at p_image into  help_prelp
                      where infty eq p_infty and
                            opera eq p_opera and
                            subty eq '0'.
        CLEAR <f>.
        CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
          EXPORTING
            prelp = help_prelp
          IMPORTING
            pnnnn = <f>.
          append <f> to pnnnn.
      endloop.
    endmethod.
    Message was edited by:
            javier  santana

  • Problem with the nodes in Oracle Portal using JPDK Portlets

    Here in Production environment we have 2 different Portal Servers
    Even if logged in with the node 'b' then also the images path showing path from node 'a' only.
    Note:
    The thing is both the Portal servers are sharing the common portal repository.
    We are using JPDK Portlets with Oracle Appserver

    Does anyone know how to modify an existing report with sub labels within the main report? I am trying to resize one of the labels.
    O'Neil

  • TS1538 Problems Updating the Apple Mobile Device Driver  for ipad4

    My iTunes was not recognising my new ipad4 and so I followed Apple guidelines re. Apple Mobile Device Service and found that this was not listed on my laptop.
    I then followed guidelines to update the driver - I followed steps to install the usbaapl file, however when I clicked ok to install the following message came up:
    "The folder you specified doesn't contain a compatible software driver for your device. If the folder contains a driver, make sure it is designed to work with Windows for 32-bit systems."
    Any ideas/tip/advice anyone can offer would be much appreciated! I just want to get my music onto my new iPad :(
    Thanks.

    See:
    iOS: Device not recognized in iTunes for Windows
    I would start with
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP

  • Problem updating the BIOS on Satellite A300

    You update the BIOS in the laptop model A300-psagce after the update, the device to be subjected something.
    Please help very necessary

    Hey buddy,
    Does this mean that now after the BIOS update you see only a black screen? Or can you access the BIOS or boot into safe mode?
    If your notebook doesnt start anymore you should try this workaround: Remove the battery and AC/DC adaptor. Then wait one hour and connect both devices again. Now you can try to start the notebook again.
    If it doesnt work you should go to an authorized service provider. Maybe the ROM module must be reflashed but this can only be done from an ASP.
    Good luck!

  • Problem updating the Adobe Creative Cloud Apps

    Hi, I have recently subscribed Adobe Creative Cloud (for student and teachers). All the programs are working fine since then but there is a problem. I cannot update any of these applications. I have my internet connection 24/7, and my pc meets all the specs. While updating it always brings up the message: : "The update server is not responding. The server might be offline temporarily, or the Internet or firewall settings may be incorrect." Any solution to this problem would be appreciated as soon as possible. Man I really want to update my Illustrator with the new cloud exclusive update!!

    The error message is specific to windows 7  , check this link it might help :-
    http://helpx.adobe.com/creative-suite/kb/error-update-server-repsonding-cs4.html

  • CR52-A4 - Problem updating the firmware

    Hello,
    I've just bought a CD-RW (CR52-A4) and it seems not to be able to recognize some CD-RW (Nero InfoTool reports some CD-RW 10x as 4x and some CD-R 52x as 16x). My firmware is 1.10 and I'm using Live Update to upload 2.20. When I use Windows I get a popup error windows "Send Data to Device Error") and when I try the DOS boot disk with the same firmware I have a similar error (Write Buffer Error).
    Does someone have the same problem? (and the solution ;-)
    On Linux too, CD speeds are not correctly detected (BTW, are there Linux software to upgrade the firmware?).
    Thanks,
    Christophe.

    Quote from: NovJoe on 01-March-05, 20:41:32
    Does this happens to all types of media that's placed in the system or only a few types only?
    This happens at least to all types of media I have tried. (3 different kinds of CD-RW and 1 kind of CD-R)

  • I'm having a problem updating the iTunes software. Receiving "invalid signature". Does anyone know how to fix this?

    Hi Everyone,
    I have been trying to update iTunes, Safari, and Quicktime. Keep receiving "invalid signature" and then it removes the attempted download. Does anyone know how to fix this?

    I have had this happen as well. What I had to do was sync the iPod to remove the album and the resync the album back to the Classic. I've had this happen with my iPhones as well. Must be a bug in either the current OS or iTunes versions.

  • I am having problems updating the VZ Navigator App.

    I keep getting error messages 941 of 923.  Does anyone know what these error numbers mean?

    Try clearing cache and data in the Play Store app. Menu -> Settings -> Applications -> All
    If that does not work uninstall the Play Store update and try to update again.

Maybe you are looking for

  • Issues  in  File Content Conversion  in a Sender Adapter

    Hi Folks , The XMl Structure of my input file is <?xml version="1.0" encoding="UTF-8"?> <ns:file_sender_mt xmlns:ns="urn:filetofiledemo">   <recordset>     <data>       <name />       <city />       <age />     </data>     <adress>       <fnaame />  

  • Creating crucial report in web analysis..

    Hi,Experts Here is an interesting issue.we have Actual and Forecast data. In generating the reports using web analysis for one crucial report.we have version number which is a memebr of version dimension.Based on the version number selected,it must s

  • Error in JDeveloper ver. 10.1.3.4 : JBO-27122 and ORA-01874

    Hi, I'm using JDeveloper 10.1.3.3.0.4157 before and when I installed version 10.1.3.4.0.4270, it's giving me an error of JBO-27122 and ORA-01874: 'time zone hour must be between -12 and 13' whenever I tried to test a view object in my App module. Whe

  • Complex Update Question

    I have 2 tables a and b. Both tables have columns have the same primary keys. How would I go about updating a subset of the rows of column a from a column in column b? Update (select * from a inner join b on a.id b.id where b.some_column=some_value)

  • Efforts to use, repair, and uninstall Blackberry desktop software failed. Help?

    I upgraded from XP to Windows 7, and had to reinstall the Blackberry Desktop software.  I'm looking for help to get it working.  I've installed version 6.0. i'm on Curve 8330 (Verizon).  Below describes mt efforts: When I run the desktop software, I