🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

JCPopupField in a JTable

#7925
From: patrick peck
Date: Wed, 29 Nov 2000 00:07
28 lines
1783 bytes
hi,

i know this is a question for the sitraka newsgroups, but
nobody answered over there, so i'll give it a try here :))

can someone give me instructions on how to use a JCPopupField
(with a JCDateValidator) in a JTable?

i currently use the following code, which somehow works, but it 
results in silly beeping as soon as you choose a value for the
date field the and then change the selected row:
positionsTable=new JTable(new PositionsTableModel());
positionsTable.getColumn("Date").setCellEditor(
   new JCCellEditorToJTable(new
JCPopupFieldCellEditor(GregorianCalendar.class, 
   new JCDateValidator())));
positionsTable.getColumn("Date").setCellRenderer(
   new JCCellRendererToJTable(new
JCPopupFieldCellRenderer(GregorianCalendar.class,
   new JCDateValidator())));


the model of the table returns a GregorianCalendar value
for getValueAt(), and accepts a GregorianCalendar for setValueAt()


thanks in advance,
patrick
Technical Details
Message-ID: <3A2448C4.AA549C7A@zync.at>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!newsfeeds.belnet.be!news.belnet.be!skynet.be!hub.org!hub.org!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,f984358e0e0b5bd2,start
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2000-11-28 16:06:47 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!newsfeeds.belnet.be!news.belnet.be!skynet.be!hub.org!hub.org!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail
From: patrick peck <patrick@zync.at>
Newsgroups: borland.public.jbuilder.java.swing
Subject: JCPopupField in a JTable
Date: Wed, 29 Nov 2000 01:07:32 +0100
Organization: Another Netscape Collabra Server User
Lines: 29
Message-ID: <3A2448C4.AA549C7A@zync.at>
NNTP-Posting-Host: 62.116.9.30
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.16-3 i686)
X-Accept-Language: en