🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

JList

#12944
From: Vladimir Olenin
Date: Sat, 10 Oct 1998 00:00
55 lines
2384 bytes
This is a multi-part message in MIME format.
--------------3BD7DFB9698EA12064E808D6
Content-Type: text/plain; charset=koi8-r
Content-Transfer-Encoding: 7bit

How can i add a COMPONENT (not String object, but smth like JTextPane, 4
instance) to JList. I failed to do it though used customized renderer:

  class MyCellRenderer extends JTextPane implements ListCellRenderer {
  public Component getListCellRendererComponent(
  JList list,
  Object value,            // value to display
  int index,               // cell index
  boolean isSelected,      // is the cell selected
  boolean cellHasFocus)    // the list and the cell have the focus
  {
  String s = value.toString();
  setText(s);
  return this;
  }
  }

The question is can i add a component like JTextPane to JList model?
(eg: JList l = new JList(Vector vectorOfJTextPaneComponents)) Or i just
should add there array/Vector of Strings and then use customized
ListCellRenderer? I tried it in both ways and failed.
So, where the problem is? Eagerly waiting 4 your answer,

                                        Vladimir

-- 
+-------+=========+-------+
Join in Java community now!
http://www.geocities.com/SiliconValley/Heights/9815
(NB: the page is under construction now)
+-------+=========+-------+
--------------3BD7DFB9698EA12064E808D6
Content-Type: text/x-vcard; charset=koi8-r;
 name="keenonjava.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Vladimir Olenin
Content-Disposition: attachment;
 filename="keenonjava.vcf"

begin:vcard
n:Vladimir;Olenin
x-mozilla-html:FALSE
adr:version:2.1
version:2.1
email;internet:keenonjava@collegemail.com
note:Java programmer. Open for project development offers. See my home page at: http://www.geocities.com/SiliconValley/Heights/9815/
end:vcard


--------------3BD7DFB9698EA12064E808D6--
Technical Details
Message-ID: <361E814E.AE327D6B@collegemail.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,98630ebe2033c8a2,start
X-Google-Attributes: gid111d45,public
From: Vladimir Olenin <keenonjava@collegemail.com>
Subject: JList
Date: 1998/10/10
Message-ID: <361E814E.AE327D6B@collegemail.com>
X-Deja-AN: 399487726
X-Accept-Language: en,ru
Content-Type: multipart/mixed; boundary="------------3BD7DFB9698EA12064E808D6"
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing