TextField set to HTML, Scrollbar problem

Hi,
I have a chat box called 'chatbox' which needs to display
lines in different colors. I've set 'render as HTML' and called the
var property 'chat_html'. It displays things fine when I add lines
with, for example, 'chat_html += "<font color =
'#ff0000'>TEXT</font>'.
The only problem is the vertical scrollbar doesn't update.
I've noticed I can make it update by using 'chatbox.text += "" each
time I add a html line, but this seems to set the colors to all one
color, namely, 'chatbox's default color.
Any help on this? How do I update the scrollbar without
losing the different colors?
Thanks - Gary.

In the old way of things - what did change?
Look at the WebAccess on the HTTP view - how long does it say that it
has been up?
rpm -qa novell-group What version
What does the POA report?
If this has all got squirrely rcgrpwise stop, rcapache2 stop and
rctomcat5 stop (then restart them again in reverse order)
T
On Fri, 02 Sep 2011 19:26:02 GMT, taphillips
<[email protected]> wrote:
>
>We have webaccess agent 8.0.2 running on OES SLES 10 sp3.
>In the past few days webaccess users cannot send email when compose
>view is set to html. They will be redirected back to the address bar to
>input an address even though there is already and address listed. Some
>will get the message "you must specify a recipient to send to" It will
>send ok when set to plain text.
>It happens across all operating ystems and different browsers and
>versions I have tried so far.
>I did find and old reference to this problem, but it had to do with an
>older agent working against a newer post office.
>This seemed to happen quite suddenly. We have had several power outages
>in the last week or so but the server has not gone down.
>Any ideas?
>Thanks,
>Tom

