Exception NumberFormatException when creating an instance of JFileChooser

N

noreic

Hi,

I getting a NumberFormatException executing the following code:

JFileChooser fc = new JFileChooser();

The following line is called in my code in
...
ReadFileFrame.<init>() line: 23
...

Yes, it is simple JFileChooser instance... I'm using JDK 1_5, Swing in
a XP Pro machine and the only thing that I can remember that have been
changed in my environment was a Windows Update.

Based in the stack, I believe that something is broken in the way that
Java is getting some Windows UI data.

The stack:

Thread [AWT-EventQueue-0] (Suspended (exception NumberFormatException))
Integer.parseInt(String, int) line: 447
Integer.parseInt(String) line: 497
Win32ShellFolderManager2.get(String) line: 234
ShellFolder.get(String) line: 221
WindowsLookAndFeel$LazyWindowsIcon.createValue(UIDefaults) line: 1876
UIDefaults.getFromHashtable(Object) line: 183
UIDefaults.get(Object) line: 128
MultiUIDefaults.get(Object) line: 44
MultiUIDefaults(UIDefaults).getIcon(Object) line: 409
UIManager.getIcon(Object) line: 613
WindowsFileChooserUI(BasicFileChooserUI).installIcons(JFileChooser)
line: 237
WindowsFileChooserUI(BasicFileChooserUI).installDefaults(JFileChooser)
line: 219
WindowsFileChooserUI(BasicFileChooserUI).installUI(JComponent) line:
135
WindowsFileChooserUI.installUI(JComponent) line: 140
JFileChooser(JComponent).setUI(ComponentUI) line: 650
JFileChooser.updateUI() line: 1755
JFileChooser.setup(FileSystemView) line: 366
JFileChooser.<init>(File, FileSystemView) line: 332
JFileChooser.<init>() line: 285
ReadFileFrame.<init>() line: 23
DecAid.readFile() line: 1086
DecAid.access$1(DecAid) line: 1059
DecAid$ActionListenerAdapter.actionPerformed(ActionEvent) line: 2532
JMenuItem(AbstractButton).fireActionPerformed(ActionEvent) line: 1849
AbstractButton$Handler.actionPerformed(ActionEvent) line: 2169
DefaultButtonModel.fireActionPerformed(ActionEvent) line: 420
DefaultButtonModel.setPressed(boolean) line: 258
JMenuItem(AbstractButton).doClick(int) line: 302
WindowsMenuItemUI(BasicMenuItemUI).doClick(MenuSelectionManager) line:
1000
BasicMenuItemUI$Handler.mouseReleased(MouseEvent) line: 1041
JMenuItem(Component).processMouseEvent(MouseEvent) line: 5488
JMenuItem(JComponent).processMouseEvent(MouseEvent) line: 3093
JMenuItem(Component).processEvent(AWTEvent) line: 5253
JMenuItem(Container).processEvent(AWTEvent) line: 1966
JMenuItem(Component).dispatchEventImpl(AWTEvent) line: 3955
JMenuItem(Container).dispatchEventImpl(AWTEvent) line: 2024
JMenuItem(Component).dispatchEvent(AWTEvent) line: 3803
LightweightDispatcher.retargetMouseEvent(Component, int, MouseEvent)
line: 4212
LightweightDispatcher.processMouseEvent(MouseEvent) line: 3892
LightweightDispatcher.dispatchEvent(AWTEvent) line: 3822
JFrame(Container).dispatchEventImpl(AWTEvent) line: 2010
JFrame(Window).dispatchEventImpl(AWTEvent) line: 1766
JFrame(Component).dispatchEvent(AWTEvent) line: 3803
EventQueue.dispatchEvent(AWTEvent) line: 463
EventDispatchThread.pumpOneEventForHierarchy(int, Component) line: 234
EventDispatchThread.pumpEventsForHierarchy(int, Conditional,
Component) line: 163
EventDispatchThread.pumpEvents(int, Conditional) line: 157
EventDispatchThread.pumpEvents(Conditional) line: 149
EventDispatchThread.run() line: 110
 
J

Joan

Hi,

I getting a NumberFormatException executing the following code:

JFileChooser fc = new JFileChooser();

The following line is called in my code in
...
ReadFileFrame.<init>() line: 23
...

