🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Inserting JComboBox in a JTable

#16529
From: Tor Iver Wilhelmsen
Date: Wed, 10 Feb 1999 00:00
19 lines
993 bytes
"Jonathan" <plaskowj@logica.com> writes:

> Does anyone know how to put a JComboBox in a JTable, if so can you give me
> an example?

import javax.swing.*;
import javax.swing.table.*;

public class MyComboBoxCell extends JComboBox implements
  TableCellRenderer {

    public Component getTableCellRendererComponent(JTable table,
          Object value, boolean isSelected, boolean hasFocus, int row,
          int column) {
      
         // Set the JComboBox's values here
         return this;
     }
}
Technical Details
Message-ID: <ud83iip0l.fsf@sds.no>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <79pruu$5ne9@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,671dd4830443f65e
X-Google-Attributes: gidf74b3,public
From: Tor Iver Wilhelmsen <tor.wilhelmsen@sds.no>
Subject: Re: Inserting JComboBox in a JTable
Date: 1999/02/10
Message-ID: <ud83iip0l.fsf@sds.no>
X-Deja-AN: 442741455
Sender: towi@SDSA1761
References: <79pruu$5ne9@forums.borland.com>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.language