This is one of the most strange error that I ever found. 

If I run the some code in Windows NT works, in a sun workstation works and
in Window throw Exceed to a sun worstation don't work.


With this code works in the 3: 
import javax.swing.*;
import javax.swing.table.*;

public class Main {
    static JFrame m_frame;
    public static void main(String[] ARGS){        

        m_frame = new JFrame("Teste");
        m_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            
        JTable table = new JTable();
        table.setModel(new AbstractTableModel(){

            public int getRowCount() {                    
                return 2047;
            }

            public int getColumnCount() {
                return 436;
            }

            public Object getValueAt(int arg0, int arg1) {
                return new Integer(arg0*arg1);
            }});

        table.setAutoCreateColumnsFromModel(false);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);

        JScrollPane scrollPane = new JScrollPane(table);
            
        m_frame.getContentPane().add(scrollPane);

        m_frame.pack();
        m_frame.setVisible(true);
    }
}

Know if I change
            public int getRowCount() {                    
                return 2047;
            }
to
            public int getRowCount() {                    
                return 2048;
            }

Or if I change 

            public int getColumnCount() {
                return 436;
            }
to
            public int getColumnCount() {
                return 437;
            }

I get problems.

When I do scroll the table has problems whith the refrescement, seems that
background of the cell in the JTable are not painted but if I resize the
Frame the repaint is done with a wrong color. Probably the JScrollPanel
color, I don't know. 

This error just occores in the exceed.

Thanks
Marcos
_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to