🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Java Swing on Windows: Weird JTree Behavior

#182
From: mb2b
Date: Thu, 17 Aug 2006 16:54
16 lines
1745 bytes
So I have a weird behavior for anyone who would like to solve this
knundrum.  I have JTREE code, that when adding a child node to the root
node, works great on *nix and Mac OS X, however, fails on Windows.  The
code is:(in pseudo)
...
((DefaultMutableTreeNode)((JTree)comp).getModel().getRoot()).setAllowsChildren(true);
DefaultMutableTreeNode child = new DefaultMutableTreeNode("new");
((DefaultMutableTreeNode)((JTree)comp).getModel().getRoot()).add(child);
...
Now, if I run this on Windows it will return: an IllegalStateException:
node does not allow children...

Why is this?

Thanks in advance,
m2
Technical Details
Message-ID: <1155833665.058666.219150@m73g2000cwd.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!m73g2000cwd.googlegroups.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,ec69cad089d6c04c,start
X-Google-Attributes: gid111d45,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!m73g2000cwd.googlegroups.com!not-for-mail
From: "mb2b" <michael.bright@gmail.com>
Newsgroups: borland.public.jbuilder.java.swing
Subject: Java Swing on Windows: Weird JTree Behavior
Date: 17 Aug 2006 09:54:25 -0700
Organization: http://groups.google.com
Lines: 17
Message-ID: <1155833665.058666.219150@m73g2000cwd.googlegroups.com>
NNTP-Posting-Host: 137.65.135.32
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1155833670 26227 127.0.0.1 (17 Aug 2006 16:54:30 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 17 Aug 2006 16:54:30 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060409 SUSE/1.5.0.1-29 Firefox/1.5.0.1,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: m73g2000cwd.googlegroups.com; posting-host=137.65.135.32;
   posting-account=3tS5Dw0AAACrjGP8zlijBlihW7_LOmXP