Yes, it is simple JFileChooser instance... I'm using JDK 1_5,
Swing in

Not "simple" you are using file system view. Simple is without
file system view.
Try that just to see if you get further along before an
exception.

a XP Pro machine and the only thing that I can remember that
have been
changed in my environment was a Windows Update.

Based in the stack, I believe that something is broken in the
way that
Java is getting some Windows UI data.

The stack:

Thread [AWT-EventQueue-0] (Suspended (exception
NumberFormatException))
Integer.parseInt(String, int) line: 447
Integer.parseInt(String) line: 497
Win32ShellFolderManager2.get(String) line: 234
ShellFolder.get(String) line: 221
WindowsLookAndFeel$LazyWindowsIcon.createValue(UIDefaults)
line: 1876
UIDefaults.getFromHashtable(Object) line: 183
UIDefaults.get(Object) line: 128
MultiUIDefaults.get(Object) line: 44
MultiUIDefaults(UIDefaults).getIcon(Object) line: 409
UIManager.getIcon(Object) line: 613
WindowsFileChooserUI(BasicFileChooserUI).installIcons(JFileChooser)
line: 237
WindowsFileChooserUI(BasicFileChooserUI).installDefaults(JFileChooser)
line: 219
WindowsFileChooserUI(BasicFileChooserUI).installUI(JComponent)
line:
135
WindowsFileChooserUI.installUI(JComponent) line: 140
JFileChooser(JComponent).setUI(ComponentUI) line: 650
JFileChooser.updateUI() line: 1755
JFileChooser.setup(FileSystemView) line: 366
JFileChooser.<init>(File, FileSystemView) line: 332
JFileChooser.<init>() line: 285
ReadFileFrame.<init>() line: 23
DecAid.readFile() line: 1086
DecAid.access$1(DecAid) line: 1059
DecAid$ActionListenerAdapter.actionPerformed(ActionEvent) line:
2532
JMenuItem(AbstractButton).fireActionPerformed(ActionEvent)
line: 1849
AbstractButton$Handler.actionPerformed(ActionEvent) line: 2169
DefaultButtonModel.fireActionPerformed(ActionEvent) line: 420
DefaultButtonModel.setPressed(boolean) line: 258
JMenuItem(AbstractButton).doClick(int) line: 302
WindowsMenuItemUI(BasicMenuItemUI).doClick(MenuSelectionManager)
line:
1000
BasicMenuItemUI$Handler.mouseReleased(MouseEvent) line: 1041
JMenuItem(Component).processMouseEvent(MouseEvent) line: 5488
JMenuItem(JComponent).processMouseEvent(MouseEvent) line: 3093
JMenuItem(Component).processEvent(AWTEvent) line: 5253
JMenuItem(Container).processEvent(AWTEvent) line: 1966
JMenuItem(Component).dispatchEventImpl(AWTEvent) line: 3955
JMenuItem(Container).dispatchEventImpl(AWTEvent) line: 2024
JMenuItem(Component).dispatchEvent(AWTEvent) line: 3803
LightweightDispatcher.retargetMouseEvent(Component, int,
MouseEvent)
line: 4212
LightweightDispatcher.processMouseEvent(MouseEvent) line: 3892
LightweightDispatcher.dispatchEvent(AWTEvent) line: 3822
JFrame(Container).dispatchEventImpl(AWTEvent) line: 2010
JFrame(Window).dispatchEventImpl(AWTEvent) line: 1766
JFrame(Component).dispatchEvent(AWTEvent) line: 3803
EventQueue.dispatchEvent(AWTEvent) line: 463
EventDispatchThread.pumpOneEventForHierarchy(int, Component)
line: 234
EventDispatchThread.pumpEventsForHierarchy(int, Conditional,
Component) line: 163
EventDispatchThread.pumpEvents(int, Conditional) line: 157
EventDispatchThread.pumpEvents(Conditional) line: 149
EventDispatchThread.run() line: 110
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Paintbrush In Java 0
problem in java swings 0
Help in Java swings(internal Frame) 2
JTextPane 0
Glasspane and Saving Graphics 8
JTables 1
storing and accessing mouse coordintates in an array 5
EncryptoPro! 3

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top