Article View: borland.public.jbuilder.java.swing
Article #12154Problem in JTable View
From: somanchi
Date: Thu, 18 Feb 1999 00:00
Date: Thu, 18 Feb 1999 00:00
45 lines
2352 bytes
2352 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:
<7ah39r$6ni$1@nnrp1.dejanews.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,88806698031495cd,start X-Google-Attributes: gid111d45,public From: somanchi@my-dejanews.com Subject: Problem in JTable View Date: 1999/02/18 Message-ID: <7ah39r$6ni$1@nnrp1.dejanews.com> X-Deja-AN: 445671118 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: Thu Feb 18 13:07:11 1999 GMT Newsgroups: borland.public.jbuilder.java.swing X-Http-User-Agent: Mozilla/4.03 [en] (Win95; I)