🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #12166

Strange Problem in JTable

#12166
From: somanchi
Date: Fri, 19 Feb 1999 00:00
45 lines
2488 bytes
Hi,

We have a strange problem on JTable view.I have created a JTable as follows
on JDialog,it works fine in motif look&feel.But under windows look&feel table
gets two colors if there is not enough data to fill entire table. The part of
the table with data is white whereas the remaining part of the table is grey.
We are with Swing 1.0.3. In the motif look and feel the entire table is
white.

/***********************************************************/

        m_tblRefData = new com.sun.java.swing.JTable();
        m_tblRefData.setBounds(40,55,490,183);
        m_tblRefData.setForeground(new Color(0));
        m_tblRefData.setBackground(Color.white);
        m_tblRefData.setFont(new Font("Dialog", Font.PLAIN, 11));
        m_tblRefData.setShowHorizontalLines(true);
        m_tblRefData.setShowVerticalLines(true);
        m_tblRefData.setRowHeight(16);
        m_tblRefData.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        m_tblRefData.setCellSelectionEnabled(false);
        m_tblRefData.sizeColumnsToFit(true);
        m_tblRefData.setPreferredScrollableViewportSize(new Dimension(475,
150));
        getContentPane().add(m_tblRefData);
        jPanel1 = new com.sun.java.swing.JPanel();
        jPanel1.setLayout(new FlowLayout(FlowLayout.CENTER,5,5));
        jPanel1.setBounds(40,55,490,183);
        jPanel1.setFont(new Font("Dialog", Font.PLAIN, 12));
        jPanel1.setForeground(new Color(0));
        jPanel1.setBackground(new Color(-3355444));
        getContentPane().add(jPanel1);
        JScrollPane sc = new JScrollPane(m_tblRefData);
        jPanel1.add(sc);
        /***********************************************************/

If any ideas please help.
thanks in advance.


RAMBABU.


-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    
Technical Details
Message-ID: <7aj9va$5kv$1@nnrp1.dejanews.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,67a19ffd1f1565df,start
X-Google-Attributes: gid111d45,public
From: somanchi@my-dejanews.com
Subject: Strange Problem in JTable
Date: 1999/02/19
Message-ID: <7aj9va$5kv$1@nnrp1.dejanews.com>
X-Deja-AN: 445998006
X-Http-Proxy: 1.0 x15.dejanews.com:80 (Squid/1.1.22) for client 202.54.53.195
Organization: Deja News - The Leader in Internet Discussion
X-Article-Creation-Date: Fri Feb 19 09:13:19 1999 GMT
Newsgroups: borland.public.jbuilder.java.swing
X-Http-User-Agent: Mozilla/4.03 [en] (Win95; I)