🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Validity checking in JTree?

#8476
From: Roland Zumkeller
Date: Mon, 28 Aug 2000 00:00
18 lines
1220 bytes
Hi,
I'w writing an application which contains a JTree. The nodes of the tree
contain dates (mm/dd/yyyy) and are editable. If the selection is changed
while a node is being edited the pending changes should be saved. (I
achieved this by extendeding JTree and setting the protected field
'invokesStopCellEditing' to true.)
But what if the pending changes are illegal, i.e. the date entered is
invalid? I want to do the validity checking, both when editing is
finished by pressing the enter key and when it's finished by changing
the selection.
(I don't want to let the user go away until he provides something valid
or aborts.)

Do you have any ideas how to do this?

Thank you,

Roland
Technical Details
Message-ID: <39AA4C11.C7C6FF05@web.de>
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,5e6a7d474330d545,start
X-Google-Attributes: gid111d45,public
From: Roland Zumkeller <Roland.Zumkeller@web.de>
Subject: Validity checking in JTree?
Date: 2000/08/28
Message-ID: <39AA4C11.C7C6FF05@web.de>
X-Deja-AN: 663431862
Content-Transfer-Encoding: 7bit
Organization: Another Netscape Collabra Server User
X-Accept-Language: de
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing