🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Focus problem with JSplitPane

#12520
From: ICS
Date: Thu, 17 Dec 1998 00:00
27 lines
1688 bytes
Java Swing-ers,

I have created an application with a JTree as the left component and
separate pane-view classes for the right component of the JSplitPane, one
for each node. The JTree is essentially a menu, when you click on a node
the appropriate view is created and set as the right component. I have this
working fairly well - Windows Explorer or JBuilder have a very similar
look.

PROBLEM: When any view (right component) with a JTextField receives focus
and I click on a node in the JTree (other than the node for the displayed
view) - when I return to this view, the vertical edit bar does not display
in the JTextField. It acts like the focus is getting messed up somehow in
fact, I have focus listeners for my JTextFields and I put
System.out.println's in their functions and it never prints out that the
focus was permanently or temporarily lost when this occurs. I can avoid the
problem if I set focus in the JTextField and then click on the node
associated with this view and then traverse the tree - when I come back it
okay - the JTextFields have the vertical edit bar.

Any suggestions would be appreciated.

-- 
Joe Weder
Software Engineer
ICS
jweder@icsaward.com
Technical Details
Message-ID: <01be29c7$cf917640$70b5aad0@ics>
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,d30d819f3f1c4106,start
X-Google-Attributes: gid111d45,public
From: "ICS" <jweder@icsaward.com>
Subject: Focus problem with JSplitPane
Date: 1998/12/17
Message-ID: <01be29c7$cf917640$70b5aad0@ics>
X-Deja-AN: 423253706
Content-Transfer-Encoding: 7bit
Organization: Intelligent Computer Systems
Content-Type: text/plain; charset=ISO-8859-1
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing