Article View: borland.public.jbuilder.java.language
Article #16344JTable Headings
From: Paul Bates
Date: Tue, 02 Mar 1999 00:00
Date: Tue, 02 Mar 1999 00:00
23 lines
1357 bytes
1357 bytes
I can't seem to get JTable headings to appear under JBuilder. I have read
all the stuff about how you have to use a scrollpane, but it still doesn't
work. I have found one other person with the same problem on DejaNews, but
he didn't get a response. Anyone know what's going wrong. My test code
attempts to create a new TestFrame, which should have headings 1,2,3,4.
import java.awt.*;
import com.sun.java.swing.*;
import jclass.table.*;
import com.sun.java.swing.table.*;
import java.util.*;
public class TestFrame extends JFrame {
JTable jTable1 = new JTable(new String[][] {{"a","b","d","e"},
{"f","g","h","i"}}, new String [] {"1","2","3","4"});
JScrollPane scrollPane1 = new JScrollPane(jTable1);
public TestFrame() {
setSize(new Dimension(634, 672));
getContentPane().add(scrollPane1, BorderLayout.CENTER);
setVisible(true);
}
}
Technical Details
Message-ID:
<36dc2d7f.0@dns.pareto-partners.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,c17b840ccaa33b55,start X-Google-Attributes: gidf74b3,public From: "Paul Bates" <paulb@pareto-partners.co.uk> Subject: JTable Headings Date: 1999/03/02 Message-ID: <36dc2d7f.0@dns.pareto-partners.co.uk> X-Deja-AN: 450447738 X-Trace: 2 Mar 1999 18:37:47 GMT, dns.pareto-partners.co.uk Newsgroups: borland.public.jbuilder.java.language X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3