🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Setting Column Widths in JTable

#12632
From: Marc Maman
Date: Thu, 03 Dec 1998 00:00
19 lines
1109 bytes
The following code works fine with the applet viewer and also with
Netscape when run as an applet. However, it does not work with Sun's
Java plug-in for Netscape. Any ideas?

      final static String[] column_labels =
      {
        "COLUMNA", "COLUMNB", "COLUMNC", "COLUMND", "COLUMNE"
      };
      final static int[] column_widths =
      {
        70, 70, 420, 70, 70
      };

         for (int i=0; i<column_widths.length; i++)
         {
                 TableColumn column = jTable1.getColumn( column_labels[
i ] );
                 column.setWidth( column_widths[i] );
         }
Technical Details
Message-ID: <3666AEBB.4B3B8D34@hypercon.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,7cd3722a73fee868,start
X-Google-Attributes: gid111d45,public
From: Marc Maman <marc_maman@hypercon.com>
Subject: Setting Column Widths in JTable
Date: 1998/12/03
Message-ID: <3666AEBB.4B3B8D34@hypercon.com>
X-Deja-AN: 418263300
Content-Transfer-Encoding: 7bit
Organization: Another Netscape Collabra Server User
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing