Setting table cell data dynamically

All
If I have the server sending me data. And I want to lookup the row in a tableView to update it. When I try the following the screen does not refresh.
ObservableList<DataRow> dataList = getTable().getItems();
marketDataEvent.setNewValue(newValue);
Do I need to call refresh on the table?

No need. Found at the cells need to be set as SimpleDoubleProperty, and you need a getter on the SimpleDoubleProperty field.

Similar Messages

  • How to set table cell renderer in a specific cell?

    how to set table cell renderer in a specific cell?
    i want set a cell to be a button in renderer!
    how to do?
    any link or document can read>?
    thx!

    Take a look at :
    http://www2.gol.com/users/tame/swing/examples/SwingExamples.html
    It is very interesting, and I think your answer is here.
    Denis

  • Setting table cell background

    Friends,
    I have a JTable with 5 rows and 4 columns now I want to set the Background color of cells as I select the set of cells it changes the background color.
    the problem in the below code is I have to select the individual cells to set the bg. can anyone tell what I should add to set bg of all the selection + I am unable to see the cell selection.
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.table.AbstractTableModel;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    * This is like TableDemo, except that it substitutes a
    * Favorite Color column for the Last Name column and specifies
    * a custom cell renderer and editor for the color data.
    public class TestClass extends JPanel implements MouseListener {
         private boolean DEBUG = false;
         private JTable table;
         private Color defColor = Color.WHITE;
         private Color selColor = Color.GRAY;
         private Color[][] color = {
              {defColor, defColor, defColor, defColor, defColor},
              {defColor, defColor, defColor, defColor, defColor},
              {defColor, defColor, defColor, defColor, defColor},
              {defColor, defColor, defColor, defColor, defColor},
              {defColor, defColor, defColor, defColor, defColor}
         public TestClass() {
              super(new GridLayout(1,0));
              table = new JTable(new MyTableModel());
              table.setRowSelectionAllowed(false);
              table.setCellSelectionEnabled(true);
              table.addMouseListener(this);
              table.setPreferredScrollableViewportSize(new Dimension(500, 70));
              //Create the scroll pane and add the table to it.
              JScrollPane scrollPane = new JScrollPane(table);
              //Set up renderer and editor for the Favorite Color column.
              table.setDefaultRenderer(String.class,
                                             new ColorRenderer(color));
              //Add the scroll pane to this panel.
              add(scrollPane);
         class MyTableModel extends AbstractTableModel {
              private String[] columnNames = {"First Name",
                                                      "Favorite Color",
                                                      "Sport",
                                                      "# of Years",
                                                      "Vegetarian"};
              private Object[][] data = {
              public int getColumnCount() {
                   return columnNames.length;
              public int getRowCount() {
                   return data.length;
              public String getColumnName(int col) {
                   return columnNames[col];
              public Object getValueAt(int row, int col) {
                   return data[row][col];
               * JTable uses this method to determine the default renderer/
               * editor for each cell.  If we didn't implement this method,
               * then the last column would contain text ("true"/"false"),
               * rather than a check box.
              public Class getColumnClass(int c) {
                   return getValueAt(0, c).getClass();
              public boolean isCellEditable(int row, int col) {
                   return false;
              public void setValueAt(Object value, int row, int col) {
                   if (DEBUG) {
                        System.out.println("Setting value at " + row + "," + col
                                               + " to " + value
                                               + " (an instance of "
                                               + value.getClass() + ")");
                   data[row][col] = value;
                   fireTableCellUpdated(row, col);
                   if (DEBUG) {
                        System.out.println("New value of data:");
                        printDebugData();
              private void printDebugData() {
                   int numRows = getRowCount();
                   int numCols = getColumnCount();
                   for (int i=0; i < numRows; i++) {
                        System.out.print("    row " + i + ":");
                        for (int j=0; j < numCols; j++) {
                             System.out.print("  " + data[i][j]);
                        System.out.println();
                   System.out.println("--------------------------");
          * Create the GUI and show it.  For thread safety,
          * this method should be invoked from the
          * event-dispatching thread.
         private static void createAndShowGUI() {
              //Make sure we have nice window decorations.
              JFrame.setDefaultLookAndFeelDecorated(true);
              //Create and set up the window.
              JFrame frame = new JFrame("TableDialogEditDemo");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              //Create and set up the content pane.
              JComponent newContentPane = new TestClass();
              newContentPane.setOpaque(true); //content panes must be opaque
              frame.setContentPane(newContentPane);
              //Display the window.
              frame.pack();
              frame.setVisible(true);
         public static void main(String[] args) {
              //Schedule a job for the event-dispatching thread:
              //creating and showing this application's GUI.
              javax.swing.SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        createAndShowGUI();
         /* (non-Javadoc)
          * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
         public void mouseClicked(MouseEvent e) {
              if (table.getSelectedColumn() > 0) {
                   if (color[table.getSelectedRow()][table.getSelectedColumn()] == selColor) {
                        color[table.getSelectedRow()][table.getSelectedColumn()] = defColor;
                   } else {
                        color[table.getSelectedRow()][table.getSelectedColumn()] = selColor;
              } else {
              ((MyTableModel)table.getModel()).fireTableStructureChanged();
         /* (non-Javadoc)
          * @see java.awt.event.MouseListener#mouseEntered(java.awt.event.MouseEvent)
         public void mouseEntered(MouseEvent e) {
         /* (non-Javadoc)
          * @see java.awt.event.MouseListener#mouseExited(java.awt.event.MouseEvent)
         public void mouseExited(MouseEvent e) {
         /* (non-Javadoc)
          * @see java.awt.event.MouseListener#mousePressed(java.awt.event.MouseEvent)
         public void mousePressed(MouseEvent e) {
         /* (non-Javadoc)
          * @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
         public void mouseReleased(MouseEvent e) {
    import javax.swing.JLabel;
    import javax.swing.JTable;
    import javax.swing.border.Border;
    import javax.swing.table.TableCellRenderer;
    import java.awt.Color;
    import java.awt.Component;
    public class TableCellColorRenderer extends JLabel
                               implements TableCellRenderer {
        Color[][] colorBG = null;
        public TableCellColorRenderer(Color[][] color) {
            this.colorBG = color;
            setOpaque(true); //MUST do this for background to show up.
        public Component getTableCellRendererComponent(
                                JTable table, Object color,
                                boolean isSelected, boolean hasFocus,
                                int row, int column) {
              setBackground(colorBG[row][column]);
            return this;

    I would guess that it's because you set the background to Color.WHITE
    I'm not sure why you're passing in an array of Color objects ... typically you'd either pick the color based on the value of the cell, or use standard colors.
    Finally, your getTableCellRendererComponent() should check the isSelected argument, and use a different color to highlight the selection.

  • Setting Table Cell Renderer for a row or cell

    I need to make a JTable that has the following formats:
    Row 1 = number with no decimals and columns
    Row 2 = number with no decimals and columns
    Row 3 = percent with 4 decimals
    I can use a table cell renderer to set each COLUMN as one or the other formats like this:
    NumDispRenderer ndr = new NumDispRenderer();
    for(int i = 1;i<dates.size();i++) {
    table.getColumnModel().getColumn(i).setCellRenderer(ndr);
    Where NumDispRenderer is a class as follows:
    public class NumDispRenderer extends DefaultTableCellRenderer {
    public Component getTableCellRendererComponent (JTable table, Object value,boolean isSelected, boolean isFocused, int row, int column) {
    Component component = super.getTableCellRendererComponent (table,value,isSelected,isFocused,row,column);
    if (value != null && value instanceof Double) {
    DecimalFormat df = new DecimalFormat("###,###");
    String output = df.format(value);
    ((JLabel)component).setText(output);
    ((JLabel)component).setHorizontalAlignment(JLabel.RIGHT);
    } else {
    ((JLabel)component).setText(value == null ? "" : value.toString());
    return component;
    This is fine for the first two rows, but the third row (which is also an instance of Double) I would like to format differently.
    The tutorial and other postings have not given a solution to this problem. Any suggestions would be very appreciated.

    Hi,
    the method getTableCellRendererComponent() of your renderer gets the row as a parameter. So just create the label depending on that value. For 0<=row<=1 you create the label as is, and for row=2 you create another label with the Double formatted as you wish.
    Andre

  • Keep in  table cell data permanently

    Hi I have a table when i click on add button on the toolbar one empty row should be inserted in the table ok it was fine
    now i need to enter some data into the newly added row then i need to press save button of the tool bar that data should
    be saved in the database.
    In save button's actionperformed method i called like a method.
         first i put this code
    if (modelTable.getView().getCellEditor() != null) {
              modelTable.getView().getCellEditor().stopCellEditing();
              System.out.println("In side Stopcell editing method.");
    for stoping the cell edit before saving the data.
         activally i need object of ModelMode so i used this
    ModelModel saveModelModel =(ModelModel)modelTable.getModel().getValueAt(row,col);
    And also i tried like the following ways
         String name = (String)modelTable.getModel().getValueAt(row,col);
         Object name = modelTable.getModel().getValueAt(row,col);
    but what happened it shows typecasting exception.
    Because the data in the table cell was disappered when we click on save button. so i think maybe
    ModelModel saveModelModel =(ModelModel)modelTable.getModel().getValueAt(row,col);it was not able to catch the data.
    so any suggestion plz for keeping the data in the tablecell .Activally when ever i click any button on the table
    that cell data was vanished.
    If i use hardcoded data in place of getting datafrom the table it was working fine.
    saveButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent ev) {
                         System.out.println("Save");
                         /*if (modelTable.getView().getCellEditor() != null) {
                          modelTable.getView().getCellEditor().stopCellEditing();
                          System.out.println("In side Stopcell editing method.");
                          // this method will goto setValueAt() in dataTableModel. before going to down code.
                         int row = modelTable.getModel().getRowCount()-1;
                         int col = modelTable.getModel().getColumnCount()-1;
                         MakeController makeController = new MakeController(new MakeUI());
                       MakeModel makeModel= null;                 
                       if(makeUI.getMakeComboBox().getSelectedItem() instanceof  MakeModel)
                             System.out.println("casting worked !!!!!");
                             makeModel= (MakeModel)makeUI.getMakeComboBox().getSelectedItem();
                        else
                             System.out.println("Cast not working ");                   
                         SaveModel saveModelAction = new SaveModel(this);
                         modelValueObj = new ModelValue();
                         saveModelModel = new ModelModel();
                         if(makeModel!=null){
                       modelValueObj.setMake_id(makeModel.getMake_id());     
                         else {
                              System.out.println("Select Make");
                         System.out.println("Row "+ row);
                         //String name = (String)modelTable.getModel().getValueAt(row,0);
                         Object name = (Object)modelTable.getModel().getValueAt(row,0);
                         System.out.println("String ModelName "+name.toString());
                         saveModelModel =(ModelModel)modelTable.getModel().getValueAt(row,0);
                         //System.out.println("ModelName "+saveModelModel.getModel_name());
                         modelValueObj.setModel_id(new Long (108));
                         //modelValueObj.setMake_id(new Long (1001));
                         modelValueObj.setModel_name(saveModelModel.getModel_name());
                         //modelValueObj.setModel_name("M7");
                        modelValueObj.setDisplay_model(new Boolean(true));
                        modelValueObj.setDeleted(new Boolean(false));
                        saveModelAction.setSaveModelValue(modelValueObj);
                         saveModelAction.buildRequest();
                        saveModelAction.execute();
                         boolean result = saveModelAction.retrieveData();
                         /*if (modelTable.getView().getCellEditor() != null) {
                          modelTable.getView().getCellEditor().stopCellEditing();
                          System.out.println("In side Stopcell editing method.");
                          // this method will goto setValueAt() in dataTableModel. before going to down code.

    table.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);

  • How to control the force return in table cell data?

    I have some xml format files.When I import them into FrameMaker,They display as table data.but when the data is very long in table cell,I want to control the new line by myself.for example,I add some \r\n in my xml file data,then in FrameMaker,It can identify the \r\n, force return.In framemaker I don't know the actual symbol that means the newline.How Can I deal with the problem?thank you!

    Hi Russ,
    yes, but you have to agree that forcing a return in the SOURCE content is really not a wise thing to do - It would be better to break the content into multiple paragraphs or used an XSLT to determine the column width and insert your own breaks in a version of the XML for rendering in Frame. If, at a later date, your templates in Frame change to allow wider columns in your table, then you'd have to go back into the source code and change every occurrence of the c/r in the data - Yeuch! Better to transform the data once, before importing into Frame and then if the col-width changes it is a simple task to change the width in the XSLT - personally, I would make sure the EDD and DTD allows multi-lines in the table cell and then break-up the data to fit the table cell size in an XSLT before importing. Then you don't taint your source code...and it is quite easy to do this is an XSLT...

  • 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

  • Add Hyperlink to table cell content dynamically

    Hello,
              I have a xdp form created in Livecycle designer. We populate a table by dynamically merging XML to this xdp form uing livecycle FormServices.
    For example:
    the XML:
    <data>
    <person>
         <name> George</name>
         <age>11</age>
    </person>
    <person>
         <name> John</name>
         <age>30</age>
    </person>
    </data>
    populated in table of pdf:
    Name
    Age
    George
    11
    John
    30
    How do I add the hyper link to "George", "John" programmatically, so it can be link to some other URL.
    Thanks,
    Joanna

    So my table is like this:
    Product
    Price
    Apples
    1.29
    Oranges
    2.49
    Grapes
    1.99
    and my XML is like this:
    <
    Product ProductType="Apples">
    <URL>www.apples.com</URL>
    <Price>1.29</Price>
    </Product>
    <
    Product ProductType="Oranges"> 
    <URL>www.oranges.com</URL>
    <Price>2.49</Price>
    </Product>
    <
    Product ProductType="Grapes"> 
    <URL>www.grapes.com</URL>
    <Price>1.99</Price>
    </Product>
    What I want to do is populate the table from the XML file, and make the URL element be linked from the product name (Apples for instance) at runtime  when I fill the table.  Any ideas?

  • Table Cell Rendering dynamically

    Hi All,
    We have a requirement to develop an application which should populate table view dynamically with editable UI elements for the selected record and the other records should in viewable. Could you please guide me how to do the tale cell rendering in a table dynamically. I have used the below code but it is not working for me, please provide any suggestions to do any changes for the below code
    IWDTableStandardCell sCell = (IWDTableStandardCell) view.createElement(IWDTableStandardCell.class, null);
    sCell.setVariantKey("key");     
    IWDInputField inputeditor =(IWDInputField) view.createElement(
                             IWDInputField.class,null);
    inputeditor.bindValue(attrInfo);                         
    sCell.setEditor(inputeditor);
    column.setSelectedCellVariant(IPrivateABCView.IUserTabDataElement.KEY);
    column.addCellVariant(sCell);
    Regards
    Suresh

    Hi,
    Yeh you are correct, NULLs are also accepting. Could you please provide any solution for my requirement?
    Regards
    Suresh

  • Editing table cell data can be difficult

    There are times I click and click on a cell to get it to edit.  Is there any trick to making the cells more editable?  There are times I have to click 10 times to get the cell to edit.
    Matt
    Message Edited by mfitzsimons on 06-01-2006 12:28 PM
    Matthew Fitzsimons
    Certified LabVIEW Architect
    LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
    Attachments:
    profilesUpdateAll.vi ‏22 KB

    Hi matt,
    for me it works just fine (using LV 8.0.1). Maybe it's because you only have to click once (no dbl-click) and wait a bit, then it changes to editable. On Dbl-click, nothin happens.
    be cool.
    dave
    Greets, Dave

  • How to change Table Cell Field Type Dynamically?

    Hi All,
    I am fetching some news data from backend DB and displaying them in a WD Table. Now one News Item may or may not have a URL behind it. If I find the URL as null then I want to display the news as simple TextView otherwise as LinkToUrl. How can I change this input type dynamically for each row in the runtime?
    If I use LinkToUrl all the time then the items which has URL as null gets displayed as normal text, but they are of very faint color and I can not change the text design. Whether if I user TextView I can set some text design like Header2, Header 3 etc.
    Can anybody please help with some code block? My main requirement is how to change the table cell input type dynamically.
    Thanks in Advance.
    Shubhadip

    Hi Shubhadip,
    This is the sample code for creating and adding a table cell editor table dynamically.
    public static void wdDoModifyView
    (IPrivateDynamicTableCreationView wdThis, IPrivateDynamicTableCreationView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
    //@@begin wdDoModifyView
    /*** 1.Create Table **/
    IWDTable table =
    (IWDTable) view.createElement(IWDTable.class, "table1");
    table.setWidth("100%");
    table.setVisibleRowCount(data.length);
    /*** 2.Create nameColumn **/
    IWDTableColumn nameColumn =
    (IWDTableColumn) view.createElement(IWDTableColumn.class, "Name");
    IWDCaption colHeader =
    (IWDCaption) view.createElement(IWDCaption.class, "NameHeader");
    colHeader.setText("–¼‘O");
    nameColumn.setHeader(colHeader);
    IWDTextView nameViewer =
    (IWDTextView) view.createElement(IWDTextView.class, "NameViewer");
    nameViewer.bindText(nameAtt);
    IWDTableCellEditor editor = (IWDTableCellEditor) nameViewer;
    nameColumn.setTableCellEditor(editor);
    table.addColumn(nameColumn);
    IWDTableColumn nationalityColumn =
    (IWDTableColumn) view.createElement(
    IWDTableColumn.class,
    "Nationality");
    IWDTableCellEditor nationalityEditor =
    (IWDTableCellEditor) nationalityViewer;
    nationalityColumn.setTableCellEditor(nationalityEditor);
    table.addColumn(nationalityColumn);
    /** 3. Bind context to table **/
    table.bindDataSource(nodeInfo);
    //@@end
    Bala
    Kindly reward appropriate points.

  • Dynamic tables with data driven visibility of columns (XML).

    Hi
    I am trying to make a template in LiveCycle Designer (XDP) with a dynamic table, and with dynamic visibility of columns.
    I want the column visibility to be driven by the xml input.
    (There is no user input.)
    I want the columns to visible in the table only if one or more of the rows has a data cell with value in a spesific column. If not the entire column should dissappear from the generated pdf.
    If that is not possible, my alternative is so set a value in th XML file to hide a tables column. But how?
    I have no problems of making dynamic tables, that is solved.
    I only want to hide unused columns in a table, defined in the xml source file.
    Can anyone help?
    Borge

    Hi,
    The link is not working..
    Please provide a valid link.

  • Setting new cell variant for an alv table column

    Hi,
    I want to set a new cell variant for a column. Therefore I did the following steps:
    1. Create an object of CL_SALV_WD_CV_STANDARD
    2. SET_KEY( 'CELLVAR1 )
    3. set_cell_design([..]-goodvalue_medium )
    4. SET_EDITOR( lr_alv_input_field )
    After that I added the cell variant to the column by using the method "add_cell_variant".
    The last step is to call method SET_SELECTED_CELL_VARIANT.
    I checked my program by using get_selected_cell_variant( ) and the return string was okay.
    But when the table is displayed, the new cell variant isn't working. I defined an input field as the cell editor for my new cell variant but when the table is shown, it is just text - no input possible. In addition to that the selected cell design (goodvalue_medium , step 3) isn't working. So I think the cell variant is not used.
    Can you help me?
    Thanks & Regards,
    Hendrik

    Hi
    I wonder if you can help me please, I too am having issues implementing ALV cell changes in WDA?
    I am basically trying to dynamically change the individual color of a cell (not the entire column or row) dependant on certain criteria. I apologies but find that you are the closest resource for any potential information. Please see screen shot below.
    Currently my code is as follows:
    see: www.picasaweb.google.co.uk/dave.alexander69/Pictures#5244416971466907938
    data: lr_cv TYPE REF TO cl_salv_wd_cv_standard.
    loop at table 1 row data
            loop at table columns
              for the date columns only...
              IF <fs_column>-id(4) = 'CELL'.
               get and set column header dates from select option user input - done
                loop at table 2 row data (table 2 contains date ranges for row concerned)
                  MOVE: ls_zdata-variance TO lv_variance.
                  method 1 - as in sap press WD4A -:
                  lr_cv = cl_wd_table_standard_cell=>new_table_standard_cell(
                                                     view        = view
                                                    variant_key = lv_variance ).
                 as mentioned...
                  CREATE OBJECT lr_cv.
                  lr_cv->set_key( 'VARIANCE' ).
                  lr_cv->set_cell_design( '09' ).
                  lr_cv->set_editor( lr_input_field ).
                  lr_column->add_cell_variant( lr_cv ).
                  lr_column->set_cell_editor( lr_input_field ).
                  lr_column->set_sel_cell_variant_fieldname( 'VARIANCE' ).
                  lr_column->set_cell_design_fieldname( value = 'COLOR_CELL' ).
                  lr_field = lr_table->if_salv_wd_field_settings~get_field( <fs_column>-id ).
                  lr_field->if_salv_wd_sort~set_sort_allowed( abap_false ).
                  the only way I get cell coloring to work - but this is for entire column?
                  ls_zdata-color_cell = cl_wd_table_standard_cell=>e_cell_design-one.
                  MODIFY lt_zdata FROM ls_zdata..
                ENDLOOP.
              ENDIF.
              IF <fs_column>-id = 'COLOR_CELL'.
                CALL METHOD lr_column->set_visible( EXPORTING value = '00' ).
              ENDIF.
            ENDLOOP
          ENDLOOP.
    As you see I am in the dark a bit regarding cell variants and wonder if you can point me in a better direction.
    Many thanks for any help,
    Dave Alexander

  • How to get the data from a table cell

    Could somebody suggest me how I can get the data value from a table cell if I set that cell a Double object previously.
    Thanks very much

    Thanks for camickr's information.
    And thanks uhrand,
    I haven't got it sloved. I am sick on this problem.
    I have the methods to let the table editable. My tableModel code is from Sun Tutorial.
    It has the code like this:
    public int getColumnCount() {
                return columnNames.length;
             public int getRowCount() {
                return data.length;
              public String getColumnName(int col) {
                return columnNames[col];
             public Object getValueAt(int row, int col) {
                return data[row][col];
             * JTable uses this method to determine the default renderer/
             * editor for each cell.  If we didn't implement this method,
             * then the last column would contain text ("true"/"false"),
             * rather than a check box.
            public Class getColumnClass(int c) {
                return getValueAt(0, c).getClass();
             * Don't need to implement this method unless your table's
             * editable.
            public boolean isCellEditable(int row, int col) {
                //Note that the data/cell address is constant,
                //no matter where the cell appears onscreen.
                if (col < 1) {
                    return false;
                } else {
                    return true;
             * Don't need to implement this method unless your table's
             * data can change.
            public void setValueAt(Object value, int row, int col) {
                if (DEBUG) {
                    System.out.println("Setting value at " + row + "," + col
                                       + " to " + value
                                       + " (an instance of "
                                       + value.getClass() + ")");
                data[row][col] = value;
                fireTableCellUpdated(row, col);
                if (DEBUG) {
                    System.out.println("New value of data:");
                    printDebugData();
            public void printDebugData() {
                int numRows = getRowCount();
                int numCols = getColumnCount();
                for (int i=0; i < numRows; i++) {
                    System.out.print("    row " + i + ":");
                    for (int j=0; j < numCols; j++) {
                        System.out.print("  " + data[i][j]);
                    System.out.println();
                System.out.println("--------------------------");
            }

  • Auto update of time/date in a table cell in pages

    I used to be able to do this in older versions.
    In pages when I have a table cell with time/date I would like to have the current date show up every time I open the document. Not on every date in the document, but just in a set cell in a  table.

    Hi Brian,
    Use the NOW function.
    Menu > Insert > Formula > Edit Formula
    Regards,
    Ian.

Maybe you are looking for

  • FBL5N, query regading the SO n PO field in the report

    HI experts, #1 In the Transaction FBL5N, the report I have selected the Sales order and Purchase order in the lay out. When the report is run for any customer these both fields are empty. Infact all the order are created with reference to PO n then S

  • Mass deletion of Outbound deleveries

    Hi Can any one pls let me know if theres any transaction for mass deletion of Outbound deliveries? We have some 600 OBDs to be deleted. Jus want to know if theres any such trxn or we need to create a BDC prog for that? Thanks! BR, Sri..

  • How value determined for Inv offsetting line items

    Hi, I want to know the following for the reversal of Process Order for materials for which the price control is 'S'. How the value for GBB (Inventory offsetting) is determined. I have observed it taking the weighted rate of the (Summation of the Tota

  • Unable to make a connection to weblogic server 6.0

    I need urgent help on this: I have installed BEA weblogic server on my machine(Win2000). Following is the classpath: ClassPath=C:\Program Files\Exceed.nt\hcljrcsv.zip;C:\Program Files\Exceed.nt;c:\ jdk1.3.1\bin;.;c:\downloads;c:\downloads\weblogic510

  • Enhance UD connect Datasource

    Hi Experts, we are creating a UD connect Datasource based on a View which has 10 fields. Now we want to add an extra field in the Datasource which is not present in the View (which we are using to create the datasource), please advice how to achieve