Longtime bug: Table cell strokes disappearing

I was hoping this would be fixed in CS5, but apparently not.
I want a very simple table with just horizontal rules above each line. I want to set this as a cell style, so I can apply and unapply for maximum flexibility.
So this is what I want:
row 1, col 1     row 1, col 2   row 1, col 3
row 2, col 1     row 2, col 2   row 2, col 3
row 3, col 1     row 3, col 2   row 3, col 3
Here's what I do:
- I create a new table.
- I remove the ugly borders that are applied by default, and I save that as a new table style (because, apparently, I'm unable to overwrite the default style).
- I select the cells from the top row (or all rows or just one) and apply a top border of, say, 1 point. I save that as a cell style called "ruled."
- Problem is, when I try to apply this to a specific cell or row, the cell underneath loses its stroke. So if I apply the "ruled" style to row 2, col 2, the table looks like this:
row 1, col 1     row 1, col 2   row 1, col 3
row 2, col 1     row 2, col 2   row 2, col 3
row 3, col 1     row 3, col 2   row 3, col 3
When I check the cell style of row 3/col 2, the Cell Styles palette claims that it's the "ruled" style with no custom formatting. But the border says 0. When I double-check the cell style options, sure enough, it's supposed to be 1 point. So if I apply the style, it gets applied -- but, then, the cell beneath *that* one (if there is one) loses its stroke!
So every time I have to make a change, I have to apply the strokes all the way down the table.
Of course, this completely negates the advantage of having a style. If I have to manually apply and re-apply formatting for every cell, there is no point to having a style.
If I am doing this wrong, I'd love to know a solution. I've grappled with this for years, and I've always ended up abandoning styles, which should be one of the most powerful features.
As a corollary, I've occasionally tried alternating row strokes (using every line) for the table style, from which I've had mixed results. This would work in some cases, but I also sometimes want tables with only some columns ruled, like so:
row 1, col 1     row 1, col 2   row 1, col 3
row 2, col 1     row 2, col 2   row 2, col 3
row 3, col 1     row 3, col 2   row 3, col 3
I suppose I could override the cells in the non-ruled column with cell styles without rules, given that the cell styles function seems awfully good at making strokes disappear ...
Thanks for any help!

Yes, yes, yes! Thank you!
So I need to select top AND middle when applying the stroke, then redefine style if necessary. I guess, due to interface confusion, I was ignoring the middle stroke, thinking it was only for full table-level styling.
In the style options dialog for the Cell Styles, you don't even see a middle stroke. You only get middle strokes if you select the cell and use the stroke palette for local formatting.

Similar Messages

  • Setting table/cell strokes to overprint

    is there a way to ad line in following script to set cell strokes in overprint?
    this script has been very useful to me (thanks to Jongware (http://forums.adobe.com/message/2818852#2818852)) but it's missing the overprint feature for strokes.
    table = app.selection[0];
    if (table.hasOwnProperty("baseline"))
    table = table.parent;
    if (table instanceof Cell)
    table = table.parent;
    if (table instanceof Column)
    table = table.parent;
    if (table instanceof Row)
    table = table.parent;
    if (!(table instanceof Table))
    alert ("Echt niet in een tabel!");
    exit(0);
    color = table.cells[0].characters[0].fillColor;
    black = app.activeDocument.swatches.item("Black");
    table.cells.everyItem().properties = {
    topEdgeStrokeColor:color,
    bottomEdgeStrokeColor:color,
    leftEdgeStrokeColor:color,
    rightEdgeStrokeColor:color };
    for (aCell=0; aCell<table.cells.length; aCell++)
    if (table.cells[aCell].fillTint == 50)
      table.cells[aCell].fillColor = color;
    tia, Pascal

    Hey!
    It's easy to solve your problem.
    In red is what you have to add...
    table =  app.selection[0];
    if  (table.hasOwnProperty("baseline"))
    table = table.parent;
    if  (table instanceof  Cell)
    table = table.parent;
    if  (table instanceof  Column)
    table = table.parent;
    if (table instanceof Row)
    table = table.parent;
    if (!(table instanceof  Table))
    alert ("Echt niet in een tabel!");
    exit(0);
    color =  table.cells[0].characters[0].fillColor;
    black =  app.activeDocument.swatches.item("Black");
    table.cells.everyItem().properties  = {
    topEdgeStrokeColor:color,
    bottomEdgeStrokeColor:color,
    leftEdgeStrokeColor:color,
    rightEdgeStrokeColor:color,
    bottomEdgeStrokeOverprint:true,
    leftEdgeStrokeOverprint:true,
    rightEdgeStrokeOverprint:true,
    topEdgeStrokeOverprint:true};
    for (aCell=0;  aCell<table.cells.length; aCell++)
    if (table.cells[aCell].fillTint == 50)
       table.cells[aCell].fillColor = color;
    tomaxxi

  • ID5: Table cell strokes &!^@)ed up

    I'm trying to add a stroke to the top and bottom of a selection of cells. Sometime it works, sometimes it adds the stroke too all sides of all cells in the selection. What's going on? Even it I select just the bottom row and try to stroke the bottom I get tops and sides stroked, too. Also, the wrongly added stroke is the wrong weight (1 pt, instead of 0.5 pt). WTF x 2!
    I've tried using the Control panel and the Stroke panel. Makes no difference.
    This is extremely frustrating. What should be a simple process is taking a very long time to get right, adding strokes that shouldn't be added, then selectively removing them from individual cells.

    > Do you have a 1 pt. Table Border applied?
    No. No table border applied until I went in to selectively apply the strokes to selected cells. The Table Style I started from has no strokes.
    >If you turn off all Table Strokes, and then turn off all Cell Strokes, then apply the .5 pt. stroke to the desired cells, does that work?
    No. That's basically what I'm doing. I select a range of cells that have no strokes, neither between the cells nor around any side on the selection.
    >And when you apply the cell stroke, you only need to have the middle horizontal cell selected.
    No. I want to stroke the top of the selection and the bottom of the selection, so the middle segments are un-highlighted.

  • Table Cell Contents Disappears Please HELP!!!!

    PROBLEM: I have a different tables within different table cells in the Master table. One table per Master cell. Once I click on a table cell (0,0) and click on another table cell (1,1) the cell (0,0) blanks out. Likewise with other cells so that if I've click on all the cells in the Master Table and then clicked somewhere else all cell contents have disappeared.
    QUESTION: Do I need to call some UI refresh procedure????? I have a cell renderer which returns the table for each Master's Cell.
    I don't if this is clear but please help!
    Thanks

    Hi,
    the problem is that the DefaultCellEditor can't handle tables.
    So you have to write your CellEditor, which returns another table as Editor.
    class YourTableCellRenderer implements  TableCellRenderer{
        private  JTable table = new JTable();
        public Component getTableCellRendererComponent(JTable table,
                                                       Object value,
                                                       boolean isSelected,
                                                       boolean hasFocus,
                                                       int row,
                                                       int column){
             // set Data and Layout
             return table;
    }then set the Editor to your MasterTable (master) with.
    master.setCellEditor(TableCellEditor anEditor) or
    master.setDefaultEditor(Class columnClass,
                                 TableCellEditor editor);Hope this Helps.
    Michael

  • InDesign Table Cell Strokes not appearing perfect

    How do you get row and column strokes in a table to appear perfectly joined? When I choose "Column Strokes in Front" (Under Table Setup) i still see a tiny row stroke, and vice versus.. it's really visible in the PDF almost can't see it in InDesign though you can a little...

    Thank you, although I doubled and even tripled checked the blue highlighted cell option and they visibly appear to be selected and in blue color, but when printed not the case.
    This document is a product catalog, 50 plus pages and I have about 15 of those pages not showing the stroked edge. So that is why I thought, perhaps something was blocking the edge and arranged the table to the front with hopes of a difference, but that too failed. I am turning grey by the minute.

  • How can I make a table cell extend beyond the page?  The text disappears when the cell becomes larger than the page.

    How can I make a table cell extend beyond a page?  The text disappears when the cell becomes bigger than the page.  I want the table to continue to the next page.

    As a student, you might be able to get Office for Mac from the college bookstore at a substantial discount. Otherwise, I think your best option for documents that need to be shared with Office users is to get one of the free Office clones such as LibreOffice.

  • Read Only and HTML Table Cell Attributes

    Hi Guys,
    I believe i have come accross a bug - i'm been working on a form that can be filled out and printed - when going into print for sake of the output looking nice i set the form element to read-only.
    As soon as an element such as a drop down box, text feild, text area, etc which display as "[selected value]" in plain text in read only mode, are changed to the read only mode apex seem to ignore the html table cell attributes.
    For example i have a id number in the top left and then a version number in the top right. Both use a text feild; the top left uses 'width="100%"' for it's HTML Table Cell Attribute to push the right cell to the right. and the right cell has 'align="right"'. Now this works fine when read only is off... but as soon as read only is on, both the width and the alignment are totally ignored, and i can't find any sign of them in the code.
    Because this is for printing; using the "disable" on the form element instead of "read only" function, isn't appropriate as disabled will make the elements faded and hard to read when printed, and keeping the elements as is will allow the user to edit information on the print screen - which is not appropriate.
    Is this a bug? Will it be fixed soon? Is there any work around?
    Cheers,
    Alex

    Use the "Read Only Element Table Cell(s) Attributes" in the Read Only region of the Item edit form.
    Scott

  • Lines in shaded table cells do not render properly in pdf created in Word 2010

    When creating a pdf with shaded table cells using MS Word 2010; the black lines in the shaded table cells do not show up when looking at the page at a fit page view (anything under  around 60%). They print, they are there when I zoom in, but will not show up if you zoom out.
    I read a forum post in Adobe here which gave some really logical suggestions, but they didn't seem to work for everyone or the level of effort was not what i can put into it. I also tried some of those and variations of those; but they didn't seem to work.
    http://forums.adobe.com/thread/305508
    Did anyone come up with a solution? Some people were saying it's a bug in pdf software, if that is the case, has anyone heard of a resolution?
    I'm using Windows 7 and word 2010 btw, to create the pdf.
    Thanks!!

    Just as a test, have you tried the MS plugin for PDF creation? I have found with other versions of WORD and Acrobat that PDF Maker and the MS plugin can both fill in dots and dashes on vector graphics (basically what the border is) and yet it comes out correctly with printing to the Adobe PDF printer. Unfortunately I do not have a solution. In my case, it seemed to be related to the vector graphic itself (I could import it to InkScape or other vector graphic tool and save to EMF and it then worked fine. It may be something that MS themselves have messed up in OFFICE 2013. Good luck.

  • How to apply different CSS styles to different table cells?

    I have an h:dataTable table and I would like to apply different CSS styles to different table cells depending on their content. If I were doing JSP I would probably have a <c:if> test on the cells, and give them a style name depending on contents, and then define the styles in a separate style sheet. Is there a way in JSF to do the equivalent? Thanks.

    mitchgart wrote:
    BalusC wrote:
    How to achieve a cell-specific style is already answered in my 1st reply of this topic.That tells how to apply a style to the text (or other content) inside a cell but not how to apply a style to the <td> as a whole. It would work for something like text font or text color but not cell border.
    I'm thinking I can mark the content somehow and then have javascript traverse the DOM, find marked content, and traverse outward to the enclosing <td>. Is there a better way?BalusC already spoke about rowClasses and columnClass attributes, I assume those are insufficient.
    The Tomahawk dataTable component has the rowStyleClass and rowStyle attributes for assigning CSS to the HTML tr tag. One is allowed to reference the row data variable when assigning values to these. However, see https://issues.apache.org/jira/browse/TOMAHAWK-523 for workarounds to bugs in some implementations.
    The Tomahawk column component has the styleClass and style attributes for assigning CSS to the HTML td tag. These also may reference the row data variable.

  • Excel cell border disappears when converting to PDF (continued)

    Continuing from http://www.adobeforums.com/webx/.59b4dd40 which was archived already.
    I too am getting the problem in which Excel cell borders are disappearing from cells with a background color. Lowering the resolution to 300 dpi does not help.
    The borders are definitely disappearing. Printing the worksheet from Excel 2003 prints the cell borders. Printing the worksheet from the resulting PDF does not. I created the PDF using the Create PDF macro that Acrobat 9 adds to Excel.
    Here's the really odd thing: it only affects two adjacent cells in the same (first) row of the worksheet. Other cells with the same background color in the same columns or the same row are not affected, nor are the cells in other rows or columns.
    Copying similar cells that don't have the problem, then re-converting doesn't help.

    I just tested inserting a blank row 1 in the spreadsheet, moving the problem cells to C2 and D2, but the borders still disappear from those cells.
    Restoring back to C1 and D1, I note that if I copy the cell formats to other worksheets, the problem cells lose their borders on all worksheets.
    I then tested what happened if I specified No Color for C1 and D1. The problem transferred to cells G1 and H1, which had then become the first adjacent cells with background color.
    Restoring the background color to C1 and D1 transferred the problem back to C1 and D1, and removed the problem from G1 and H1.
    Next, I gave cell A1 a background color of white. This removed the problem from cells C1 and D1, and gave it to A1.
    Finally, I turned accessibility tagging off and that made the problem go away. However, I need tagging as we must post accessible documents.
    So now I have a consistent way to describe the problem: cell borders disappear from the first set of contiguous cells with background colors if tagging is turned on. I'm going to file this as a bug.
    Charles "Chas" Belov
    SFMTA Webmaster
    http://www.sfmta.com/webmaster

  • Robohelp HTML 9 hyperlinks in table cells help

    Hi,
    I'm creating a table in robohelp html 9 and adding hyperlinks in the table cells. If the hyperlink is the first word in that cell robohelp is adding styling code to the link eg <td><a href="#" style="color: #0000ff; text-decoration: underline; ">test</a></td>.
    If I add a link to the second word in a table cell the styling does not appear or even if I add a space before the link the code does not appear eg <td>&#160;<a href="#">test</a> </td>.
    The code appears when I flick between design and HTML views but it does not make any difference in which view I create the link.
    No matter how many times I delete this code is keeps coming back. Can  anyone please help me? Is there some default that gives this the styling  code?Does anyone else get this issue?
    A table with the different examples is below. It was created in design view by clicking table>insert table>OK. Links added by clicking the insert hyperlink button.
    <table style="border-collapse: separate; border-collapse: separate;" cellspacing="0"
             width="33.333%" border="1">
        <col style="width: 100%;" />
        <tr>
            <td><a href="#" style="color: #0000ff; text-decoration: underline; ">test
             that has the added code</a></td>
        </tr>
        <tr>
            <td>&#160;<a href="#">test with space in front of link</a> </td>
        </tr>
        <tr>
            <td><a href="#" style="color: #0000ff; text-decoration: underline; ">test</a></td>
        </tr>
        <tr>
            <td>A <a href="#">test</a> </td>
        </tr>
    </table>
    Thanks in advanced

    I have the same problem with those stupid links in tables - I've been working on this for HOURS and HOURS...... Based on previous experience, I assumed it must only be me and an ill-formed stylesheet. The table/link issue just came to my attention because I am in the process of changing styles/formats to a new company standard (new link color) and thought I really screwed my CSS up as I was changing things!
    My only workaround thusfar has been to rewrite some data in the tables so that text will precede the link (yes, I did).  And where I just couldn't do that, I resigned myself to the problem and forced a different color on the links (changing the #0000ff).  One plus was that RH didn't rewrite the color code once it was changed manually..... but then I realized later that I didn't consider the hover color when I did this, so I now have to go back and correct them. 
    So glad to find your post...........
    I played with the idea of adding hidden text, but was worried that the problem was really a result of an issue with my CSS and doing that wasn't the proper way to fix it.   So, without guilt, I took Rick's suggestion and added an invisible dot/period at the beginning of every link in a table, when that link is the first or only content in the td.  Did the trick!  Now the links assume my declared css style! 
    I submitted a bug report.......
    Thank you!!!

  • Table cell problem

    I have a table to hold a page together.
    one of my rows is split into 2 cells. one is supposed to be
    360 wide and the other 400. Table is 760 wide.
    For some reason the left hand cell which should be 360 has
    expanded out to 760. when i look at the table structure the green
    guide info says 360 (760). How has this happened and how can I
    change it. Every where i look nowhere shows the figures in the
    brackets.
    Any help would be appreciated as my right hand side cell has
    disappeared from the screen
    Stinkypitgirl

    And when you come back, please put on fresh socks... 8)
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "P@tty Ayers" <[email protected]>
    wrote in message
    news:[email protected]...
    > And then, go take a shower, please.
    >
    >
    > --
    > Patty Ayers | www.WebDevBiz.com
    > Free Articles on the Business of Web Development
    > Web Design Contract, Estimate Request Form, Estimate
    Worksheet
    > --
    >
    > "Murray *ACE*" <[email protected]>
    wrote in message
    > news:[email protected]...
    >> Read this -
    >>
    >>
    http://apptools.com/rants/spans.php
    >>
    >> Then post a link to the page that you have uploaded,
    and someone here can
    >> help you.
    >>
    >> --
    >> Murray --- ICQ 71997575
    >> Adobe Community Expert
    >> (If you *MUST* email me, don't LAUGH when you do
    so!)
    >> ==================
    >>
    http://www.dreamweavermx-templates.com
    - Template Triage!
    >>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >>
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    >> ==================
    >>
    >>
    >> "stinkypitgirl" <[email protected]>
    wrote in message
    >> news:[email protected]...
    >>>I have a table to hold a page together.
    >>>
    >>> one of my rows is split into 2 cells. one is
    supposed to be 360 wide
    >>> and the
    >>> other 400. Table is 760 wide.
    >>>
    >>> For some reason the left hand cell which should
    be 360 has expanded out
    >>> to
    >>> 760. when i look at the table structure the
    green guide info says 360
    >>> (760).
    >>> How has this happened and how can I change it.
    Every where i look
    >>> nowhere shows
    >>> the figures in the brackets.
    >>>
    >>> Any help would be appreciated as my right hand
    side cell has disappeared
    >>> from
    >>> the screen
    >>>
    >>> Stinkypitgirl
    >>>
    >>
    >>
    >
    >

  • Set text in table cell to bold

    I am trying to get the text in a table cell to alternate between plain and bold on a ctrl-click.
    The setFont() statements seeming have no effect.
    Can anyone help?
    Self Contained thing here:
    package boldTableCell;
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Font;
    import java.awt.Point;
    import java.awt.event.ActionEvent;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTable;
    import javax.swing.UIManager;
    import javax.swing.table.DefaultTableModel;
    public class MyTable extends JTable implements MouseListener {
         private boolean isBold = false;
         private String[] columnNames = {"First Name", "Last Name", "Sport", "# of Years", "Vegetarian"};
         private Object[][] data = {
                   {"Mary", "Campione", "Snowboarding", new Integer(5), new Boolean(false)},
                   {"Alison", "Huml", "Rowing", new Integer(3), new Boolean(true)},
                   {"Kathy", "Walrath", "Knitting", new Integer(2), new Boolean(false)},
                   {"Sharon", "Zakhour", "Speed reading", new Integer(20), new Boolean(true)},
                   {"Philip", "Milne", "Pool", new Integer(10), new Boolean(false)},
          * constructor
         public MyTable() {
              super();
              DefaultTableModel defaultTableModel = new DefaultTableModel(data, columnNames);
              this.setModel(defaultTableModel);
              this.setName("My Table");
              setListeners();
          * set listeners
         private void setListeners() {
              addMouseListener(this);
         // on ctrl-click in variable column, flip bold/not bold
         @Override
         public void mouseClicked(MouseEvent event) {
              System.out.println ("mouseClicked(): # of clicks: " + event.getClickCount());
              // ctrl -click
              if ((event.getModifiers() & ActionEvent.CTRL_MASK) > 0) {
                   System.out.println("ctrl-click");
                   Point point = event.getPoint();
                   int row = rowAtPoint(point);
                   int column = columnAtPoint(point);
                   // if not valid then return
                   if ( row < 0 || column < 0) {
                        return;
                   // if this click was on the variable column
                   if (column == 0) {
                        System.out.println("ctrl-click on column 0 ");
                        Component component = super.prepareRenderer(this.getCellRenderer(row, column), row, column);
                        // now get the current font used for this cell
                        Font font = component.getFont();
                        isBold = ! isBold; // flip boolean
                        if (isBold) {
                             System.out.println ("ctrl-click: bold: " + isBold);
                             component.setFont(font.deriveFont(Font.BOLD));
                             component.setForeground(getForeground()); // otherwise text disappears
                             //     (JLabel)t.getHeaderRenderer()).setFont(new Font(("Courier", Font.BOLD, 12));
                        else { // not bold
                             System.out.println ("ctrl-click: not bold: " + isBold);
                             component.setFont(font.deriveFont(Font.PLAIN));
                             component.setForeground(getForeground()); // otherwise text disappears
                        component.invalidate();
                        component.repaint();
                        this.invalidate();
                        this.repaint();
                   } // end if click on definition column
         } // end mouseClicked
         @Override
         public void mouseEntered(MouseEvent arg0) {
         @Override
         public void mouseExited(MouseEvent arg0) {
         @Override
         public void mousePressed(MouseEvent arg0) {
         @Override
         public void mouseReleased(MouseEvent arg0) {
          * @param args
         public static void main(String[] args) {
              try {
                   UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
              catch (Exception e){
                   e.printStackTrace();
              final JPanel jPanel = new JPanel();
              final MyTable myTable = new MyTable();
              jPanel.add(myTable);
              final JFrame frame = new JFrame();
              frame.add(jPanel, BorderLayout.CENTER);
              frame.setTitle("My Panel");
              frame.setPreferredSize(new Dimension(400, 150));
              frame.addWindowListener(new WindowAdapter(){
                   @Override
                   public void windowClosing(WindowEvent e) {
              frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              frame.setLocation(300, 200);
              frame.pack();
              frame.setVisible(true);
    }Edited by: allelopath on Jul 8, 2010 11:06 AM
    Edited by: allelopath on Jul 8, 2010 11:07 AM

    got it
    package boldTableCell;
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Font;
    import java.awt.Point;
    import java.awt.event.ActionEvent;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.util.ArrayList;
    import java.util.List;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTable;
    import javax.swing.UIManager;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.TableCellRenderer;
    public class MyTableWithCustomRenderer extends JTable implements MouseListener {
         private boolean isBold = false;
        private List<Boolean> isBoldList;
         private String[] columnNames = {"First Name", "Last Name", "Sport", "# of Years", "Vegetarian"};
         private Object[][] data = {
                   {"Mary", "Campione", "Snowboarding", new Integer(5), new Boolean(false)},
                   {"Alison", "Huml", "Rowing", new Integer(3), new Boolean(true)},
                   {"Kathy", "Walrath", "Knitting", new Integer(2), new Boolean(false)},
                   {"Sharon", "Zakhour", "Speed reading", new Integer(20), new Boolean(true)},
                   {"Philip", "Milne", "Pool", new Integer(10), new Boolean(false)},
          * constructor
         public MyTableWithCustomRenderer() {
              super();
              // initialize bold for each row to false
              isBoldList = new ArrayList<Boolean>(5);
              for (int row = 0; row < 5; row++) {
                   isBoldList.add(row, false);     
              DefaultTableModel defaultTableModel = new DefaultTableModel(data, columnNames);
              this.setModel(defaultTableModel);
              this.setName("My Table");
              setListeners();
          * set listeners
         private void setListeners() {
              addMouseListener(this);
         // on ctrl-click in column 0 , flip bold/not bold
         @Override
         public void mouseClicked(MouseEvent event) {
              // ctrl -click
              if ((event.getModifiers() & ActionEvent.CTRL_MASK) > 0) {
                   System.out.println("mouseClicked(): ctrl-click");
                   Point point = event.getPoint();
                   int row = rowAtPoint(point);
                   int column = columnAtPoint(point);
                   // if not valid then return
                   if ( row < 0 || column < 0) {
                        return;
                   // if this click was on column 0
                   if (column == 0) {
                        isBoldList.set(row, ! isBoldList.get(row)); // flip boolean for this row
                        this.invalidate();
                        this.repaint();
         } // end mouseClicked
         @Override
         public void mouseEntered(MouseEvent arg0) {
         @Override
         public void mouseExited(MouseEvent arg0) {
         @Override
         public void mousePressed(MouseEvent arg0) {
         @Override
         public void mouseReleased(MouseEvent arg0) {
        @Override
        public Component prepareRenderer (TableCellRenderer renderer,int row, int column) {
            Component component = super.prepareRenderer(renderer, row, column);
            // now get the current font used for this cell
            Font font = component.getFont();
            if (column == 0) {
                 if (isBoldList.get(row)) {
                      System.out.println ("prepareRenderer(): ctrl-click: bold: " + isBold);
                      component.setFont(font.deriveFont(Font.BOLD));
                      component.setForeground(getForeground()); // otherwise text disappears
                 else { // not bold
                      System.out.println ("prepareRenderer(): ctrl-click: not bold: " + isBold);
                      component.setFont(font.deriveFont(Font.PLAIN));
                      component.setForeground(getForeground()); // otherwise text disappears
              return component;
          * @param args
         public static void main(String[] args) {
              try {
                   UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
              catch (Exception e){
                   e.printStackTrace();
              final JPanel jPanel = new JPanel();
              final MyTableWithCustomRenderer myTable = new MyTableWithCustomRenderer();
              jPanel.add(myTable);
              final JFrame frame = new JFrame();
              frame.add(jPanel, BorderLayout.CENTER);
              frame.setTitle("My Panel - Custom Renderer");
              frame.setPreferredSize(new Dimension(400, 150));
              frame.addWindowListener(new WindowAdapter(){
                   @Override
                   public void windowClosing(WindowEvent e) {
              frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              frame.setLocation(300, 200);
              frame.pack();
              frame.setVisible(true);
    }Edited by: allelopath on Jul 8, 2010 2:07 PM

  • Link to Table cell content...

    Hi,
    I am Prashant.i am developing SDAP Portal.In that,I am populating data to the .NET SAP NwtWieaver Table control dynamically.I am also adding LinkToAction control to the table cell.I want some action should be carried out on clicking on that link.For that i am using LeadSelect event.
    Actually it works fine when i am putting data at design time by editing rows.But it does not work when i gather data from at run time.When i gather data at run time and when i click on some link,all the table data disappears.
    I can not understand why this is happened?. What properties should i set for the same.If any one knows, Please help me.
    Regards,
    Prashant J.

    Soory it is not SDAP.It is SAP....

  • Eliminate extra space in table cell

    I cannot figure out what is causing the appearance of extra
    space beneath the thumbnail images on the following webpage (this
    space is in between the image and the cellborder):
    http://www.canchair.com/new_web_product_detail.asp?ProductID=499&ProductFamily=5&ProductFa milySub=
    OR THE RELEVANT CODE CAN BE VIEWED AS FOLLOWS:
    HTML CODE FOR THE TABLE CELL CONTAINING THE EXTRA SPACE:
    <a href= "javascript:;" class="small_img" >
    <td class="small_img" onmouseover="showBigImage(
    'imagescript.asp?path=<%= images("url_img")
    %>&width=250','<%= images("url_img") %>','<%=
    images("alt_img") %>' )"> <img
    src="imagescript.asp?path=<%= images("url_img")
    %>&amp;width=36" border="0" /> </td>
    </a>
    small_img STYLE SHEET CODE:
    .small_img {
    margin: 0;
    border: 1px solid #A5ACB2;
    cursor: hand;
    padding: 0;
    .small_img:hover td{
    margin: 0;
    border: 1px solid #000000;
    cursor: hand
    .small_img:hover{
    color: red; /* Dummy definition to overcome IE bug */
    }

    View the page in Firefox, view source, and Go To Line will do
    the trick (in
    Firefox).
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "aonefun" <[email protected]> wrote in
    message
    news:gbp286$5vg$[email protected]..
    >I was asking how to know which line of my code the errors
    specified on
    >
    http://validator.w3.org/ are
    referring to. I assume the line numbering on
    > dw
    > would not correspond as a webpage strips the server side
    code.
    >

Maybe you are looking for

  • How do you [playback voice memos on iphone 5s

    I cannot playback voice memos.When I hit done it just continues recording

  • A good tutorial for Oracle BI Publisher

    Hi, I am new to BI Publisher. I'm using JDeveloper 10.1.3.2 and want to build reports in it. I found BI Publisher a good tool for building reports, based on its features on OTN and now I want a good working tutorial for using it. Is there anything? T

  • Bar code print  problem

    Hi friends,     Please don't tell me that "before posting the thread search in google" because i searched this thing and then i'm posting the thread. the problem is given below. I'm using the barcode "BC_CD39" it displays in print preview but in prin

  • Dell Webcam Central Download for Vista

    I am unable to get download this software after following Dell's Instructions on their website. Just recovered one of my older computers from a bad crash and would like to get this up and running.  Does anyone know where I can get a direct download f

  • Com.apple.mdworker.pool.0: I/O error : encoder error on new Retina MBP

    Why does the system log show lots and lots (i.e. once per second) of this error? How do I stop it? Cheers