🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

NPE in JFileChooser on Windows XP

#634
From: Lori M Olson [TeamB]
Date: Thu, 31 Mar 2005 00:05
93 lines
4023 bytes
I'm baffled.  I'm just running a little test program from inside 
JBuilder that invokes the JFileChooser, with a filter for only XML 
files, and I'm getting this exception thrown in the console.  Any ideas?

java.lang.NullPointerException

	at
javax.swing.plaf.basic.BasicListUI.updateLayoutState(BasicListUI.java:1155)

	at
javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1098)

	at javax.swing.plaf.basic.BasicListUI.getCellBounds(BasicListUI.java:736)

	at javax.swing.JList.getCellBounds(JList.java:1175)

	at javax.swing.JList.ensureIndexIsVisible(JList.java:955)

	at
com.sun.java.swing.plaf.windows.WindowsFileChooserUI.ensureIndexIsVisible(WindowsFileChooserUI.java:1797)

	at
com.sun.java.swing.plaf.windows.WindowsFileChooserUI.ensureFileIsVisible(WindowsFileChooserUI.java:1805)

	at javax.swing.JFileChooser.ensureFileIsVisible(JFileChooser.java:570)

	at javax.swing.JFileChooser.setSelectedFile(JFileChooser.java:451)

	at
com.sun.java.swing.plaf.windows.WindowsFileChooserUI$14.valueChanged(WindowsFileChooserUI.java:1216)

	at javax.swing.JList.fireSelectionValueChanged(JList.java:1321)

	at javax.swing.JList$ListSelectionHandler.valueChanged(JList.java:1335)

	at
javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:187)

	at
javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:167)

	at
javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:214)

	at
javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:402)

	at
javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:411)

	at
javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:435)

	at
com.sun.java.swing.plaf.windows.WindowsFileChooserUI.setFileSelected(WindowsFileChooserUI.java:1558)

	at
com.sun.java.swing.plaf.windows.WindowsFileChooserUI$DelayedSelectionUpdater.run(WindowsFileChooserUI.java:1142)

	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)

	at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)

	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)

	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)

	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)

	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)

	at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

-- 

Regards,

Lori Olson [TeamB]

------------

Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.

Google Advanced Newsgroup Search
     http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
     http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
     http://www.visi.com/~gyles19/fom-serve/cache/1.html
Technical Details
Message-ID: <424b3ed5$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!newsread.com!news-xfer.newsread.com!nntp.abs.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,9034db142b4d6b94,start
X-Google-Attributes: gid111d45,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 30 Mar 2005 17:05:43 -0700
From: "Lori M Olson [TeamB]" <javadragon@techie.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax;nscd1)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing
Subject: NPE in JFileChooser on Windows XP
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 142.179.181.200
Message-ID: <424b3ed5$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1112227541 142.179.181.200 (30 Mar 2005 16:05:41 -0800)
Lines: 93
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!newsread.com!news-xfer.newsread.com!nntp.abs.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail