JTable wont refresh in JInternalFrame

hello people
my JTable wont refresh when iam using the form as an JInternalFrame, but if i use it as JFrame then the table will refresh, here is a bit of my code
public void getTable()
          Statement sat;
          ResultSet rs;
          try {
               int idx = queryType.getSelectedIndex();
               String s = columnNames[idx];
               JOptionPane.showMessageDialog(null, "yeah "+s);
               String query = "SELECT * FROM College_Master " +
                                   " WHERE  ("+s+") ='" + typelist.getSelectedItem()+"'";
               sat = connection.createStatement();
               rs = sat.executeQuery(query);
               displayResultSet(rs);
               sat.close();
          catch(SQLException sqlex) {
               sqlex.printStackTrace();
     public void displayResultSet (ResultSet rs)
               throws SQLException
               boolean moreRecords = rs.next();
               if(! moreRecords){
                    JOptionPane.showMessageDialog(this, "No record to display. Please query again.");
                    setTitle("No records to dispaly");
                    return;
               Vector columnHeads = new Vector();
               Vector rows = new Vector();
               try {
                    ResultSetMetaData rsmd = rs.getMetaData();
                    for(int i = 1;i<=rsmd.getColumnCount();i++)
                    columnHeads.addElement(rsmd.getColumnName(i));
               do {
                         ctr2++;
                         rows.addElement (getNextRow(rs, rsmd));
                         JOptionPane.showMessageDialog(null, "here"+ctr2);
                    } while (rs.next());
                    table = new JTable(rows, columnHeads);
                    JScrollPane scroller = new JScrollPane(table);
                    scroller.setBounds(10,40,660,250);
                    c.add(scroller);//c is a panel
                    validate();
               catch(SQLException sqlex) {
                    sqlex.printStackTrace();
     public Vector getNextRow (ResultSet rs, ResultSetMetaData rsmd)
                         throws SQLException
               Vector currentRow = new Vector();
               for (int i=1;i<=rsmd.getColumnCount();i++)
               switch(rsmd.getColumnType(i)) {
                    case Types.VARCHAR:
                         currentRow.addElement (rs.getString(i));
                         break;
                    case Types.INTEGER:
                         currentRow.addElement(new Long(rs.getLong(i)));
                         break;
                    default:
                         System.out.println("Type was: " + rsmd.getColumnTypeName(i));
               return currentRow;
          }whats wrong?
asrar

hello people
my JTable wont refresh when iam using the form as an JInternalFrame, but if i use it as JFrame then the table will refresh, here is a bit of my code
public void getTable()
          Statement sat;
          ResultSet rs;
          try {
               int idx = queryType.getSelectedIndex();
               String s = columnNames[idx];
               JOptionPane.showMessageDialog(null, "yeah "+s);
               String query = "SELECT * FROM College_Master " +
                                   " WHERE  ("+s+") ='" + typelist.getSelectedItem()+"'";
               sat = connection.createStatement();
               rs = sat.executeQuery(query);
               displayResultSet(rs);
               sat.close();
          catch(SQLException sqlex) {
               sqlex.printStackTrace();
     public void displayResultSet (ResultSet rs)
               throws SQLException
               boolean moreRecords = rs.next();
               if(! moreRecords){
                    JOptionPane.showMessageDialog(this, "No record to display. Please query again.");
                    setTitle("No records to dispaly");
                    return;
               Vector columnHeads = new Vector();
               Vector rows = new Vector();
               try {
                    ResultSetMetaData rsmd = rs.getMetaData();
                    for(int i = 1;i<=rsmd.getColumnCount();i++)
                    columnHeads.addElement(rsmd.getColumnName(i));
               do {
                         ctr2++;
                         rows.addElement (getNextRow(rs, rsmd));
                         JOptionPane.showMessageDialog(null, "here"+ctr2);
                    } while (rs.next());
                    table = new JTable(rows, columnHeads);
                    JScrollPane scroller = new JScrollPane(table);
                    scroller.setBounds(10,40,660,250);
                    c.add(scroller);//c is a panel
                    validate();
               catch(SQLException sqlex) {
                    sqlex.printStackTrace();
     public Vector getNextRow (ResultSet rs, ResultSetMetaData rsmd)
                         throws SQLException
               Vector currentRow = new Vector();
               for (int i=1;i<=rsmd.getColumnCount();i++)
               switch(rsmd.getColumnType(i)) {
                    case Types.VARCHAR:
                         currentRow.addElement (rs.getString(i));
                         break;
                    case Types.INTEGER:
                         currentRow.addElement(new Long(rs.getLong(i)));
                         break;
                    default:
                         System.out.println("Type was: " + rsmd.getColumnTypeName(i));
               return currentRow;
          }whats wrong?
asrar

Similar Messages

  • Some websites wont refresh.

    While watching football on Sundays, i have noticed the scores/game clock is way behind then whats on the tv.(page wont refresh). My fantasy football pages all run on adobe flash, which i can not download. Any help please.

    Or you can describe your solution, so others with a similar problem can benefit.

  • My webpages wont refresh unless i move the cursor, how do i fix this?

    my webpages wont refresh unless i move the cursor.
    some post on here told me to disable acceleration, which i did.
    this worked for a while but now the problem is back.
    how do i fix this?

    I think you are in "full screen" mode. Use the F11 key to switch between full screen and normal modes. Does that solve the mystery?

  • My email account wont refresh

    my yahoo email account stopped refreshing yesterday. I deleted the account and created it again and it still wont refresh and now I cant see any of my emails on my ipad.

    There have been persistent issues with yahoo in the past few weeks
    A couple of other threads that may/may not have solutions (mine isn't messing up so I can't test it)
    Re: I can't access my Yahoo email from my Ipad
    Re: I cannot get yahoomail through the email icon on my iPad. I can get it on my iPhone and if I go through safari and then yahoo on my iPad. Gmail works fine

  • My JTable wont update can someone plz help

    My JTable is supposed to change betwen method visRes() and visV�relser() but when one of them is picked from another file the JTable wont change to the other method...can someone help?
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    import javax.swing.table.*;
    public class Opslag extends JFrame
    Reservation hentRes;
    V�relse hentV�relse;
    Object[][]data;
    String[]panelTekst;
    JTable table;
    JScrollPane scrollPane;
    public Opslag(Reservation r,V�relse v)
              hentRes = r;
              hentV�relse = v;
    public void visRes()
         data = new Object[hentRes.t�ller()][8];
    panelTekst = new String[8];
              panelTekst[0] = "Res Nr";
              panelTekst[1] = "G�steNr";
              panelTekst[2] = "V�relsesNr";
              panelTekst[3] = "Udl Start";
              panelTekst[4] = "Udl Slut";
              panelTekst[5] = "Check Ind";
              panelTekst[6] = "Check Ud";
              panelTekst[7] = "Res Dato";
    table = new JTable(data, panelTekst);
    scrollPane = new JScrollPane(table);
    getContentPane().add(scrollPane, BorderLayout.CENTER);
    table.setEnabled(false);
    //table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    try {
    ConnectDB db = new ConnectDB( "jdbc:interbase://localhost/C:/Documents and Settings/aslan/Skrivebord/modelKomponent/HOTEL.GDB", "sysdba", "masterkey" );
    ResultSet row = db.select( "SELECT * FROM RESERVATION" );
              for(int i=0;row.next();i++)
              int ii = 0;
              data[i][ii] = row.getString("RESNR");
              ii++;
              data[i][ii] = row.getString("GAESTENR");
              ii++;
              data[i][ii] = row.getString("VAERNR");
              ii++;
              data[i][ii] = row.getString("DATOUDLSTART");
              ii++;
              data[i][ii] = row.getString("DATOUDLSLUT");
              ii++;
              data[i][ii] = row.getString("DATOCHECKIND");
              ii++;
              data[i][ii] = row.getString("DATOCHECKUD");
              ii++;
              data[i][ii] = row.getString("DATORES");
              ii++;
    } catch (SQLException e)
    catch(NullPointerException a)
    public void visV�relser()
              data = new Object[hentV�relse.t�ller()][11];
    panelTekst = new String[11];
              panelTekst[0] = "V�relse Nr";
              panelTekst[1] = "Type";
              panelTekst[2] = "Res Nr";
              panelTekst[3] = "Status";
              panelTekst[4] = "Havudsigt";
              panelTekst[5] = "Sal";
              panelTekst[6] = "Gang Nr";
              panelTekst[7] = "Pris";
              panelTekst[8] = "St�rrelse";
              panelTekst[9] = "Stil";
              panelTekst[10] = "Antal bad";
    table = new JTable(data, panelTekst);
    scrollPane = new JScrollPane(table);
    getContentPane().add(scrollPane, BorderLayout.CENTER);
    table.setEnabled(false);
    //table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    try {
    ConnectDB db = new ConnectDB( "jdbc:interbase://localhost/C:/Documents and Settings/aslan/Skrivebord/modelKomponent/HOTEL.GDB", "sysdba", "masterkey" );
    ResultSet row = db.select( "SELECT * FROM VAERELSE" );
              for(int i=0;row.next();i++)
              int ii = 0;
              data[i][ii] = row.getString("VAERELSENR");
              ii++;
              data[i][ii] = row.getString("TYPEN");
              ii++;
              data[i][ii] = row.getString("RESNR");
              ii++;
              data[i][ii] = row.getString("VAERELSESTATUS");
              ii++;
              data[i][ii] = row.getString("HAVUDSIGT");
              ii++;
              data[i][ii] = row.getString("SAL");
              ii++;
              data[i][ii] = row.getString("STEDGANG");
              ii++;
              data[i][ii] = row.getString("PRIS");
              ii++;
              data[i][ii] = row.getString("STORRELSE");
              ii++;
              data[i][ii] = row.getString("STIL");
              ii++;
              data[i][ii] = row.getString("ANTALBAD");
              ii++;
    } catch (SQLException e)
    catch(NullPointerException a)
    }

            public void visG�ster()
             data = new Object[hentG�st.t�ller()][11];
            panelTekst = new String[11];
              panelTekst[0] = "G�steNr";
              panelTekst[1] = "Type";
              panelTekst[2] = "Navn";
              panelTekst[3] = "Efternavn";
              panelTekst[4] = "Adresse";
              panelTekst[5] = "Tlf";
              panelTekst[6] = "Antal Res";
              panelTekst[7] = "Idnr";
              panelTekst[8] = "Firma";
              panelTekst[9] = "CVR";
              panelTekst[10] = "Rabat";
            table = new JTable(data, panelTekst);
            if (scrollPane != null)
                getContentPane().remove(scrollPane);
            scrollPane = new JScrollPane(table);
            scrollPane.revalidate();
            getContentPane().add(scrollPane, BorderLayout.CENTER);
            table.setEnabled(false);
            this.pack();
            table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
            table.getColumnModel().getColumn(0).setPreferredWidth(60);
            table.getColumnModel().getColumn(1).setPreferredWidth(60);
            table.getColumnModel().getColumn(2).setPreferredWidth(60);
            table.getColumnModel().getColumn(3).setPreferredWidth(60);
            table.getColumnModel().getColumn(4).setPreferredWidth(150);
            table.getColumnModel().getColumn(5).setPreferredWidth(80);
            table.getColumnModel().getColumn(6).setPreferredWidth(60);
            table.getColumnModel().getColumn(7).setPreferredWidth(60);
            table.getColumnModel().getColumn(8).setPreferredWidth(100);
            table.getColumnModel().getColumn(9).setPreferredWidth(100);
            table.getColumnModel().getColumn(10).setPreferredWidth(60);
            try {
            ConnectDB db = new ConnectDB( "jdbc:interbase://localhost/C:/Documents and Settings/aslan/Skrivebord/modelKomponent/HOTEL.GDB", "sysdba", "masterkey" );
            ResultSet row = db.select( "SELECT * FROM GAEST" );
            int type = 0;
                      for(int i=0;row.next();i++)
                          int ii = 0;
                          data[i][ii] = row.getString("GAESTENR");
                          ii++;
                          data[i][ii] = row.getString("TYPEN");
                          ii++;
                          data[i][ii] = row.getString("NAVN");
                          ii++;
                          data[i][ii] = row.getString("EFTERNAVN");
                          ii++;
                          data[i][ii] = row.getString("ADRESSE");
                          ii++;
                          data[i][ii] = row.getString("TLF");
                          ii++;
                          data[i][ii] = row.getString("ANTALRESERVATION");
                          ii++;
                          type = row.getInt("TYPEN");
                    if(type == 1)
                             ResultSet row2 = db.select(" SELECT * FROM PRIVATGAEST ");
                             while(row2.next())
                                  data[i][ii] = row2.getString("IDNR");
                                  ii++;
                        else if(type == 0)
                             ResultSet row3 = db.select(" SELECT * FROM ERHVERVSGAEST ");
                             while(row3.next())
                                  data[i][ii] = row3.getString("FIRMA");
                                  ii++;
                                  data[i][ii] = row3.getString("CVR");
                                  ii++;
                                  data[i][ii] = row3.getString("RABAT");
                                  ii++;
                } catch (SQLException e)
                     System.out.println(e);
                catch(NullPointerException a)
                      System.out.println(a);
            }

  • "credit balance is out of date"...BUT WONT REFRESH!!???

    I got, and used, 2 iTunes gift cards. On the 2nd purchase, I exceeded the balance of credit I had, so i figured it would jsut charge my (checking) account as usual. Well, I was able to purchase and download the songs ok, but my balance is "stuck", at +$9.61......now when I try and make purchases, it wont let me, and gives me an error "your credit balance is out of date, press "OK" to refresh and try again".....BUT IT WONT WORK...
    What now?

    Log out and log back into iTunes. Don't simply quit iTunes and restart it.

  • Problem of deletion of rows in jtable, table refreshing too

    Hi,
    I have a table with empty rows in the beginning with some custom properties( columns have fixed width...), later user would be adding to the rows to this table and can delete, I've a problem while deleting the rows from table,
    When a selected row is deleted the model is also deleting the data but the table(view) is not refreshed.
    Actually i'm selecting a cell of a row, then hitting the delete button.
    So the model is deleting the information, but i'm not able to c the fresh data in table( especially when the last cell of last row is selectd and hit the delete button, i am getting lots of exception)
    Kindly copy the below code and execute it, and let me know,
    * AuditPanel.java
    * Created on August 30, 2002, 3:05 AM
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.table.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import java.util.Vector;
    * @author yaman
    public class AuditPanel extends javax.swing.JPanel {
    // These are the combobox values
    private String[] acceptenceOptions;
    private Vector colNames;
    private Color rowSelectionBackground = Color.yellow;
    private int rowHeight = 20;
    private int column0Width =70;
    private int column1Width =96;
    private int column2Width =327;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTable1;
    /** Creates new form AuditPanel */
    public AuditPanel() {
    public void renderPanel(){
    initComponents();
    public String[] getAcceptenceOptions(){
    return acceptenceOptions;
    public void setAcceptenceOptions(String[] acceptenceOptions){
    this.acceptenceOptions = acceptenceOptions;
    public Vector getColumnNames(){
    return colNames;
    public void setColumnNames(Vector colNames){
    this.colNames = colNames;
    public Vector getData(){
    Vector dataVector = new Vector();
    /*dataVector.add(null);
    dataVector.add(null);
    dataVector.add(null);
    return dataVector;
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;
    jPanel2 = new javax.swing.JPanel();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jPanel1 = new javax.swing.JPanel();
    jTable1 = new javax.swing.JTable();
    setLayout(new java.awt.GridBagLayout());
    setBorder(new javax.swing.border.EmptyBorder(0,0,0,0));
    jPanel2.setLayout(new java.awt.GridBagLayout());
    jPanel2.setBorder(new javax.swing.border.EmptyBorder(0,0,0,0));
    jButton1.setText("Add");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 8;
    gridBagConstraints.insets = new java.awt.Insets(0, 1, 5, 0);
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    jPanel2.add(jButton1, gridBagConstraints);
    jButton2.setText("Delete");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    jPanel2.add(jButton2, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
    add(jPanel2, gridBagConstraints);
    jPanel1.setLayout(new java.awt.GridBagLayout());
    jPanel1.setBorder(new javax.swing.border.BevelBorder(javax.swing.border.BevelBorder.LOWERED, Color.black, Color.gray) );
    jTable1.setModel(new javax.swing.table.DefaultTableModel(getData(), getColumnNames()));
    // get all the columns and set the column required properties
    java.util.Enumeration enum = jTable1.getColumnModel().getColumns();
    while (enum.hasMoreElements()) {
    TableColumn column = (TableColumn)enum.nextElement();
    if( column.getModelIndex() == 0 ) {
    column.setPreferredWidth(column0Width);
    column.setCellEditor( new ValidateCellDataEditor(true) );
    if( column.getModelIndex() == 1) {
    column.setPreferredWidth(column1Width);
    column.setCellEditor(new AcceptenceComboBoxEditor(getAcceptenceOptions()));
    // If the cell should appear like a combobox in its
    // non-editing state, also set the combobox renderer
    //column.setCellRenderer(new AcceptenceComboBoxRenderer(getAcceptenceOptions()));
    if( column.getModelIndex() == 2 ) {
    column.setPreferredWidth(column2Width); // width of column
    column.setCellEditor( new ValidateCellDataEditor(false) );
    jScrollPane1 = new javax.swing.JScrollPane(jTable1);
    jScrollPane1.setPreferredSize(new java.awt.Dimension(480, 280));
    jTable1.setMinimumSize(new java.awt.Dimension(60, 70));
    //jTable1.setPreferredSize(new java.awt.Dimension(300, 70));
    //jScrollPane1.setViewportView(jTable1);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
    jPanel1.add(jScrollPane1, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    add(jPanel1, gridBagConstraints);
    // set the row height
    jTable1.setRowHeight(rowHeight);
    // set selection color
    jTable1.setSelectionBackground(rowSelectionBackground);
    // set the single selection
    jTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    // avoid table header to resize/ rearrange
    jTable1.getTableHeader().setReorderingAllowed(false);
    jTable1.getTableHeader().setResizingAllowed(false);
    // Table header font
    jTable1.getTableHeader().setFont( new Font( jTable1.getFont().getName(),Font.BOLD,jTable1.getFont().getSize() ) );
    jButton1.setMnemonic(KeyEvent.VK_A);
    // action of add button
    jButton1.addActionListener( new ActionListener(){
    public void actionPerformed(ActionEvent actionEvent){
    // If a button press is the trigger to leave a JTable cell and save the data in model
    if(jTable1.isEditing() ){
    //System.out.println("table is edition ");
    String text=((javax.swing.text.JTextComponent)jTable1.getEditorComponent()).getText();
    jTable1.setValueAt(text,jTable1.getSelectedRow(),jTable1.getSelectedColumn()) ;
    jTable1.getCellEditor().cancelCellEditing();
    // find out total available rows
    int totalRows = jTable1.getRowCount();
    int cols = jTable1.getModel().getColumnCount();
    if( jTable1.getModel() instanceof DefaultTableModel ) {
    ((DefaultTableModel)jTable1.getModel()).addRow(new Object[cols]);
    int newRowCount = jTable1.getRowCount();
    // select the first row
    jTable1.getSelectionModel().setSelectionInterval(newRowCount-1,newRowCount-1);
    jButton2.setMnemonic(KeyEvent.VK_D);
    // action of Delete button
    jButton2.addActionListener( new ActionListener(){
    public void actionPerformed(ActionEvent actionEvent){
    int totalRows = jTable1.getRowCount();
    // If there are more than one row in table then delete it
    if( totalRows > 0){
    int selectedOption = JOptionPane.showConfirmDialog(null,"Are you sure you want to delete this audit row?","Coeus", JOptionPane.YES_NO_OPTION);
    // if Yes then selectedOption is 0
    // if No then selectedOption is 1
    if(0 == selectedOption ){
    // get the selected row
    int selectedRow = jTable1.getSelectedRow();
    System.out.println("Selected Row "+selectedRow);
    if( selectedRow != -1 ){
    DefaultTableModel dm= (DefaultTableModel)jTable1.getModel();
    java.util.Vector v1=dm.getDataVector();
    System.out.println("BEFOE "+v1);
    v1.remove(selectedRow);
    jTable1.removeRowSelectionInterval(selectedRow,selectedRow);
    System.out.println("After "+v1);
    }else{
    // show the error message
    JOptionPane.showMessageDialog(null, "Please Select an audit Row", "Coeus", JOptionPane.ERROR_MESSAGE);
    } // end of initcomponents
    class AcceptenceComboBoxRenderer extends JComboBox implements TableCellRenderer {
    public AcceptenceComboBoxRenderer(String[] items) {
    super(items);
    public Component getTableCellRendererComponent(JTable table, Object value,
    boolean isSelected, boolean hasFocus, int row, int column) {
    if (isSelected) {
    setForeground(table.getSelectionForeground());
    super.setBackground(rowSelectionBackground);
    } else {
    setForeground(table.getForeground());
    setBackground(table.getBackground());
    // Select the current value
    setSelectedItem(value);
    return this;
    class AcceptenceComboBoxEditor extends DefaultCellEditor {
    public AcceptenceComboBoxEditor(String[] items) {
    super(new JComboBox(items));
    } // end editor class
    public class ValidateCellDataEditor extends AbstractCellEditor implements TableCellEditor {
    // This is the component that will handle the editing of the
    // cell value
    JComponent component = new JTextField();
    boolean validate;
    public ValidateCellDataEditor(boolean validate){
    this.validate = validate;
    // This method is called when a cell value is edited by the user.
    public Component getTableCellEditorComponent(JTable table, Object value,
    boolean isSelected, int rowIndex, int vColIndex) {
    if (isSelected) {
    component.setBackground(rowSelectionBackground);
    // Configure the component with the specified value
    JTextField tfield =(JTextField)component;
    // if any vaidations to be done for this cell
    if(validate){
    //tfield.setDocument(new JTextFieldFilter(JTextFieldFilter.NUMERIC,4));
    tfield.setText( ((String)value));
    // Return the configured component
    return component;
    // This method is called when editing is completed.
    // It must return the new value to be stored in the cell.
    public Object getCellEditorValue() {
    return ((JTextField)component).getText();
    // This method is called just before the cell value
    // is saved. If the value is not valid, false should be returned.
    public boolean stopCellEditing() {
    String s = (String)getCellEditorValue();
    return super.stopCellEditing();
    public void itemStateChanged(ItemEvent e) {
    super.fireEditingStopped();
    }//end of ValidateCellDataEditor class
    public static void main(String args[]){
    JFrame frame = new JFrame();
    AuditPanel auditPanel = new AuditPanel();
    frame.getContentPane().add(auditPanel);
    auditPanel.setAcceptenceOptions(new String[]{"Accepted", "Rejected", "Requested"} );
    java.util.Vector colVector = new java.util.Vector();
    colVector.add("Fiscal Year");
    colVector.add("Audit Accepted");
    colVector.add("Comment" );
    auditPanel.setColumnNames( colVector);
    auditPanel.renderPanel();
    frame.pack();
    frame.show();

    Hi,
    I've got the solution for it. As when the cursor is in cell of
    a row and hit the delete button, the data in that cell is not saved,
    So i'm trying to save the data first into the model then firing the action event by doing this ..
    jButton2.addActionListener( new ActionListener(){       
    public void actionPerformed(ActionEvent actionEvent){           
    // If a button press is the trigger to leave a JTable cell and save the data in model
    if(jTable1.isEditing() ){                   
    String text=((javax.swing.text.JTextComponent)jTable1.getEditorComponent()).getText();
    jTable1.setValueAt(text,jTable1.getSelectedRow(),jTable1.getSelectedColumn()) ;
    jTable1.getCellEditor().cancelCellEditing();
    // HERE DO THE DELETE ROW OPERATION
    <yaman/>

  • JComboBox in JTable not refresh automatically

    Hi folks,
    I put a JComboBox in a JTable cell as editor and with a GlassPane over the whole frame. Initially, I got lots of problems in dispatching events to JComboBox. Eventually, comboBox.setLightWeightPopupEnabled(false) seems solve many of them. However, after I called the said API to prevent light-weighted popup in JTable, when I move mouse on popup list or navigate with scroll bar, the UI does not refresh at all. I am pretty sure that all the models except UI has been updated because when I switch to another application and back, the UI repaints with expected appearance.
    Any idea ? Thanks a lot.!

    I think you might be doing this to yourself. This block here:
        private void tblContactFocusLost(java.awt.event.FocusEvent evt)
            if (tbl.isVisible())
                TableCellEditor tce = tbl.getCellEditor();
                if (tce != null) tce.stopCellEditing();
        }What purpose does it serve? It seems to muck up your table cell editing, including the combobox editing. If you comment out the tce.stopCellEditing() like so:
        private void tblContactFocusLost(java.awt.event.FocusEvent evt)
            if (tbl.isVisible())
                TableCellEditor tce = tbl.getCellEditor();
                if (tce != null) ; //tce.stopCellEditing();
        }Things work better.

  • LINKS WONT REFRESH AUTOMATICALLY

    I have Microsoft Office 2010 Home and Student. I have cells from one page linked to another page within the same workbook. When the data changes from the source cell it does not reflect a change in the destination cell unless I double click the destination
    cell at which point it refreshes. Some of my links update on their own and others require manual refresh. I never know which links are correct and up to date without double checking the values in all of the destination links and comparing to the source cell
    for accuracy. As a result I cannot trust the calculations in my workbook.
    Can anyone tell me a fix to this problem?

    thank you very much for the response. i checked and calculation is and was already set to automatic. 
    =MAIN!E2   this is an example of a link that i am referring to. it's a simple link that should carry the value from the original cell to another sheet in the book. i have always been using these and they have always worked fine. now many are not working.
    and example would be... the value in MAINE2 is sum(E3:E1000) as data is manually entered in column E the value in MAINE2 changes of course. The changes are supposed to carry over to another page automatically to the cell which =MAIN!E2. 
    Let's say that the value of MAINE2 started the day at 65 before any data was entered in column E on that page for the day. The linked cell that should be =MAIN!E2 is showing 65 as it should. But at the end of the day after entering in data to column
    E the value of MAINE2 IS NOW 160. When I check the link on the other page the cell for =MAIN!E2 is still showing a value of the old data of 65. If I double click on the =MAIN!E2 cell it will update it'self to 165 but if I don't double click the cell
    it will remain at 65 indefinately.
    There are many many of these "links" that are doing that. If I want my workbook to be accurate I have to go through constantly and double click all the "links" so that they update to the correct values.

  • Media Encoder wont refresh comps from AE

    I have an incredibly frustrating issue with the way AME operates. I can't seem to find a way to refresh, or update a comp in the render queue. If I am about to render and notice something is wrong in the Comp, I just cant go into after effects, make the change, save and have it update in AME. I have to shut down AME, go back to AE, and send to AME again. And if I had already placed a bunch of presets, and file destinations on the renders I have to do that ALL OVER AGAIN.
    Am I missing something? Why is it using Dynamic Link when it's not really dynamically linked at all?

    tmpst01 wrote:
    Am I missing something? Why is it using Dynamic Link when it's not really dynamically linked at all?
    AME uses Dynamic Link, but not in the same way DL works between After Effects and Premiere Pro. The link does not stay live.
    Instead, AME loads a copy of the project into memory. You want it to do this; if you were allowed to change the project mid-render then bad things would happen.
    What version of After Effects and AME are you using? There were some changes in the most recent (CC) release related to this. Specifically, now when you send a comp to AME a snapshot (a copy) of the AE project is made on disk (look in the project directory/projectName_AME), and this is the file that AME references. Premiere Pro does a similar thing, and has since prior to CC, but it stores the project file in a temp directory.
    This workflow eliminates the problem of AME getting confused about the state of the project if you make changes. The downside is that after any change you will need to add your comp to AME again.
    The benefit of this approach is versioning. If you send a comp or sequence to AME, that reference remains static. If you make further changes to the comp and need to return to a prior version, or simply need to inspect the history, the state of the render at the time you added the comp is maintained.
    Now, all that said, I understand the case you're presenting, that you simply want to make some corrections after you've set up the comp in AME but before starting the render. Making AME behave this way will make it more flexible, but a certain amount of complexity will also be introduced. The best solution will probably be to let the user choose whether to keep the comp live or to take a snapshot.
    Please submit your idea a feature request: www.adobe.com/go/wish

  • Firefox wont refresh properly why is this i have to click resend ???

    every single time i refresh i get this msg..........To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier....... could you please tell me how i can fix this please.

    You get an alert about resending POST data if you go back to a page or refresh a page that was previously requested from the server by submitting form data via a (hidden) POST form.<br />
    Firefox can only make sure to get the same page by resending that POST form.<br />
    Firefox doesn't know what that form data means, so Firefox asks for confirmation before resending that form data as such an action can cause you to repeat an action and buy another item or post a message another time.<br />
    A way to prevent that pop-up is not to use the Back button, but to open links from a page that was requested from a server by sending a POST form in a new tab (window) with a middle-click or a Ctrl + left-click.<br />
    Then you can close that tab or window to go back.<br />
    Other things that need your attention:
    Your above posted system details show outdated plugin(s) with known security and stability risks that you should update.
    # Shockwave Flash 10.0 r45
    # Next Generation Java Plug-in 1.6.0_17 for Mozilla browsers
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
    *http://www.adobe.com/software/flash/about/
    Update the [[Java]] plugin to the latest version.
    *http://www.oracle.com/technetwork/java/javase/downloads/index.html (Java Platform: Download JRE)

  • Laptop wont refresh

    my laptop is asking for windows instalation disc when i try to refresh it, i didnt recieve a disc with it when i bought it!! help!

    Most machines have software on them to create Recovery Media. No plain OS disk.
    Windows 8 << creating Recovery Media
    ******Clicking the Thumbs-Up button is a way to say -Thanks!.******
    **Click Accept as Solution on a Reply that solves your issue to help others**

  • Photoshop wont refresh

    Recently, I installed photoshop cs3 on my new computer. It runs and works fine, only when you try to update a layer(lets say fill the background with green) it wont show the result unless you manually click off of the image to the move tool, the click back on the screen. It also wont show updates in the preview mode under blending options or filters. I was wondering if anyone had this problem or knew how to fix it. Thanks for any of the help.
    Also... I updated the version to 10.0.1 and its still the same.

    Noel, thanks for your answer. I checked the system info for any usage of igXXXXX.dll files (I suppose Intel GMA drivers), but found nothing. It is however showing me a list of used ati*...dll drivers from which i conclude PS is using my dedicated GPU.
    Unfortunately I did not find any option to turn off the integrated graphics in my BIOS. I tried to increase the shared memory value (it was set to 32MB) to 1024MB and let PCIE be the primary GPU device. Still, those effects don't seem to have any effect on Photoshop.

  • Problem in refreshing jinternalframe

    Hello,
    In java code I have added jtable to jinternalframe and
    on each button click I have to show new values filled in jtable which is in jinternalframe.But I am getting new jinternalframe next to original jinternalframe.I want new jinternalframe to be superimposed on previous.What is solution to this?
    code:
    buttonNext.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e) {
    System.out.println("rowno"+tableActual.getRowCount());
    if(i<tableActual.getRowCount())
    String s1=tableActual.getValueAt(i,1).toString();
    System.out.println("s1:"+s1);
    tableVirtual.table.setValueAt(s1,i,1);
    System.out.println("s1 in vtable:"+tableVirtual.table.getValueAt(i,1));
    stepLabel.setText("Calculating Gen"+tableVirtual.table.getValueAt(i,1));
    String s2=tableActual.getValueAt(i,2).toString();
    tableVirtual.table.setValueAt(s2,i,2);
    stepLabel.setText("Calculating Kill"+tableVirtual.table.getValueAt(i,1));
    i=i+1;
    System.out.println("i="+i);
    tableVirtual.showTable();
    desktop.remove(frame);
    JInternalFrame frame = new JInternalFrame("SimpleTableDemo",true,true,true,true);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    tableVirtual.setOpaque(true); //content panes must be opaque
    frame.setContentPane(tableVirtual);
    //Display the window.
    frame.pack();
    frame.setLocation(0,451);
    frame.setVisible(true);
    desktop.add(frame);
    });

    I have tried it. But its giving next internal frame of half size than previous one.
    And new jinternalframe is still in background of previous one.What to do to take it to front?I have tried jinternalframe.front().But it has no effect.

  • JInternalFrame  , Jtable && XML

    Hi all ,
    I am trying to Build a GUI program that gets the data from the XML file and then put it into the Jtable . The jtable is in the Jinternalframe .
    When I try to add one Jinternalframe that containing the Jtable , it works fine .
    But when I try to put the other Jinternalframe that containing another Jtable .
    It fails . I can compile the program but can't run it .
    It is the error code :
    Exception in thread "main" java.lang.NullPointerException
    at tablemodel.getColumnName(tablemodel.java:92)
    at TableMap.getColumnName(TableMap.java:38)
    at javax.swing.JTable.addColumn(JTable.java:1841)
    at javax.swing.JTable.createDefaultColumnsFromModel(JTable.java:927)
    at javax.swing.JTable.tableChanged(JTable.java:2842)
    at javax.swing.JTable.setModel(JTable.java:2710)
    at javax.swing.JTable.<init>(JTable.java:357)
    at javax.swing.JTable.<init>(JTable.java:297)
    at jin_frame.<init>(jin_frame.java:15)
    at button.<init>(button.java:41)
    at button.main(button.java:115)
    Can somebody help ??

    Could you show the code that you used to do this? I am trying to do the same thing. Thank you.

Maybe you are looking for

  • My PC won't let me remove an old version or Itunes. says it doesn't recognize a path. HELPPP

    This cmputer HP i bought from Best bUY and downloaded a 9.1 version of Itunes over a year ago, since then this program hasn't removed itself from my computer. Its completely crazy I am convinced. I have lost all songs on my computer and can't determi

  • Upgraded from Tiger to Leopard and Finder is not responding

    I just upgraded to Leopard on my 15" Powerbook G4 and everything seems to work fine, except the Finder. If I go to Force quit it says it isn't responding and no matter what I do I can't get a finder window. I tried to do the fix in terminal where you

  • Deleted Files..Crooked cops?

    is there anyway to tell if media files have been deleted and when they were deleted. i have my uyounger brothers phone. he commited suicide recently. he was framed by his slutty XGF who said she hit him. he recorded her on his phone saying that he di

  • Equipment Inspection in PM - Valuation

    I'm trying to setup the following scenario: Inspection for equipment:  There are 100 points that are qualitive with 4 possible options: Y (Yes = 0 points), N (No = can be 1, 2, or 4 points), Q (70% of 1, 2 or 4 points) or N/A (0 points).  When the in

  • Can I continue to use my iPhone 4S if I cancel my cell service?

    If I stop using my provider can I still use the phone to surf and for emails using my wifi, much as I would do with an IPod Touch?