🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #15619

JTable help???

#15619
From: Abhijit
Date: Sun, 16 May 1999 00:00
49 lines
2247 bytes
I am creating a simple JTable. The data shows up, but the column header
(with the column names)
does not show up. Any suggestions???

CODE
//------------------------------------------
public class Frame1 extends DecoratedFrame
{
      /***************************************************
      ****************************************************/
      //Construct the frame
      XYLayout xYLayout1 = new XYLayout();

      String[][] data = {{"1","2","3"},{"4","5","6"}};
      String[] Header = {"A","B","C"};

      JTable jTable1 = new JTable(data,Header);

      /***************************************************
      ****************************************************/
      public Frame1()
      {
            try{
              jbInit();
            }
            catch (Exception e)  {
              e.printStackTrace();
            }
  }
  /***************************************************
  //Component initialization
  ****************************************************/
  private void jbInit() throws Exception
  {
    this.setLayout(xYLayout1);
    this.setSize(new Dimension(400, 300));
    this.setTitle("Frame Title");
    this.add(jTable1, new XYConstraints(37, 32, 314, 197));
  }
  /***************************************************
  ****************************************************/
  public static void main(String[] args)
  {
    Frame1 frame11 = new Frame1();
    frame11.show(true);
  }
  /***************************************************
  ****************************************************/
}
Technical Details
Message-ID: <373EE60F.5AB37F0C@thecia.net>
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: f74b3,bc4d00e96403c103,start
X-Google-Attributes: gidf74b3,public
From: Abhijit <sushmita@thecia.net>
Subject: JTable help???
Date: 1999/05/16
Message-ID: <373EE60F.5AB37F0C@thecia.net>
X-Deja-AN: 478490447
Content-Transfer-Encoding: 7bit
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: newsabuse@remarQ.com
X-Trace: 926868591.280.6 RVZ2HLERC274CD829C qube-01.us-ca.remarq.com
Organization: Posted via RemarQ Communities, Inc.
MIME-Version: 1.0
NNTP-Posting-Date: Sun, 16 May 1999 15:29:51 GMT
Newsgroups: borland.public.jbuilder.java.language