Similar Messages

  • Major problem with textfields set to TLF

    Looks like the garbage collector is not removing movieclips that have textfields set to TLF. I'm using Flash Builder's profile inspector and TLF brings in a bunch of objects and prevents the clip from being removed by the garbage collector (including all the objects that TLF put in memory).
    How could Adobe release CS5 with such a crappy implementation of text? If there is no solution I will have to avoid using TLF text for all my projects. I strongly suggest everyone avoid TLF.

    The solution is to use dynamic TLF textfields. Create them using actionscript.
    What I did in my project was use classic textfields just for layout purposes and then remove them with actionscript and replace them with a TLF textfield. In the destroy function for your class make sure you remove the TLF from the stage and set it's variable to null.
    Everywhere else in project where I didn't need TLF i switched back to Classic text fields.
    I needed the TLF for emoticons in a chat application. TLF will throw some items in memory when it loads the swz file.
    If you don't need TLF avoid it.

  • Scrollbar problem - any ideas?

    I know another scrollbar problem...ive read the posts but cant solve it. Anyone got any ideas?
    got a program called Map which draws a map (using paint()) of a web site. I can get it to work but often there are so many links they go off the page.I need a scrollbar.
    In main i set up a frame: JFrame frame=new JFrame("M");
    Then set up scrollbar: JScrollPane cf = new JScrollPane();
    cf.setHorizontalScrollBarPolicy (JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS );
    cf.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS );
    Then add scrollbar to frame: frame.getContentPane().add(cf);
    Then add Map() - my main prog: cf.add(new Map());
    (Map constructor calls repaint() - paint method draws to screen. main program extends JComponent)
    All i get is a blank (grey frame) with a scrollbar :) ...doesnt show Map - paint
    I can ignore scrollbar and use a container instead -
    Container c=frame.getContentPane()
    then set its layout : c.setLayout(new BorderLayout());
    and add Map() to it : add(new Mapper(),BorderLayout.CENTER);
    It works fine - but i need a scrollbar...
    Thanks for your time&help

    Hers the code for my main Mapper program (which is loaded first) and the Scan program(below).I know the structures all over the place+thats the problem. I would like a scrollbar. Also everytime i scan a new window opens, it would be good if only 1 ever opened.Ive been fiddling for days and am lost.Can anyone sort it out? I think the codes ok, just needs restructuring...
    The main Mapper program :
    package project.e;
    import javax.swing.*;import java.awt.*;import java.awt.geom.*;import java.awt.event.*;
    import java.io.*;import java.net.*;import java.lang.Math.*;import java.util.*;
    public class Mapper extends JComponent{
    static int w = 1000;
    static int h = 1000;
    static String [] Lnks = new String [5000]; //Lnks
    public Mapper()
    { repaint();}
    public void paint(Graphics g){
    Graphics2D g2D=(Graphics2D)g;
    Toolkit tk = Toolkit.getDefaultToolkit();
    Image img = tk.getImage("c:/windows/desktop/project/e/wirecube.gif"); //setup images
    Image rimg = tk.getImage("c:/windows/desktop/project/e/bwirecube.gif");
    int ww=(w/2);int hh=(h/2);
    g2D.setFont(new Font("Times New Roman", Font.PLAIN,12));
    g2D.setPaint(Color.cyan);
    g2D.drawString("Web Page Scanned : ",10,50); g2D.drawString(Scan.url,120,50);
    g2D.drawString("Total Links Found : ",10,100); g2D.drawString(String.valueOf(Scan.x),120,100);
    g2D.drawImage(rimg,ww-88,50,this); g2D.setFont(new Font("Times New Roman", Font.PLAIN,12));
    g2D.setPaint(Color.green);
    g2D.drawString(Scan.url,ww-88,50);
    int a=w/5;
    int up=0;
    int lx=0;
    g2D.translate(ww,hh);
    g2D.translate((-ww-a)+10,-300);
    for (int i=0;i<(Scan.x);i++){ //loop - drawing all (5 per line)
    if (lx==5){g2D.translate((-ww-ww),100);lx=0;} //every 5 times
    g2D.translate(a,0);
    g2D.drawImage(img,0,0,this); //img
    g2D.setFont(new Font("Times New Roman", Font.PLAIN,12));
    g2D.setPaint(Color.green);
    g2D.drawString(Lnks[up],ww-ww,hh-hh-10); //URL
    if (Scan.tl==true){g2D.drawString(Scan.IorE[up],ww-ww,hh-hh-25);}lx=lx+1;up=up+1;}}
    public static void main(final String [] args){          
    System.arraycopy(Scan.Links,0,Lnks,0,Scan.x);
    JFrame frame=new JFrame("Mapper"); //frame setup
    JMenu menu = new JMenu("Menu");
    JMenuItem scan = new JMenuItem("Scan");
    scan.setMnemonic(KeyEvent.VK_S);
    scan.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,Event.CTRL_MASK));
    scan.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e){Scan.main(args);}});
    //call Scan
    JMenuItem downloadLink = new JMenuItem("download-Link");
    downloadLink.setMnemonic(KeyEvent.VK_L);
    downloadLink.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_L,Event.CTRL_MASK));
    downloadLink.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e){GetLink.main(args);}});
    JMenuItem downloadImage = new JMenuItem("download-Image");
    downloadImage.setMnemonic(KeyEvent.VK_I);
    downloadImage.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_I,Event.CTRL_MASK));
    downloadImage.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e){GetImage.main(args);}});
    JMenuItem Quit = new JMenuItem("Quit");
    Quit.setMnemonic(KeyEvent.VK_Q);
    Quit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,Event.CTRL_MASK));
    Quit.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e){System.exit(0);}});
    JMenuBar menuBar = new JMenuBar();
    menu.add(scan);
    menu.add(downloadLink);
    menu.add(downloadImage);
    menu.add(Quit);
    menuBar.add(menu);
    frame.setJMenuBar(menuBar);
    Container c = frame.getContentPane();
    c.setLayout(new BorderLayout());
    c.add(new Mapper());
    c.setBackground(new Color(0,0,0));
    frame.setJMenuBar(menuBar);
    frame.setBounds(0,0,w,h);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setVisible(true);}}
    Scan :
    package project.e;
    import java.awt.*;import java.awt.geom.*;import java.awt.event.*;import javax.swing.*;import javax.swing.text.*;import javax.swing.text.html.*;import java.io.*;import java.net.*;
    public class Scan{
    static String [] Links = new String[5000]; //array of links
    static String [] IorE = new String[5000]; //array - Internal or External
    static int x = 0; //length
    static String url = new String(); //url
    static String type = new String(); //link/image
    static boolean tl;
    static String l = new String("links");
    static String i = new String("images");
    public static void main(String [] args){
    Links = new String[5000]; //need to repeat ini. for rescanning
    IorE = new String[5000];
    x = 0;
    url = new String();
    type = new String();
    EditorKit kit = new HTMLEditorKit();
    Document doc = kit.createDefaultDocument();
    doc.putProperty("IgnoreCharsetDirective",Boolean.TRUE);
    try{
    type = JOptionPane.showInputDialog(null,"Please enter file type to scan for - links / images ");
    url = JOptionPane.showInputDialog(null,"Please enter URL"); //get url (var.) to map - dialog box
    Reader rd = getReader(url); // Create a reader on the HTML content
    kit.read(rd, doc, 0); // Parse the HTML.
    ElementIterator it = new ElementIterator(doc);
    javax.swing.text.Element elem;
    while ((elem = it.next()) != null){  
    if (type.equals(l))
    tl =true;
    //int bol = url.indexOf(".com");
    SimpleAttributeSet s = (SimpleAttributeSet)
    elem.getAttributes().getAttribute(HTML.Tag.A);
    if (s != null)
    Links[x]=String.valueOf((s.getAttribute(HTML.Attribute.HREF)));
    String tmp = Links[x].substring(0,1);
    if (! tmp.equals("h")){
    if (! tmp.equals("/"))
    {Links[x]="/"+Links[x];}} //if string doesnt start with h or /                                    //then add a / to start
    if (Links[x].startsWith("/")){System.out.println("Internal Link");IorE[x]="Internal Link";} //if starts with / then internal
    else{
    if (Links[x].startsWith(url)){System.out.println("Internal Link");IorE[x]="Internal Link";} //else if starts with url then internal
    else{
    String tmp3 = url.substring(11); //else if contains url - (http://www.) eg. 123.ibm.com then internal
    int b=0;
    b=Links[x].indexOf(tmp3);
    if (b>0){System.out.println("Internal Link");IorE[x]=("Internal Link");}
    else{System.out.println("External Link");IorE[x]=("External Link");}}} //else must be external (doesnt start with / or url or contain middle bit of url)
    System.out.print("Link : ");
    System.out.print(x);
    System.out.println();
    System.out.println(Links[x]);
    System.out.println();
    x=x+1;
    if (type.equals(i))
    tl=false;
    if ( elem.getName().equals( HTML.Tag.IMG.toString() ) ){
    Links[x] = String.valueOf(elem.getAttributes().getAttribute( HTML.Attribute.SRC ));
    System.out.print("Image : ");
    System.out.print(x);
    System.out.println();
    System.out.println(Links[x]);
    System.out.println();
    x=x+1;}
    Mapper.main(args);
    }catch(Exception e){e.printStackTrace();}
    static Reader getReader(String u) throws IOException{
    if (u.startsWith("http:")){
    // Retrieve from Internet
    URLConnection con = new URL(u).openConnection();
    return new InputStreamReader(con.getInputStream());}else{
    // Retrieve from file.
    return new FileReader(u);
    Also got 2 extra - GetImage & GetLinks...they just go away and do there own stuff...no painting required so cool.The probelms is between Mapper+Scan...
    Thanks for your time&help
    Oly

  • HT204053 I want to use the same apple id for iTunes and iCloud...but I have both set up..my problem is I want to use the one that I use for iTunes for both

    I want to use the same apple id for iTunes and iCloud...but I have both set up..my problem is I want to use the one that I use for iTunes for both

    iForgot.com

  • 'SET MARKUP HTML' top left alignment in SQL*Plus

    I have a SQL script which generates HTML that is then emailed as a HTML email. I am using the following SET Markup command
    SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON -
    HEAD "<STYLE type='text/css'> -
    table,tr,td { -
    font:10pt Arial,Helvetica,sans-serif; -
    text-align:left; -
    vertical-align:top; -
    color:black; background:white; } -
    <!-- BODY {background: white} --> -
    </STYLE>" -
    BODY "TEXT='black'" -
    TABLE "WIDTH='100%' BORDER='1'"
    Looking at the file generated it is creating the table tags OK but there is no CSS. This means the text is vertical aligned in the centre of the cell and I want it top left.
    Any ideas?
    Ben

    Welcome to OTN.
    You probably just need to get the tags with the CSS info into your document any way you can. If nobody suggests anything more elegant consider using prompt or even pl/sql dbms_output.put_line statemtns to get the CSS lines into your output - something like (untested)
    set serveroutput on
    exec dbms_output.put_line('<style type=''text/css'''); --two single quotes around "text/css"
    . . .Edited by: riedelme on Jul 7, 2010 11:02 AM

  • Posterous blog HTML Snippet problem - not all of blog is showing up...

    Good morning all! So I was looking for a solution for our newly formed website (I'm a novice) where I could have multiple users update our blog page without having to use iWeb to do it. I read up on Posterous and it appears this would be an ideal solution. So I found some code from another Apple Discussions poster, Alancito, that would pull my Posterous blog directly into the iWeb page I created. Well it has done that, sort of...
    I see the header from the blog, but the content isn't visable. Well, actually if you highlight the header or "blog differently" and then hold down like you're scrolling down the page, the info is there. But the HTML snippet always cuts it off. Even if I expand the size of the snippet in iWeb, it ALWAYS reverts back to this same size.
    I'm in a bind here and could really use some help.
    Here's the blog page address: http://www.sporkfoodwagon.com/SporkFoodWagon/Blog.html
    And here's the code I was provided.
    <iframe height="100%" allow transparency="true" frameborder="0" scrolling="no" style="width:100%;border=none" src="http://sporkfoodwagon.posterous.com/"></iframe>
    Message was edited by: andrewrichardson

    Andrew ~ Perhaps someone will suggest a solution to the HTML Snippet problem, but meanwhile, with this recent improvement to Posterous:
    http://blog.posterous.com/posterous-unveils-pages
    ...perhaps you don't need an iWeb site at all. If you must have one, consider linking to your Posterous blog directly from iWeb's navigation bar:
    Create a blank internal page titled "Blog" (actually you can name the page whatever you want.) Then in that Blog page add an HTML Snippet with the following code:
    <script type="text/javascript">
    parent.window.location = "http://www.yourblogname.com"; // change this to your own URL
    </script>
    ...Once published, clicking on "Blog" in the navbar will immediately redirect to your external Blog page. (Thanks to Cyclosaurus for the code).
    And to return from Posterous back to your iWeb site:
    http://blog.posterous.com/pages-20-add-links-to-your-sidebar

  • Html link problem...

    Hey!
    Just wanned to say to those who answered my post on html link problems, that the problems I had were actualy because of the jdk version! I had jdk1.2 and now I have 1.3 and it works just fine.
    thanx a lot to everyone who tried to help!!!

    hehe i saw the topic "html link problem" posted by amidala and i thought " oh my god is she still struggling!" ;P
    Kewl 'twas not a problem!

  • Unix sqlplus set markup html on

    Can anyone explain why the following does not work under solaris unix sqlplus
    SQL*Plus: Release 3.2.3.0.0 - Production on Wed Aug 13 17:43:20 2008
    Copyright (c) Oracle Corporation 1979, 1994. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    JServer Release 9.2.0.8.0 - Production
    SQL> SET MARKUP HTML ON SPOOL ON
    unknown SET option "MARKUP"
    SQL>
    Yet on windows sqlplus.....
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    JServer Release 9.2.0.8.0 - Production
    SQL> SET MARKUP HTML ON SPOOL ON
    SQL> spool today.htm
    <br>
    SQL> select sysdate from dual;
    <br>
    <p>
    <table border='1' width='90%' align='center' summary='Script output'>
    <tr>
    <th scope="col">
    SYSDATE
    </th>
    </tr>
    <tr>
    <td>
    13-AUG-2008
    </td>
    </tr>
    </table>
    <p>
    SQL> spool off;

    As Chris said, get a current version of sqlplus.This is form my solaris server:
    /home/oracle/home> sqlplus /
    SQL*Plus: Release 9.2.0.6.0 - Production on Wed Aug 13 16:10:18 2008
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    With the Partitioning option
    JServer Release 9.2.0.6.0 - Production
    SQL> SET MARKUP HTML ON SPOOL ON
    SQL> SELECT sysdate FROM dual;
    <br>
    <p>
    <table border='1' width='90%' align='center' summary='Script output'>
    <tr>
    <th scope="col">
    SYSDATE
    </th>
    </tr>
    <tr>
    <td>
    13-AUG-2008
    </td>
    </tr>
    </table>
    <p>

  • Set markup html on

    Hi,
    Some times I get following lines in output while generating output in 9.2 thru sqlplus
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
    <meta name="generator" content="SQL*Plus 9.2.0">
    <style type='text/css'> body {font:10pt Arial,Helvetica,sans-serif; color:black; background:White;} p {font:10pt Arial,Helvetica,sans-serif; color:black; background:White;} table,tr,td {font:10pt Arial,Helvetica,sans-serif; color:Black; background:#f7f7e7; padding:0px 0px 0px 0px; margin:0px 0px 0px 0px;} th {font:bold 10pt Arial,Helvetica,sans-serif; color:#336699; background:#cccc99; padding:0px 0px 0px 0px;} h1 {font:16pt Arial,Helvetica,Geneva,sans-serif; color:#336699; background-color:White; border-bottom:1px solid #cccc99; margin-top:0pt; margin-bottom:0pt; padding:0px 0px 0px 0px;} h2 {font:bold 10pt Arial,Helvetica,Geneva,sans-serif; color:#336699; background-color:White; margin-top:4pt; margin-bottom:0pt;} a {font:9pt Arial,Helvetica,sans-serif; color:#663300; background:#ffffff; margin-top:0pt; margin-bottom:0pt; vertical-align:top;}</style><title>SQL*Plus Report</title>
    </head>
    <body>
    Kindly suggest me how to insert above lines while generating SQL output which will give us above formating in html.
    thanks & regards
    PJP

    You can write whatever HTML code you like in the TABLE clause:
    SQL> SET MARKUP HTML ON TABLE 'border=1 width="50%"' ENTMAP OFF
    SQL> select ename from emp where rownum=1;
    <br>
    <p>
    <table border=1 width="50%">
    <tr>
    <th scope="col">
    ENAME
    </th>
    </tr>
    <tr>
    <td>

  • Image on set markup HTML ON

    Hi,
    Is there a possibility of seeking in a local directory an image that will appear in my report HTML sqlplus? (set markup HTML ON)
    Thank you :)

    SQL*Plus produces HTML output. It does not render it. A browser with a rendering engine is needed.
    SQL*Plus can produce HTML output that refers to javascript, style sheets and images. The location of these however should be accessible to the browser.
    If for example SQL*Plus produce HTML that refers to an image on my PC, my PC's browser will be able to read and render that image. If the HTML is rendered by your PC's browser, your browser will fail to render that image as the image location is invalid on your PC.

  • Problems setting 'allow HTML snippet insertion' in Contribute 4

    I am trying to set the administrator option to allow insertion of HTML snippets (as described here). But the dialog box to change the settings does not include an "Allow HTML Snippet Insertion" checkbox.
    Any advice? Is this to do with the version of Contribute I'm using? Or is there some other administrator setting I need to set first?

    Hi ravster.
    Thanks for the suggestions. I had read the Arch NFS HowTo and did as you suggested get rcpinfo for the server machine. The Libranet NFS server is configured rather different since the NFS daemons are built into the default kernel.
    Since I needed to complete the transfer immediately, I gave up for now trying to set up NFS and used netcat (!) instead to transfer the files from the Libranet laptop to the Arch workstation. The laptop will be converted to Arch Linux soon so I think I'll be able to clear things up soon.  I haven't had any problems setting up NFS with homogeneous (i.e., all Arch or all Libranet) computer combinations.
    Thanks again.
    Win

  • Fireworks HTML aligning problem

    Hi, i'm having problems with aligning Fireworks HTML objects
    with either an image set as a background or a regular image.
    I built a layout on fireworks, which I then cut into 4 parts.
    Banner, Nav bar (which will be linked to named anchors on
    dreamweaver), body (which will hold the main content), and footer.
    I created a table in Dreamweaver. The top row has no colomns. It
    holds the banner. The second row has 2 colomns. One for the nav bar
    to the left, and one for the body to the right. The bottom row has
    no colomns. It holds the footer. The banner and nav bar were
    imported as Fireworks HTML since they are complete with slices and
    everything. I was hoping to add content to the body and footer
    using Dreamweaver, so I imported those as Background Images for
    those particular cells since the only way to write on top of an
    image is if it is set as a background. The nav bar I imported from
    Fireworks HTML seems disconnected from the rest of the website.
    There is a small 1pixel space between the nav bar, and the body to
    its right, and also between the nav bar and the banner. Also, the
    banner seems to be aligned maybe 1 or 2 pixels more to the left
    than the body. It seems like the Fireworks HTML I imported wont
    aligne itself perfectliy with the rest of the website. Is there any
    way to fix this?

    "quixx" <[email protected]> wrote in message
    news:f3vnm6$i79$[email protected]..
    > It seems like the Fireworks HTML
    > I imported wont aligne itself perfectliy with the rest
    of the website. Is
    > there
    > any way to fix this?
    Yes, build the whole page in DW itself, don't export the html
    generated from
    Fireworks.
    From what you describe it would be a straight forward process
    in DW. Create
    your tables with enough cells/rows to create either the nav
    and then the
    content area in DW and then insert your sliced images into
    the cells as
    needed.
    Nadia
    Adobe® Community Expert : Dreamweaver
    CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    ~ Customisation Service Available ~
    http://www.csstemplates.com.au

  • Setting the HTML Web Reports encoding to UTF-8

    Hi,
    We have a problem with web reports (Reports6i with 9ias r1) showing some characters wrong(like the pound/yen symbols). The whole system (database and reports server) runs in UTF-8 characterset, but the web reports dont set any "ecoding=UTF-8" tags in the header section of the generated HTML .. so the users browser doesn't display the html correctly (unless he switches the browser from "Western European" to UTF-8 encoding himself).
    Any way we can force this? i didn't found any way on setting the UTF-8 tag in the report?!
    Cheers, Stefan

    OK. I think I can answer your question. You can change the Apache settings into UTF8 of your Apache Web Server in which you deploy your reports.

  • Html comments problem in 2.2.1

    Have recently updgraded to version 2.2.1 and in the process of verifying the differneces and problems.
    have noticed the following:
    have a page template which contains 2 page level item substitutions &PX_ITEM. and &PX_ITEM2. above and below a piece of html
    the value of these items is either blank or <!-- and --> respectively thereby allowing the code to be commented out on the fly. This worked in previous version of HTMLDB in APEX 2.2.1 however the chevrons are being output as &lt; and &gt; respectively and so are not being recognised as comment tags.....
    any ideas as to why this has changed and how to set it back to working the way it did in previous releases???

    Farhan,
    If those two items are set to Display As "Hidden", try changing them to
    "Display as Text (does not save state)".
    More item types, including Hidden items have their contents escaped to remove HTML in version 2.2.

  • JTree custom renderer setting selection background color problem

    Hi,
    I have a JTree with a custom icon renderer that displays an icon. The JTree is part of a TreeTable component. Iam having a problem setting the selection background uniformly for the entire row. There is no problem when there is no row selected in the JTable.
    My present code looks like this:
    Iam overriding paint in my renderer which extends DefaultCellRenderer.
           super.paint(g);
            Color bColor = null;
            if(!m_selected) {
                 if(currRow % 2 == 0) {
                      bColor = Color.WHITE;
                 } else {
                                                    bColor = backColor;
            } else {
                 bColor = table.getSelectionBackground();                  bColor = getRowSelectionColor();
         if(bColor != null) {
                           g.setColor(bColor);
             if(!m_selected) {
                   g.setXORMode(new Color(0xFF, 0xFF, 0xFF));
             } else {
                 g.setXORMode(new Color(0x00, 0x00, 0x00));
                  I have a color I arrive at using some algorithm that I want using method getRowSelectionColor(). The other cells in the row have this color. But the cell containing the tree node shows different color. Iam not able to arrive at the right combination of the color to set and the xor color so my tree node also looks like the other cells in the row.
    It is not a problem really as the table still looks good. Its just that the tree node looks like it has been highlighted and this might cause a problem when a table cell is highlighed later on in the application ( two cells in the row would be highlighted causing confusion).
    Any help would be appreciated.
    Regards,
    vidyut

    Hi Camickr,
    Thanks for the reply. Iam sorry I didn't include the sources the first time around. There were too many of them. I have created a small, self-contained, compilable program that demonstrates the problem and including it herewith. Still there's quite many files but they are all needed Iam afraid. The only one you will have to concern yourself fior this problem is the file IconRenderer.java. The treenode background and the other cells background are not in sync when table row is not selected in this example though. But they are in my real program. I just need them to be in sync i.e have the same background color when the row is selected.
    Your help would be very much appreciated.
    These are the files that are included below:
    1. AbstractTreeTableModel.java
    2. Bookmarks.java
    3. BookmarksModel.java
    4. DynamicTreeTableModel.java
    5. IconRenderer.java
    6. IndicatorRenderer.java
    7. JTreeTable.java
    8. TreeTableExample3.java (contains main)
    9. TreeTableModel.java
    10. TreeTableModelAdapter.java
    The copyright and javadocs information has been stripped for clarity.
    cheers,
    vidyut
    // AbstractTreeTableModel.java BEGIN
    import javax.swing.tree.*;
    import javax.swing.event.*;
    public abstract class AbstractTreeTableModel implements TreeTableModel {
        protected Object root;    
        protected EventListenerList listenerList = new EventListenerList();
        public AbstractTreeTableModel(Object root) {
            this.root = root;
        // Default implementations for methods in the TreeModel interface.
        public Object getRoot() {
            return root;
        public boolean isLeaf(Object node) {
            return getChildCount(node) == 0;
        public void valueForPathChanged(TreePath path, Object newValue) {}
        // This is not called in the JTree's default mode:
        // use a naive implementation.
        public int getIndexOfChild(Object parent, Object child) {
            for (int i = 0; i < getChildCount(parent); i++) {
             if (getChild(parent, i).equals(child)) {
                 return i;
         return -1;
        public void addTreeModelListener(TreeModelListener l) {
            listenerList.add(TreeModelListener.class, l);
        public void removeTreeModelListener(TreeModelListener l) {
            listenerList.remove(TreeModelListener.class, l);
        protected void fireTreeNodesChanged(Object source, Object[] path,
                                            int[] childIndices,
                                            Object[] children) {
            // Guaranteed to return a non-null array
            Object[] listeners = listenerList.getListenerList();
            TreeModelEvent e = null;
            // Process the listeners last to first, notifying
            // those that are interested in this event
            for (int i = listeners.length-2; i>=0; i-=2) {
                if (listeners==TreeModelListener.class) {
    // Lazily create the event:
    if (e == null)
    e = new TreeModelEvent(source, path,
    childIndices, children);
    ((TreeModelListener)listeners[i+1]).treeNodesChanged(e);
    protected void fireTreeNodesInserted(Object source, Object[] path,
    int[] childIndices,
    Object[] children) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    TreeModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length-2; i>=0; i-=2) {
    if (listeners[i]==TreeModelListener.class) {
    // Lazily create the event:
    if (e == null)
    e = new TreeModelEvent(source, path,
    childIndices, children);
    ((TreeModelListener)listeners[i+1]).treeNodesInserted(e);
    protected void fireTreeNodesRemoved(Object source, Object[] path,
    int[] childIndices,
    Object[] children) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    TreeModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length-2; i>=0; i-=2) {
    if (listeners[i]==TreeModelListener.class) {
    // Lazily create the event:
    if (e == null)
    e = new TreeModelEvent(source, path,
    childIndices, children);
    ((TreeModelListener)listeners[i+1]).treeNodesRemoved(e);
    protected void fireTreeStructureChanged(Object source, Object[] path,
    int[] childIndices,
    Object[] children) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    TreeModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length-2; i>=0; i-=2) {
    if (listeners[i]==TreeModelListener.class) {
    // Lazily create the event:
    if (e == null)
    e = new TreeModelEvent(source, path,
    childIndices, children);
    ((TreeModelListener)listeners[i+1]).treeStructureChanged(e);
    // Default impelmentations for methods in the TreeTableModel interface.
    public Class getColumnClass(int column) { return Object.class; }
    public boolean isCellEditable(Object node, int column) {
    return getColumnClass(column) == TreeTableModel.class;
    public void setValueAt(Object aValue, Object node, int column) {}
    // Left to be implemented in the subclass:
    * public Object getChild(Object parent, int index)
    * public int getChildCount(Object parent)
    * public int getColumnCount()
    * public String getColumnName(Object node, int column)
    * public Object getValueAt(Object node, int column)
    // AbstractTreeTableModel.java END
    // Bookmarks.java BEGIN
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    import javax.swing.text.html.parser.*;
    public class Bookmarks {
    /** The root node the bookmarks are added to. */
    private BookmarkDirectory root;
    * Creates a new Bookmarks object, with the entries coming from
    * <code>path</code>.
    public Bookmarks(String path) {
         root = new BookmarkDirectory("Bookmarks");
         if (path != null) {
         parse(path);
    * Returns the root of the bookmarks.
    public BookmarkDirectory getRoot() {
         return root;
    protected void parse(String path) {
         try {
         BufferedReader reader = new BufferedReader(new FileReader
                                       (path));
         new ParserDelegator().parse(reader, new CallbackHandler(), true);
         catch (IOException ioe) {
         System.out.println("IOE: " + ioe);
         JOptionPane.showMessageDialog(null, "Load Bookmarks",
                             "Unable to load bookmarks",
                             JOptionPane.ERROR_MESSAGE);
    private static final short NO_ENTRY = 0;
    private static final short BOOKMARK_ENTRY = 2;
    private static final short DIRECTORY_ENTRY = 3;
    private class CallbackHandler extends HTMLEditorKit.ParserCallback {
         /** Parent node that new entries are added to. */
         private BookmarkDirectory parent;
         /** The most recently parsed tag. */
         private HTML.Tag tag;
         /** The last tag encountered. */
         private HTML.Tag lastTag;
         * The state, will be one of NO_ENTRY, DIRECTORY_ENTRY,
    * or BOOKMARK_ENTRY.
         private short state;
         * Date for the next BookmarkDirectory node.
         private Date parentDate;
         * The values from the attributes are placed in here. When the
         * text is encountered this is added to the node hierarchy and a
    * new instance is created.
         private BookmarkEntry lastBookmark;
         * Creates the CallbackHandler.
         public CallbackHandler() {
         parent = root;
         lastBookmark = new BookmarkEntry();
         // HTMLEditorKit.ParserCallback methods
         * Invoked when text in the html document is encountered. Based on
         * the current state, this will either: do nothing
    * (state == NO_ENTRY),
         * create a new BookmarkEntry (state == BOOKMARK_ENTRY) or
    * create a new
         * BookmarkDirectory (state == DIRECTORY_ENTRY). If state is
    * != NO_ENTRY, it is reset to NO_ENTRY after this is
    * invoked.
    public void handleText(char[] data, int pos) {
         switch (state) {
         case NO_ENTRY:
              break;
         case BOOKMARK_ENTRY:
              // URL.
              lastBookmark.setName(new String(data));
    parent.add(lastBookmark);
    lastBookmark = new BookmarkEntry();
              break;
         case DIRECTORY_ENTRY:
              // directory.
              BookmarkDirectory newParent = new
                   BookmarkDirectory(new String(data));
              newParent.setCreated(parentDate);
              parent.add(newParent);
              parent = newParent;
              break;
         default:
              break;
    state = NO_ENTRY;
         * Invoked when a start tag is encountered. Based on the tag
         * this may update the BookmarkEntry and state, or update the
         * parentDate.
         public void handleStartTag(HTML.Tag t, MutableAttributeSet a,
                        int pos) {
         lastTag = tag;
         tag = t;
         if (t == HTML.Tag.A && lastTag == HTML.Tag.DT) {
    long lDate;
              // URL
              URL url;
              try {
              url = new URL((String)a.getAttribute(HTML.Attribute.HREF));
              } catch (MalformedURLException murle) {
              url = null;
              lastBookmark.setLocation(url);
              // created
              Date date;
              try {
    lDate = Long.parseLong((String)a.getAttribute("add_date"));
    if (lDate != 0l) {
    date = new Date(1000l * lDate);
    else {
    date = null;
              } catch (Exception ex) {
              date = null;
              lastBookmark.setCreated(date);
              // last visited
              try {
    lDate = Long.parseLong((String)a.
    getAttribute("last_visit"));
    if (lDate != 0l) {
    date = new Date(1000l * lDate);
    else {
    date = null;
              } catch (Exception ex) {
              date = null;
              lastBookmark.setLastVisited(date);
              state = BOOKMARK_ENTRY;
         else if (t == HTML.Tag.H3 && lastTag == HTML.Tag.DT) {
              // new node.
              try {
              parentDate = new Date(1000l * Long.parseLong((String)a.
                                  getAttribute("add_date")));
              } catch (Exception ex) {
              parentDate = null;
              state = DIRECTORY_ENTRY;
         * Invoked when the end of a tag is encountered. If the tag is
         * a DL, this will set the node that parents are added to the current
         * nodes parent.
         public void handleEndTag(HTML.Tag t, int pos) {
         if (t == HTML.Tag.DL && parent != null) {
              parent = (BookmarkDirectory)parent.getParent();
    public static class BookmarkDirectory extends DefaultMutableTreeNode {
         /** Dates created. */
         private Date created;
         public BookmarkDirectory(String name) {
         super(name);
         public void setName(String name) {
         setUserObject(name);
         public String getName() {
         return (String)getUserObject();
         public void setCreated(Date date) {
         this.created = date;
         public Date getCreated() {
         return created;
    public static class BookmarkEntry extends DefaultMutableTreeNode {
         /** User description of the string. */
         private String name;
         /** The URL the bookmark represents. */
         private URL location;
         /** Dates the URL was last visited. */
         private Date lastVisited;
         /** Date the URL was created. */
         private Date created;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setLocation(URL location) {
         this.location = location;
         public URL getLocation() {
         return location;
         public void setLastVisited(Date date) {
         lastVisited = date;
         public Date getLastVisited() {
         return lastVisited;
         public void setCreated(Date date) {
         this.created = date;
         public Date getCreated() {
         return created;
         public String toString() {
         return getName();
    // Bookmarks.java END
    // BookmarksModel.java BEGIN
    import java.util.Date;
    public class BookmarksModel extends DynamicTreeTableModel {
    * Names of the columns.
    private static final String[] columnNames =
    { "Name", "Location", "Last Visited", "Created" };
    * Method names used to access the data to display.
    private static final String[] methodNames =
    { "getName", "getLocation", "getLastVisited","getCreated" };
    * Method names used to set the data.
    private static final String[] setterMethodNames =
    { "setName", "setLocation", "setLastVisited","setCreated" };
    private static final Class[] classes =
    { TreeTableModel.class, String.class, Date.class, Date.class };
    public BookmarksModel(Bookmarks.BookmarkDirectory root) {
         super(root, columnNames, methodNames, setterMethodNames, classes);
    public boolean isCellEditable(Object node, int column) {
         switch (column) {
         case 0:
         // Allow editing of the name, as long as not the root.
         return (node != getRoot());
         case 1:
         // Allow editing of the location, as long as not a
         // directory
         return (node instanceof Bookmarks.BookmarkEntry);
         default:
         // Don't allow editing of the date fields.
         return false;
    // BookmarksModel.java END
    // DynamicTreeTableModel.java BEGIN
    import java.lang.reflect.*;
    import javax.swing.tree.*;
    public class DynamicTreeTableModel extends AbstractTreeTableModel {
    /** Names of the columns, used for the TableModel getColumnName method. */
    private String[] columnNames;
    private String[] methodNames;
    private String[] setterMethodNames;
    /** Column classes, used for the TableModel method getColumnClass. */
    private Class[] cTypes;
    public DynamicTreeTableModel(TreeNode root, String[] columnNames,
                        String[] getterMethodNames,
                        String[] setterMethodNames,
                        Class[] cTypes) {
         super(root);
         this.columnNames = columnNames;
         this.methodNames = getterMethodNames;
         this.setterMethodNames = setterMethodNames;
         this.cTypes = cTypes;
    public int getChildCount(Object node) {
         return ((TreeNode)node).getChildCount();
    public Object getChild(Object node, int i) {
         return ((TreeNode)node).getChildAt(i);
    public boolean isLeaf(Object node) {
         return ((TreeNode)node).isLeaf();
    public int getColumnCount() {
         return columnNames.length;
    public String getColumnName(int column) {
         if (cTypes == null || column < 0 || column >= cTypes.length) {
         return null;
         return columnNames[column];
    public Class getColumnClass(int column) {
         if (cTypes == null || column < 0 || column >= cTypes.length) {
         return null;
         return cTypes[column];
    public Object getValueAt(Object node, int column) {
         try {
         Method method = node.getClass().getMethod(methodNames[column],
                                  null);
         if (method != null) {
              return method.invoke(node, null);
         catch (Throwable th) {}
         return null;
    * Returns true if there is a setter method name for column
    * <code>column</code>. This is set in the constructor.
    public boolean isCellEditable(Object node, int column) {
    return (setterMethodNames != null &&
         setterMethodNames[column] != null);
    // Note: This looks up the methods each time! This is rather inefficient;
    // it should really be changed to cache matching
    // methods/constructors
    // based on <code>node</code>'s class, and code>aValue</code>'s
    //class.
    public void setValueAt(Object aValue, Object node, int column) {
         boolean found = false;
         try {
         // We have to search through all the methods since the
         // types may not match up.
         Method[] methods = node.getClass().getMethods();
         for (int counter = methods.length - 1; counter >= 0; counter--) {
              if (methods[counter].getName().equals
              (setterMethodNames[column]) && methods[counter].
              getParameterTypes() != null && methods[counter].
              getParameterTypes().length == 1) {
              // We found a matching method
              Class param = methods[counter].getParameterTypes()[0];
              if (!param.isInstance(aValue)) {
                   // Yes, we can use the value passed in directly,
                   // no coercision is necessary!
                   if (aValue instanceof String &&
                   ((String)aValue).length() == 0) {
                   // Assume an empty string is null, this is
                   // probably bogus for here.
                   aValue = null;
                   else {
                   // Have to attempt some sort of coercision.
                   // See if the expected parameter type has
                   // a constructor that takes a String.
                   Constructor cs = param.getConstructor
                   (new Class[] { String.class });
                   if (cs != null) {
                        aValue = cs.newInstance(new Object[]
                                       { aValue });
                   else {
                        aValue = null;
              // null either means it was an empty string, or there
              // was no translation. Could potentially deal with these
              // differently.
              methods[counter].invoke(node, new Object[] { aValue });
              found = true;
              break;
         } catch (Throwable th) {
         System.out.println("exception: " + th);
         if (found) {
         // The value changed, fire an event to notify listeners.
         TreeNode parent = ((TreeNode)node).getParent();
         fireTreeNodesChanged(this, getPathToRoot(parent),
                        new int[] { getIndexOfChild(parent, node) },
                        new Object[] { node });
    public TreeNode[] getPathToRoot(TreeNode aNode) {
    return getPathToRoot(aNode, 0);
    private TreeNode[] getPathToRoot(TreeNode aNode, int depth) {
    TreeNode[] retNodes;
         // This method recurses, traversing towards the root in order
         // size the array. On the way back, it fills in the nodes,
         // starting from the root and working back to the original node.
    /* Check for null, in case someone passed in a null node, or
    they passed in an element that isn't rooted at root. */
    if(aNode == null) {
    if(depth == 0)
    return null;
    else
    retNodes = new TreeNode[depth];
    else {
    depth++;
    if(aNode == root)
    retNodes = new TreeNode[depth];
    else
    retNodes = getPathToRoot(aNode.getParent(), depth);
    retNodes[retNodes.length - depth] = aNode;
    return retNodes;
    // DynamicTreeTableModel.java END
    // IconRenderer.java BEGIN
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.plaf.basic.BasicTreeUI;
    class IconRenderer extends DefaultTreeCellRenderer
    // Color backColor = new Color(0xD0, 0xCC, 0xFF);
    Color backColor = new Color(0xF0, 0xF0, 0xE0);
    String tipText = "";
    JTree tree;
    int currRow = 0;
    boolean m_selected;
    JTable table;
    public IconRenderer(JTree tree, JTable table) {
    this.table = table;
    // setBackground(backColor);
    setBackground(Color.GREEN);
    setForeground(Color.black);
         this.tree = tree;
    public Component getTreeCellRendererComponent(JTree tree, Object value,
    boolean selected,
    boolean expanded, boolean leaf,
    int row, boolean hasFocus) {
         Object node = null;
         super.getTreeCellRendererComponent(
    tree, value, selected,
    expanded, leaf, row,
    hasFocus);
         TreePath treePath = tree.getPathForRow(row);
    if(treePath != null)
              node = treePath.getLastPathComponent();
    currRow = row;
    m_selected = selected;
    DefaultMutableTreeNode itc = null;
    if (node instanceof DefaultMutableTreeNode) {
    itc = (DefaultMutableTreeNode)node;
         setClosedIcon(closedIcon);
    setOpenIcon(openIcon);
    return this;
    /* Override the default to send back different strings for folders and leaves. */
    public String getToolTipText() {
    return tipText;
    * Paints the value. The background is filled based on selected.
    public void paint(Graphics g) {
         super.paint(g);
         Color bColor = null;
         if(!m_selected) {
              System.out.println(" iconren not sel currRow " + currRow);
              if(currRow % 2 == 0) {
                   bColor = Color.WHITE;
              } else {
              bColor = backColor;
         } else {
              bColor = table.getSelectionBackground();
              System.out.println("in else selbg = " + bColor);           
              bColor = new Color(0xF0, 0xCC, 0x92);
              System.out.println(" bColor aft = " + bColor);           
         int imageOffset = -1;
         if(bColor != null) {
         imageOffset = getLabelStart();
         g.setColor(bColor);
         if(!m_selected) {
              System.out.println(" not sel setting white ");
              g.setXORMode(new Color(0xFF, 0xFF, 0xFF));
         } else {
    //          g.setXORMode(new Color(0xCC, 0xCC, 0x9F));
              g.setXORMode(new Color(0x00, 0x00, 0x00));
              System.out.println(" using color = " + g.getColor());           
         if(getComponentOrientation().isLeftToRight()) {
         g.fillRect(imageOffset, 0, getWidth() - 1 - imageOffset,
                   getHeight());
         } else {
         g.fillRect(0, 0, getWidth() - 1 - imageOffset,
                   getHeight());
    private int getLabelStart() {
         Icon currentI = getIcon();
         if(currentI != null && getText() != null) {
         return currentI.getIconWidth() + Math.max(0, getIconTextGap() - 1);
         return 0;
    // IconRenderer.java END
    // IndicatorRenderer.java BEGIN
    // import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    import javax.swing.table.*;
    import javax.swing.table.*;
    import javax.swing.plaf.basic.*;
    import java.awt.event.*;
    import java.util.EventObject;
    import java.text.NumberFormat;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.StringTokenizer;
    import java.util.Arrays;
    class IndicatorRenderer extends DefaultTableCellRenderer {
    /** Makes sure the number of displayed in an internationalized
    * manner. */
    protected NumberFormat formatter;
    /** Row that is currently being painted. */
    protected int lastRow;
    protected int reloadRow;
    protected int reloadCounter;
    protected TreeTableModel treeTableModel;
    protected TreeTableModelAdapter treeTblAdapter;
    protected JTable table;
    Component renderer = null;
    Color backColor = new Color(0xF0, 0xF0, 0xE0);
    IndicatorRenderer(TreeTableModelAdapter treeTblAdapter, TreeTableModel treeTableModel) {
         setHorizontalAlignment(JLabel.RIGHT);
         setFont(new Font("serif", Font.BOLD, 12));
         this.treeTableModel = treeTableModel;
         this.treeTblAdapter = treeTblAdapter;
    * Invoked as part of DefaultTableCellRenderers implemention. Sets
    * the text of the label.
    public void setValue(Object value) {
    /* setText((value == null) ? "---" : formatter.format(value)); */
         setText((value == null) ? "---" : (String) value.toString());
    * Returns this.
    public Component getTableCellRendererComponent(JTable table,
    Object value, boolean isSelected, boolean hasFocus,
    int row, int column) {
         renderer = super.getTableCellRendererComponent(table, value, isSelected,
    hasFocus, row, column);
         lastRow = row;
         this.table = table;
              if(isSelected) {
                   doMask(hasFocus, isSelected);
              } else
              setBackground(table.getBackground());
    return renderer;
    * If the row being painted is also being reloaded this will draw
    * a little indicator.
    public void paint(Graphics g) {
         super.paint(g);
    private void doMask(boolean hasFocus, boolean selected) {
              maskBackground(hasFocus, selected);
    private void maskBackground(boolean hasFocus, boolean selected) {
              Color seed = null;
              seed = table.getSelectionBackground();
              Color color = seed;
              if (color != null) {
                   setBackground(
    new Color(0xF0, 0xCC, 0x92));
    // IndicatorRenderer.java END
    // JTreeTable.java BEGIN
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    import javax.swing.table.*;
    import java.awt.event.*;
    import java.util.EventObject;
    public class JTreeTable extends JTable {
    /** A subclass of JTree. */
    protected TreeTableCellRenderer tree;
    protected IndicatorRenderer indicatorRenderer = null;
    public JTreeTable(TreeTableModel treeTableModel) {
         super();
         // Creates the tree. It will be used as a renderer and editor.
         tree = new TreeTableCellRenderer(treeTableModel);
         TreeTableModelAdapter tdap = new TreeTableModelAdapter(treeTableModel, tree);
         // Installs a tableModel representing the visible rows in the tree.
         super.setModel(tdap);
         // Forces the JTable and JTree to share their row selection models.
         ListToTreeSelectionModelWrapper selectionWrapper = new
         ListToTreeSelectionModelWrapper();
         tree.setSelectionModel(selectionWrapper);
         setSelectionModel(selectionWrapper.getListSelectionModel());
         // Installs the tree editor renderer and editor.
         setDefaultRenderer(TreeTableModel.class, tree);
         setDefaultEditor(TreeTableModel.class, new TreeTableCellEditor());
         indicatorRenderer = new IndicatorRenderer(tdap, treeTableModel);     
         // No grid.
         setShowGrid(false);
         // No intercell spacing
         setIntercellSpacing(new Dimension(0, 0));     
         // And update the height of the trees row to match that of
         // the table.
         //if (tree.getRowHeight() < 1) {
         // Metal looks better like this.
         setRowHeight(20);
    public TableCellRenderer getCellRenderer(int row, int col) {
              if(col == 0)
              return tree;
              else
              return indicatorRenderer;     
    public void updateUI() {
         super.updateUI();
         if(tree != null) {
         tree.updateUI();
         // Do this so that the editor is referencing the current renderer
         // from the tree. The renderer can potentially change each time
         // laf changes.
         setDefaultEditor(TreeTableModel.class, new TreeTableCellEditor());
         // Use the tree's default foreground and background colors in the
         // table.
    LookAndFeel.installColorsAndFont(this, "Tree.background",
    "Tree.foreground", "Tree.font");
    public int getEditingRow() {
    return (getColumnClass(editingColumn) == TreeTableModel.class) ? -1 :
         editingRow;
    private int realEditingRow() {
         return editingRow;
    public void sizeColumnsToFit(int resizingColumn) {
         super.sizeColumnsToFit(resizingColumn);
         if (getEditingColumn() != -1 && getColumnClass(editingColumn) ==
         TreeTableModel.class) {
         Rectangle cellRect = getCellRect(realEditingRow(),
                             getEditingColumn(), false);
    Component component = getEditorComponent();
         component.setBounds(cellRect);
    component.validate();
    public void setRowHeight(int rowHeight) {
    super.setRowHeight(rowHeight);
         if (tree != null && tree.getRowHeight() != rowHeight) {
    tree.setRowHeight(getRowHeight());
    public JTree getTree() {
         return tree;
    public boolean editCellAt(int row, int column, EventObject e){
         boolean retValue = super.editCellAt(row, column, e);
         if (retValue && getColumnClass(column) == TreeTableModel.class) {
         repaint(getCellRect(row, column, false));
         return retValue;
    public class TreeTableCellRenderer extends JTree implements
         TableCellRenderer {
         /** Last table/tree row asked to renderer. */
         protected int visibleRow;
         /** Border to draw around the tree, if this is non-null, it will
         * be painted. */
         protected Border highlightBorder;
         public TreeTableCellRenderer(Tr

Maybe you are looking for

  • Link to collections in Adobe Acrobat 7.0 Professional

    I have lost the link to my collection of document in the organizer. I have check that the file is still present on my disk. How can I restore the link ? Hope you can help me.

  • Delete PO services automatically

    Hi all. I have a problem i hope someone can hep me with. I need to delete some services fra a PO, i tried to use batch input, but it works differently then when you do it manually, subscreens keep poping up, and the number depends on how many service

  • Problem of selecting combobox in JTable!!

    I click comboBox in jtable and choose one item then move mouse away and then click the comboBox again It turns out to be strange: the selectedItem of the comboBox changes the first item at once I refered to the demo "TableRenderDemo.java" in http://j

  • TechTool Pro 5 data recovery lets me search but not view or save

    I have booted from TechTool Pro 5 disk.  I'm trying to recover files, pics and such after having to reformat my mac.  I can see the files I'm looking for but I can't view, store or save them.  Am I missing a step?  I have an external drive attached t

  • PCIe SATA Cards for RAID for video: Seritek 2ME4-E vs Sonnet Tempo E4P

    Hey Folks, I'm just about to purchase bigger, faster RAID system for my video editing needs. I've already purchased 1TB Barracudas for the drives and I have decided on the Burly dual PM for the enclosure. http://www.burlystorage.com/ccp0-catshow/burl