How to force update jtable display

I am trying to add some filtering funtionality to my swing application that uses a JTable. What I do is to filter the JTable's datamodel, and call repaint() on the jtable and JPanel, and do jframe.pack(); Sometimes it works, sometimes it doesn't. I check the jtable model, and it is being updated properly. I guess it is a GUI update problem. Is there a better way to force the whole app's GUI to be updated?
//update tableModel
//repaint() jtable;
//repaint() jpanel;
jf.pack();

A couple questions
1. Did you write your own table model? Not calling fireTableDataChanged() can cause problems in this case.
2. Do you update the table from a thread? You might need to put the updates on the event thread (SwingUtilities.invokeNoow() or invokeLater()) or manually call fireTableDataChanged() (I'm not sure if this needs to happen on the event thread)

Similar Messages

  • How do I update my Display Driver

    How do I update my Display Driver for Mac Book Pro 15" using NIVIDIA GeForce GT 330M.
    ADOBE PHOTOSHOP crashes as the GPU is invalid.

    Try forcing the 2nd GPU using GFX CardStatus.
    Absolutely no idea if that will even work / make a difference, but it would be interesting.

  • How to auto update JTable during runtime

    Can anyone tell me how to dynamically update a JTable during execution, what i mean isin the I want the table to automatically add new rows as i enter new data.
    if I pass the object array reference of the TableModel to a method, then add more objects to the array and the revalidate the JTable will it work, or how do I do it ? Thanks

    Your table model should extend AbstractTableModel. And when (for example) it adds a row to whatever data structure is supporting the model, it should call fireTableRowsInserted... you can find out more about those methods in the API documentation. You don't need to revalidate or invalidate or validate the JTable, at least I don't have that in my code anywhere.

  • How to force duplicate row display automatically

    In answers, we have one table that has duplicate data. The only thing different between some rows is the ROWID. When use user requests data, Answers automatically suppresses the duplicate rows. How can I force answers to display all rows and not suppress duplicate values?
    For example - db table contains
    COL-A COL-B COL-C
    ABC 3 5
    DEF 2 1
    DEF 2 1
    When adding COL A, B, and C to a report - Answers will display:
    ABC 3 5
    DEF 2 1
    How do I get answers to display
    ABC 3 5
    DEF 2 1
    DEF 2 1
    automatically?
    Thanks!

    I did as instructed - remove the check for DISTINCT_SUPPORTED from all DATABASE connections, saved the repository and recycled BI server and Presentation services. Unfortunately, there was no impact to suppression.
    My DB is Oracle 10.2.0.4 on Windows 2003.
    In addition, we have the following connection strings in place to allow for case-insensitive searches:
    alter session set NLS_SORT=BINARY_CI
    alter session set NLS_COMP=LINGUISTIC

  • How to dynamically update JTable

    My application gets results from database as a set of resultsets. I display these results in a table. But generally stored procedure used used takes alot of time to get the full set of result sets. So this at times is annoying for user to wait for all the result when it could be much better if i could display results as and when recieved. For this i add the data recieved to the data vector and then call fireTableRowsInserted() on its model. which should update its view but this does not happen. Can someone advise me on how to achieve this.
    greetings.

    Your table model should extend AbstractTableModel. And when (for example) it adds a row to whatever data structure is supporting the model, it should call fireTableRowsInserted... you can find out more about those methods in the API documentation. You don't need to revalidate or invalidate or validate the JTable, at least I don't have that in my code anywhere.

  • JProgressBar Shows Up Too Late--How Do I Update the Display Immediately?

    My application has a split pane, the bottom page of which is a panel containing an image that takes a long time to load. For that reason, I want the bottom pane to be a panel with a progress bar until the image is ready.
    Here's a simple version of my code:
    JPanel progressBarPanel = new JPanel();
    JProgressBar progressBar = new JProgressBar(0, 1);
    progressBar.setIndeterminate(true);
    progressBarPanel.add(progressBar);
    splitPane.setBottomComponent(progressBarPanel);  // line A
    splitPane.invalidate();
    JPanel imagePanel = createImagePanelSlowly();  // line B
    splitPane.setBottomComponent(imagePanel);
    splitPane.invalidate();However, this doesn't work; the display isn't updated until the image is ready. What do I need to put in between lines A and B so that the progress bar shows up before line B starts executing? I've tried validate(), repaint(), using threads and setting the size of the frame to zero and back again, but none of those seem to work. If I pop up a dialog after I add the progress bar to the split pane, the progress bar shows up as soon as the dialog shows up.
    This code is inside a ListSelectionListener on a table elsewhere on the GUI, in case that's relevant.
    I think I don't understand some basic principle about how to get the GUI to be updated immediately after I make some change.

    As suggested, I have prepared a compilable demonstration. I figured out that the
    problem I was having before was that I was trying to join the background and
    event-processing threads (I had been using threads, but I didn't show that code in the
    version I posted since it didn't seem to matter). After I eliminated the join, the progress
    bar is displayed, but the user can do other things while the image is loading. I want to
    prevent the user from doing that. I switched the cursor to a wait cursor, but that doesn't
    seem to prevent it.
    In particular, while it is loading, the user should be able to:
    * resize the window
    * minimize the window and bring it back up
    * ideally, adjust the split pane, but that isn't critical
    but NOT:
    * select a different row in the table
    * sort the table
    * use the menus
    Any attempt by the user to perform the disallowed actions should have no effect either
    while the image is loading or after it has finished.
    (That is, the disallowed events should not simply be queued for later.)
    I wonder if there is a simple way to accomplish that.
    Here is a demo (3 classes):
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Cursor;
    import java.awt.Font;
    import java.awt.GraphicsEnvironment;
    import java.awt.Rectangle;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.util.Enumeration;
    import java.util.Vector;
    import javax.swing.Box;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JMenu;
    import javax.swing.JMenuBar;
    import javax.swing.JMenuItem;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import javax.swing.JProgressBar;
    import javax.swing.JScrollPane;
    import javax.swing.JSplitPane;
    import javax.swing.JTable;
    import javax.swing.ListSelectionModel;
    import javax.swing.UIManager;
    import javax.swing.border.Border;
    import javax.swing.border.EtchedBorder;
    import javax.swing.event.ListSelectionEvent;
    import javax.swing.event.ListSelectionListener;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.TableColumn;
    * <p>Copyright (C) 2006
    * <p>All rights reserved.
    public class DisableGUIDemo extends JFrame {
         static final Rectangle SCREEN_SIZE = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds();
         static final Color HYACINTH = new Color(160, 96, 192);
         static final Color LAVENDER = new Color(224, 208, 232);
         Vector<Vector<String>> demoTableData = new Vector<Vector<String>>();
         Vector<String> demoColumnNames = new Vector<String>();
         protected JTable dataTable;
         protected JScrollPane tablePane;
         protected JSplitPane mainPane;
         protected JPanel imageArea;
         private DefaultTableModel dataModel;
          * This creates a new <code>DisableGUIDemo</code> instance, builds the UI
          * components and displays them.
         private DisableGUIDemo(){
              super();
              setTitle("Demo");
              // Ugly:  Initialize the table with demo data.
              Vector<String> demoTableFirstRow = new Vector<String>();
              demoTableFirstRow.add("18");
              demoTableFirstRow.add("13");
              demoTableFirstRow.add("11");
              demoTableFirstRow.add("19");
              demoTableFirstRow.add("19");
              demoTableData.add(demoTableFirstRow);
              Vector<String> demoTableSecondRow = new Vector<String>();
              demoTableSecondRow.add("5");
              demoTableSecondRow.add("3");
              demoTableSecondRow.add("4");
              demoTableSecondRow.add("1");
              demoTableSecondRow.add("3");
              demoTableData.add(demoTableSecondRow);
              Vector<String> demoTableThirdRow = new Vector<String>();
              demoTableThirdRow.add("11");
              demoTableThirdRow.add("12");
              demoTableThirdRow.add("10");
              demoTableThirdRow.add("18");
              demoTableThirdRow.add("18");
              demoTableData.add(demoTableThirdRow);
              demoColumnNames.add("Column 0");
              demoColumnNames.add("Column 1");
              demoColumnNames.add("Column 2");
              demoColumnNames.add("Column 3");
              demoColumnNames.add("Column 4");
              dataModel = new DefaultTableModel(demoTableData, demoColumnNames);
              initialize(); 
          * The <code>initialize</code> method builds and displays up the GUI.
         private void initialize() {
              addWindowListener(new WindowAdapter()  {
                        public void windowClosing(WindowEvent e)  {
                             System.exit(0);
              // Build the GUI panels.
              setJMenuBar(menuBar());
              createSplitPane(true);
              setLocation(SCREEN_SIZE.x, SCREEN_SIZE.y);
              setSize(SCREEN_SIZE.width, SCREEN_SIZE.height - 20);
              setVisible(true); 
          * This creates and returns the menu bar.  The actions to take in response to menu-option selections are
          * specified here.
          * @return the menu bar
         private JMenuBar menuBar(){
              JMenuBar menuBar = new JMenuBar();
              JMenu fileMenu = new JMenu("File");
              fileMenu.setFont(fileMenu.getFont().deriveFont(10.0f));
              JMenuItem reset = new JMenuItem("Reset");
              reset.setFont(reset.getFont().deriveFont(10.0f));
              reset.addActionListener(new ActionListener(){
                        // When the user resets the display, the configuration panel is recreated.
                        public void actionPerformed(ActionEvent e){
                             dataModel = new DefaultTableModel(demoTableData, demoColumnNames);
                             createSplitPane(true);
                             int oldWidth = getWidth();
                             int oldHeight = getHeight();
                             setSize(0, 0);
                             setSize(oldWidth, oldHeight);
                             repaint();
                             JOptionPane.showMessageDialog(DisableGUIDemo.this,
                                                                                                        "The display should be reset.",
                                                                                                        "Reset",
                                                                                                        JOptionPane.PLAIN_MESSAGE);
              fileMenu.add(reset);
              fileMenu.addSeparator();
              JMenuItem saveTable = new JMenuItem("Save Table");
              saveTable.setFont(saveTable.getFont().deriveFont(10.0f));
              saveTable.setEnabled(false);
              fileMenu.add(saveTable);
              menuBar.add(fileMenu);
              menuBar.add(Box.createHorizontalGlue());
              JMenu helpMenu = new JMenu("Help");
              helpMenu.setFont(helpMenu.getFont().deriveFont(10.0f));
              JMenuItem help = new JMenuItem("Documentation");
              help.setFont(help.getFont().deriveFont(10.0f));
              help.addActionListener(new ActionListener(){
                        public void actionPerformed(ActionEvent e){
                             JOptionPane.showMessageDialog(DisableGUIDemo.this, "There is no documentation available for the demo.");
              helpMenu.add(help);
              menuBar.add(helpMenu);
              return menuBar;
          * The <code>createSplitPane</code> method creates the table and image area and displays them in a split pane.
          * @param createNewTable whether to create a new table (should be false if the table has already been created)
         private void createSplitPane(boolean createNewTable){
              if (createNewTable){
                   dataTable = dataTable();
                   tablePane = new JScrollPane(dataTable);
                   Border etchedBorder = new EtchedBorder(EtchedBorder.RAISED, LAVENDER, HYACINTH);
                   tablePane.setBorder(etchedBorder);
              int tablePaneWidth = tablePane.getPreferredSize().width;
              int selectedRow = dataTable.getSelectedRow();
              imageArea
                   = (selectedRow == -1)
                   ? new JPanel()
                   : imageArea((String) dataTable.getValueAt(selectedRow, 0),
                                                 (String) dataTable.getValueAt(selectedRow, 2));
              imageArea.setMinimumSize(imageArea.getPreferredSize());
              mainPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, tablePane, imageArea);
              getContentPane().removeAll();
              getContentPane().add(mainPane);
          * The <code>dataTable</code> method returns the data table.
          * @return the data table
         private JTable dataTable(){
              JTable table = new JTable(dataModel);
              table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
              ListSelectionModel rowSM = table.getSelectionModel();
              rowSM.addListSelectionListener(new ListSelectionListener() {
                        public void valueChanged(ListSelectionEvent e) {
                             if (e.getValueIsAdjusting()){
                                  return;  // Ignore extra events.
                             ListSelectionModel lsm =
                (ListSelectionModel) e.getSource();
                             if (! lsm.isSelectionEmpty()){
                                  final int selectedRow = dataTable.getSelectedRow();
                                  setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
                                  JPanel progressBarPanel = new JPanel();  // This should have a border layout.
                                  JProgressBar progressBar = new JProgressBar(0, 1);
                                  progressBar.setIndeterminate(true);
                                  progressBarPanel.add(progressBar);
                                  mainPane.setBottomComponent(progressBarPanel);
                                  mainPane.invalidate();
                                  mainPane.validate();
                                  Thread backgroundThread = new Thread(){
                                            public void run(){
                                                 JPanel imageDisplay = imageArea((String) dataTable.getValueAt(selectedRow, 0),
                                                                                                                                 (String) dataTable.getValueAt(selectedRow, 2));
                                                 mainPane.setBottomComponent(imageDisplay);
                                                 mainPane.invalidate();
                                                 setCursor(null);
                                  backgroundThread.start();
                                  // The following code, before being commented out, caused the GUI to be unresponsive while the image was
                                  // being loaded.  However, without it, the user can do other things while the image is loading, which is
                                  // not desired.
    //                               try{
    //                                    backgroundThread.join();
    //                               catch (InterruptedException ie){
    //                                    // N/A
              if (dataModel != null){
                   table.sizeColumnsToFit(-1);
                   table.getTableHeader().setReorderingAllowed(false);
                   SpecialHeaderRenderer headerRenderer = new SpecialHeaderRenderer(this);
                   SpecialCellRenderer bodyCellRenderer = new SpecialCellRenderer();
                   int i = 0;
                   for (Enumeration<TableColumn> columns = table.getColumnModel().getColumns(); columns.hasMoreElements(); /** */){
                        int columnWidth = 0;
                        TableColumn nextColumn = columns.nextElement();
                        nextColumn.setHeaderRenderer(headerRenderer);
                        nextColumn.setCellRenderer(bodyCellRenderer);
                        nextColumn.sizeWidthToFit();
                        Component comp = headerRenderer.getTableCellRendererComponent(table, nextColumn.getHeaderValue(),
                                                                                                                                                                                   false, false, 0, 0);
                        columnWidth = comp.getPreferredSize().width;
                        for (int j = 0; j < dataModel.getRowCount(); j++){
                             comp = table.getCellRenderer(j, i).getTableCellRendererComponent(table, dataModel.getValueAt(j, i),
                                                                                                                                                                                              false, false, j, i);
                             columnWidth = Math.max(comp.getPreferredSize().width, columnWidth);
                        nextColumn.setPreferredWidth(columnWidth);
                        nextColumn.setMinWidth(columnWidth);
                        i++;
              return table;
          * The <code>imageArea</code> method returns a panel in which an image is shown in the real application.
          * In the demo application, it is replaced by a text label; an artificial delay is used to simulate the
          * delay that would occur during image loading.  The image is loaded when the user selects a row in the table.
          * @param parameter1 a parameter to image creation
          * @param parameter2 a parameter to image creation
          * @return a panel in which a text label stands in for an image
         private JPanel imageArea(String parameter1, String parameter2){
              try{
                   Thread.sleep(3000);
              catch (InterruptedException ie){
                   // N/A
              JPanel imagePanel = new JPanel();
              JLabel substituteLabel = new JLabel("Image for " + parameter1 + ", " + parameter2);
              imagePanel.add(substituteLabel);
              return imagePanel;
          * @param args
         public static void main (String[] args) {
              UIManager.put("Table.font", new Font("DialogInput", Font.PLAIN, 10));
              UIManager.put("Label.font", new Font("Dialog", Font.BOLD, 10));
              UIManager.put("TextField.font", new Font("DialogInput", Font.PLAIN, 10));
              UIManager.put("ComboBox.font", new Font("Dialog", Font.BOLD, 10));
              UIManager.put("Button.font", new Font("Dialog", Font.BOLD, 10));
              UIManager.put("List.font", new Font("Dialog", Font.BOLD, 10));
              try {           
                   new DisableGUIDemo();
              catch (Throwable e) {
                   e.printStackTrace();
                   System.exit(0);
         } // end of main ()
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Font;
    import java.awt.GridBagLayout;
    import java.awt.GridBagConstraints;
    import java.awt.GridLayout;
    import java.awt.Insets;
    import java.awt.Rectangle;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import java.util.Comparator;
    import java.util.TreeSet;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import javax.swing.JTable;
    import javax.swing.SwingConstants;
    import javax.swing.UIManager;
    import javax.swing.border.EmptyBorder;
    import javax.swing.table.TableCellRenderer;
    * <p>Copyright (C) 2006
    * <p>All rights reserved.
    public class SpecialHeaderRenderer extends JPanel implements TableCellRenderer {
         static final Color MAUVE = new Color(192, 160, 208);
         static final Insets ZERO_INSETS = new Insets(0, 0, 0, 0);
         static final EmptyBorder EMPTY_BORDER = new EmptyBorder(ZERO_INSETS);
         private GridBagConstraints constraints = new GridBagConstraints();
         final TreeSet<MouseEvent> processedEvents = new TreeSet<MouseEvent>(new Comparator<MouseEvent>(){
              public int compare(MouseEvent o1, MouseEvent o2){
                   return o1.hashCode() - o2.hashCode();
         final private JFrame owner;
      public SpecialHeaderRenderer(JFrame ownerWindow) {
        setOpaque(true);
        setForeground(Color.BLACK);
              setBackground(MAUVE);
        setBorder(UIManager.getBorder("TableHeader.cellBorder"));
              setLayout(new GridBagLayout());
              constraints.fill = GridBagConstraints.NONE;
              constraints.gridx = 0;
              setAlignmentY(Component.CENTER_ALIGNMENT);
              owner = ownerWindow;
      public Component getTableCellRendererComponent(final JTable table, Object value, boolean isSelected,
                                                                                                                             boolean hasFocus, int row, final int column){
              if (table != null){
                   removeAll();
                   String valueString = (value == null) ? "" : value.toString();
                   JLabel title = new JLabel(valueString);
                   title.setHorizontalAlignment(SwingConstants.CENTER);
                   title.setFont(title.getFont().deriveFont(12.0f));
                   constraints.gridy = 0;
                   constraints.insets = ZERO_INSETS;
                   add(title, constraints);
                   final JPanel buttonPanel = new JPanel();
                   buttonPanel.setLayout(new GridLayout(1, 2));
                   buttonPanel.setAlignmentX(Component.CENTER_ALIGNMENT);
                   buttonPanel.setBackground(MAUVE);
                   final JButton sortAscendingButton = new JButton("V");
                   sortAscendingButton.setMargin(ZERO_INSETS);
                   sortAscendingButton.setBorder(EMPTY_BORDER);
                   constraints.gridy = 1;
                   constraints.insets = new Insets(5, 0, 0, 0);
                   buttonPanel.add(sortAscendingButton);
                   final JButton sortDescendingButton = new JButton("^");
                   sortDescendingButton.setMargin(ZERO_INSETS);
                   sortDescendingButton.setBorder(EMPTY_BORDER);
                   buttonPanel.add(sortDescendingButton);
                   add(buttonPanel, constraints);
                   table.getTableHeader().addMouseListener(new MouseAdapter(){
                             public void mouseClicked(MouseEvent e) {
                                  Rectangle panelBounds = table.getTableHeader().getHeaderRect(column);
                                  Rectangle buttonPanelBounds = buttonPanel.getBounds();
                                  Rectangle buttonBounds = sortAscendingButton.getBounds();
                                  buttonBounds.translate(buttonPanelBounds.x, buttonPanelBounds.y);
                                  buttonBounds.translate(panelBounds.x, panelBounds.y);
                                  if (buttonBounds.contains(e.getX(), e.getY()) && processedEvents.add(e)){
                                       // The click was on this button and has not yet been processed.
                                       JOptionPane.showMessageDialog(owner,
                                                                                                                  "The table would be sorted in ascending order of column " + column + ".",
                                                                                                                  "Sorted Ascending",
                                                                                                                  JOptionPane.PLAIN_MESSAGE);
                                       table.invalidate();
                                       table.revalidate();
                                       table.repaint();
                                  buttonBounds = sortDescendingButton.getBounds();
                                  buttonBounds.translate(buttonPanelBounds.x, buttonPanelBounds.y);
                                  buttonBounds.translate(panelBounds.x, panelBounds.y);
                                  if (buttonBounds.contains(e.getX(), e.getY()) && processedEvents.add(e)){
                                       // The click was on this button and has not yet been processed.
                                       JOptionPane.showMessageDialog(owner,
                                                                                                                  "The table would be sorted in descending order of column " + column + ".",
                                                                                                                  "Sorted Descending",
                                                                                                                  JOptionPane.PLAIN_MESSAGE);
                                       table.invalidate();
                                       table.revalidate();
                                       table.repaint();
              return this;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Font;
    import java.awt.GridLayout;
    import java.util.HashMap;
    import javax.swing.BorderFactory;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JTable;
    import javax.swing.SwingConstants;
    import javax.swing.border.EmptyBorder;
    import javax.swing.border.LineBorder;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.TableCellRenderer;
    * <code>SpecialCellRenderer</code> is the custom renderer for all
    * rows except the header row.
    * <p>Copyright (C) 2006
    * <p>All rights reserved.
    public class SpecialCellRenderer extends JPanel implements TableCellRenderer {
         protected Color backgroundColor = Color.PINK; // This means the rows for the first row will be white.
         protected HashMap<Object, Color> rowColors = new HashMap<Object, Color>();
      public SpecialCellRenderer(){
        setOpaque(true);
        setForeground(Color.BLACK);
              setBackground(Color.WHITE);
              setFont(new Font("Monospaced", Font.PLAIN, 10));
              setAlignmentX(Component.RIGHT_ALIGNMENT);
              setBorder(new EmptyBorder(0, 2, 0, 2));
      public Component getTableCellRendererComponent(final JTable table, Object value, boolean isSelected,
                                                                                                                             boolean hasFocus, final int row, final int column){
              String columnName = table.getColumnName(column);
              JLabel text = new JLabel();
              text.setOpaque(true);
              if (table != null){
                   DefaultTableModel model = (DefaultTableModel) table.getModel();
                   if (model == null){
                        System.out.println("The model is null!!");
                        System.exit(1);
                   if (table.isCellSelected(row, column)){
                        setBorder(BorderFactory.createMatteBorder((column < 2) ? 0 : 1,
                                                                                                                                 (column == 2) ? 1 : 0,
                                                                                                                                 (column < 2) ? 0 : 1,
                                                                                                                                 (column == table.getColumnCount() - 1) ? 1 : 0,
                                                                                                                                 Color.BLUE));
                   else{
                        setBorder(BorderFactory.createEmptyBorder());
                   final String rowIdentifier = (String) model.getValueAt(row, 0);
                   if (! rowColors.containsKey(rowIdentifier)){
                        rowColors.put(rowIdentifier, nextBackgroundColor());
                   text.setBackground(rowColors.get(rowIdentifier));
                   text.setFont(getFont().deriveFont(Font.PLAIN));
                   String valueString = (value == null) ? "" : value.toString();
                   text.setText(valueString);
                   try{
                        Double.parseDouble(valueString);
                        text.setHorizontalAlignment(SwingConstants.TRAILING);
                   catch (NumberFormatException nfe){
                        text.setHorizontalAlignment(SwingConstants.LEADING);
                   setLayout(new GridLayout(1, 1));
                   removeAll();
                   add(text);
                   setBackground(text.getBackground());
                   if (table.getRowHeight() < getMinimumSize().height){
                        table.setRowHeight(getMinimumSize().height);
              return this;
         protected Color nextBackgroundColor(){
              backgroundColor = backgroundColor.equals(Color.WHITE) ? Color.PINK : Color.WHITE;
              return backgroundColor;
    }

  • List View: How to force update of *actual* file dates when sort by date?

    List View: How do I force and update of actual file dates when sort by date?
    When I go in, I often see the sort order and dates from 12-15 hours ago!
    not good

    Hi, did you ever get that Windows® Sharing thing worked out?
    On this problem, If it's just that you need the Finder to wake up to the fact that it needs to update the window give a try with Refresh Finder - 1.3...
    http://www.versiontracker.com/dyn/moreinfo/macosx/33066

  • How to force updates on all platforms?

    I've noticed in recent months that some new contacts are not being propagated through to my MacBook Pro and my iPhone 5. I've also noticed that some numbers only appear on one device yet the rest of the details for that person are correct on both platforms.
    Is there a way to force through these changes or to at least identify which records are different?

    Post a link....
    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
    ==================
    "Webdesigner" <[email protected]> wrote in message
    news:f2ulvp$qvq$[email protected]..
    >I am working on a site that I have nearly completed. I am
    using Windows XP
    >and have tested it on the latest four major browsers. I
    do not have access
    >to a Mac computer though or earlier additions of said
    browsers. I am
    >interested in hearing how the page renders on different
    platforms. Would
    >anyone here be interested in having a look at the sight,
    when I am done,
    >and giving some feedback on how it renders on their
    screen etc? Or would
    >this be frowned upon as outside the parameters of this
    forum? If so, could
    >anyone direct me to a place where I might obtain this
    information?
    >
    > Thank you.
    >
    > Best Regards,
    > Webdesigner
    >

  • How can I update JTable with new Object[][]

    Hallo, I have got a problem. I want to update my Jtable with new Values,
    with
    setValueAt(Object aValue, int row, int column)
    i can only update one Object.
    Is it possible to update All Objects "Object[][]"??? in a whole Table
    after I clicked a Button???

    Hi,
    AbstractTableModel's method setValueAt(Object aValue, int row, int column)
    is not the way to fill values into a table. It is the way the table returns the changed values to you after the user has entered something. This is a very common misconception, probably because the method names are so confusing.
    The table model uses getValueAt (int row , int column)
    to fill in its rows and columns.
    If you extend AbstractTableModel to make this method fill in the correct values from you data array. then, when you wish to update the whole table, you can
    1) Put new values in the data array
    2) fireTableValuesChanged
    this will cause the table model to call getValueAt for every row and column.
    good luck.

  • How to force update Windows 10

    Just helping
    https://www.reddit.com/r/windows/comments/3f1l5l/here_is_how_to_force_your_windows_to_update_to/
    http://www.ibtimes.co.uk/how-fix-error-80240020-while-installing-windows-10-free-upgrade-1513456
    take it on your OWN RISK, I don't know if you gonna succeed in upgrading like me. Remember to back up.

    It might not be a good idea to force it at this point. Windows will notify you when it's ready depending on the configuration of your system.
    Here is some additional information:
    Windows 10 Install and Upgrade Top Solutions
    "Where is my upgrade?" "What is this error?" and more:
    http://answers.microsoft.com/en-us/windows/wiki/windows_10-windows_install/windows-10-install-and-upgrade-top-solutions/a59d8a6a-18da-417b-93a6-7b6ab4d03896

  • How to force a jtable to loose focus

    hi all
    i've got a jTextArea and a Jtable, and i want my jTable to loose focus when my JTextArea gains it
    i've the metod jTextAreaFocusGained(); what shall i write inside it to make the table loose focus?
    thanx
    sandro

    Hi,
    I guess, there is a missunderstanding in that, what you want to do and that, what you say, you want.
    The focus is a unique thing - only one component can have the focus at one time - so, when your textfield has gained focus, the component that formerly has had the focus, lost it already - so, there is nothing else to do.
    I guess, you want another thing, perhaps to clear the selection of the JTable or something like this.
    greetings Marsian

  • JTable display update

    I created my own Model to sum in last line and column the values of the previous cells. Unfortunately the update is only done for either column or line. Never for both.
    E.g.
    class myTest extends DefaultTableModel{
    public int getColumnCount() {
    return 5;
    public void setValueAt(Object value, int row, int col) {
    Vector rowVector = (Vector) dataVector.elementAt(row);
    rowVector.setElementAt(value, col);
    rowVector.setElementAt("nothing", 3);
    TableModelEvent event = new TableModelEvent(this, row, row, col);
    fireTableChanged(event);
    rowVector = (Vector) dataVector.elementAt(4);
    rowVector.setElementAt("Sum", 2);
    TableModelEvent event1 = new TableModelEvent(this, 2, 2, 4);
    fireTableChanged(event1);
    public class TableTest{
    public static void main(String[] args){
    JTable table = new JTable(5, 5){        };
    JTextField tf = new JTextField();
    tf.setBorder(BorderFactory.createEmptyBorder());
    table.setDefaultEditor(Object.class, new DefaultCellEditor(tf));
    myTest myModel = new myTest();
    table.setModel(myModel);
    myModel.insertRow(0,new Object[] {"","","","",""});
    myModel.insertRow(0,new Object[] {"","","","",""});
    myModel.insertRow(0,new Object[] {"","","","",""});
    myModel.insertRow(0,new Object[] {"","","","",""});
    myModel.insertRow(0,new Object[] {"","","","",""});
    JFrame frame = new JFrame();
    frame.getContentPane().add(new JScrollPane(table));
    frame.setSize(400, 300);
    frame.setVisible(true);
    When you place the cursor in the first cell, first line, enter some text, automatically in row1, col 4 appears 'nothing'. and that's it. but from the source-code it should display as well in row 5, col3 'Sum' which isn't. It is only displayed, when I move the selection to the last line.
    Anybody has idea, how to update the display of JTable properly to see both values? I guess it is only the first fireTableChanged processed, the second is ignored.

    Use the "code" formatting tags when posting code to it retains its original formatting.
    Maybe this posting does what you want:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=566133

  • My performance is very slow when I run graphs. How do I increase the speed at which I can do other things while the data is being updated and displayed on the graphs?

    I am doing an an aquisition and displaying the data on graphs. When I run the program it is slow. I think because I have the number of scans to read associated with my scan rate. It takes the number of seconds I want to display on the chart times the scan rate and feeds that into the number of samples to read at a time from the AI read. The problem is that it stalls until the data points are aquired and displayed so I cannot click or change values on the front panel until the updates occur on the graph. What can I do to be able to help this?

    On Fri, 15 Aug 2003 11:55:03 -0500 (CDT), HAL wrote:
    >My performance is very slow when I run graphs. How do I increase the
    >speed at which I can do other things while the data is being updated
    >and displayed on the graphs?
    >
    >I am doing an an aquisition and displaying the data on graphs. When I
    >run the program it is slow. I think because I have the number of
    >scans to read associated with my scan rate. It takes the number of
    >seconds I want to display on the chart times the scan rate and feeds
    >that into the number of samples to read at a time from the AI read.
    >The problem is that it stalls until the data points are aquired and
    >displayed so I cannot click or change values on the front panel until
    >the updates occur on the graph. What can I do to be a
    ble to help
    >this?
    It may also be your graphics card. LabVIEW can max the CPU and you
    screen may not be refreshing very fast.
    --Ray
    "There are very few problems that cannot be solved by
    orders ending with 'or die.' " -Alistair J.R Young

  • How to force Office 2013 CTR update regularly

    We are using around 60 PKC licenses of Office 2013 which came in CTR format (we don't have any Office 365 subscription, these licenses came with the new computers). CTR can't be managed via WSUS and it usually updates itself once or two per month (ideally).
    But we have noticed that many clients are not updating regularly. Actually some are stuck on January builds. When you go to such PC it shows that Update is ready. Why it doesn't update automatically? Is the PC has to be idle for some time? Then it is a bad
    design as our employees usually do not slack around half a day and work with Office all the time. How can i force CTR versions to update? Other than going to every machine and pressing Update now or asking users to do so.
    Digging about this i have stumbled upon a blog post about Office Deployment Tool which came out recently (version 1, 2014.05.06). http://blogs.technet.com/b/odsupport/archive/2013/06/19/using-the-office-deployment-tool.aspx Can it provide a way to force
    updates or is it just a way to keep updates on a local share to save the bandwidth? Will the scheduled task behave the same in this scenario and wait for months to update?
    Also, it looks like ODT download page is broken, nothing happens http://www.microsoft.com/en-us/download/details.aspx?id=36778&751be11f-ede8-5a0c-058c-2ee190a24fa6=True

    Hi,
    The Click-to-Run for Office 365 Configuration.xml file is used to specify Click-to-Run installation and update options.
    You can specifies attributes for configuring updates in the xml file, If
    Enabled is set to TRUE, the Click-to-Run update system will check for updates automatically.
    If UpdatePath is set to empty (""), updates are obtained from the Microsoft Click-to-Run source, CDN. Not from a local server:
    <Updates
    Enabled=TRUE | FALSE
    UpdatePath=UNC | local | http path
    TargetVersion=X.Y.Z.W
    Deadline=MM/DD/YYYY HH:MM
    />
    More reference about the configuration.xml file and ODT tool:
    http://technet.microsoft.com/en-us/library/jj219426(v=office.15).aspx#BKMK_UpdatesElement
    http://technet.microsoft.com/en-us/library/jj219422(v=office.15).aspx#BKMK_ConfigxmlForConfigure
    Download link for ODT:
    http://www.microsoft.com/en-us/download/details.aspx?id=36778 It works for me, please have a try.
    Thanks,

  • How do you update the song/artist information on songs that you have loaded to the cloud.  Some are not displaying correctly on my Iphone.

    I have loaded all my music to the cloud from my hard drive.  When I am viewing the music on my PC from the cloud it wasn't displaying all of the song/artist information correctly.  I took the time to go into each one that wasn't displaying correctly using the "get info" option and I updated them all.  Now they are displaying properly on my PC but not on my Iphone.  I'm sure it was because of the way they were loaded.  My question is how do I update the information for the music that is on the cloud so it will display to my Iphone correctly (and the Ipad I just bought but haven't setup yet?

    Pretty sure I just downloaded the .exe files to the SD card (I have a directory called "drivers" there & ran from Windows, no need to boot from anything else. Didn't even need to use Safe Boot. The files do need an .exe extension IE someimes downloads as _exe. No idea why but would just need to rename if download has the underscore and not the period. The you can run them.
    Was so easy I really did not think about it. One of the Intel Platform drives does say "requires 1.60 update" so that is the one you need. Do the 1.60, reboot, and then the Intel update.
    Key point is the release note on the Intel Platform Installer
    "Release Notes
    1.Please install the  Windows BIOS version 1.60 or higher for Encore WT8-A (PDW09x) before installing this Intel Platform Installer update." note this says "BIOS" and not "USB BIOS" which is a smaller file.

Maybe you are looking for