🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Using a JLabel to display a node from a JTree

#10217
From: Jeff Marendo
Date: Thu, 28 Oct 1999 00:00
20 lines
1511 bytes
Hello,

I've created a JTree and a JLabel within an applet.  The contents in the
tree represent reports for a system.  The names are abbreviated, and I'd
like to perform some checks and then display the actual report names in the
JLabel when a user is moving around in the tree.

I'm using some code fragments from a TreeExample (from MageLang Institute on
the java.sun site) that displays the currently selected node and it's full
path in the dos window when executed from JBuilder.  Basically, I want to be
able to display the 'Selected' part of that output in the JLabel.  What's
happening though, is that I'm getting errors when I use a JLable method and
the toString method within some code that is defining a class
(MyTreeSelectionListener) that implements TreeSelectionListener.  The errors
say the methods don't exist within MyTree...

Any suggestions on how I can go about this or where I need to move my code?
Thanks in advance.

Jeff
Technical Details
Message-ID: <7v9po9$9a84@forums.borland.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,415b59006932944a,start
X-Google-Attributes: gid111d45,public
From: "Jeff Marendo" <marendoj@commos.com>
Subject: Using a JLabel to display a node from a JTree
Date: 1999/10/28
Message-ID: <7v9po9$9a84@forums.borland.com>
X-Deja-AN: 541671311
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Organization: CommTech Corporation
X-MSMail-Priority: Normal
Reply-To: "Jeff Marendo" <marendoj@commos.com>
Newsgroups: borland.public.jbuilder.java.swing