This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 73567 - java.lang.ClassCastException: org.netbeans.core.windows.view.EditorView$EditorAreaComponent
Summary: java.lang.ClassCastException: org.netbeans.core.windows.view.EditorView$Edito...
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
: 73576 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-14 06:35 UTC by roc
Modified: 2008-12-22 18:59 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description roc 2006-03-14 06:35:54 UTC
I get this error when running netBeans 5.0, before it starts loading classpaths.
The very first time I ran it, netbeans seemed to all work fine. The issue is now
suddenly recurring after I closed a sample project (I THINK). I'm really not
sure exactly how to reproduce these steps because it took me a while to install.
When I installed it in windows it wouldn't let me use a graphical interface,
then it wouldn't detect the latest JDK I just installed last night. I really
can't do much in netBeans because I can't see 90% of the user interface or click
on it. Let me know if you need any other information. I am a skilled developer,
and am here to help.

If this cannot be resolved (am I the only one?), then could someone please
instruct me on how to properly uninstall netbeans so I can try a re-install.
When I reinstall in silent mode it replaces the config file etc, but there must
be registry settings that are still remembered, and are causing the program to
always have exceptions at runtime. When I use add/remove programs in xp, it says
it "cannot run the graphical installer"; I am guessing it's the same executable
as the initial installation program. What is the command line to trigger
uninstall? Cheers

java.lang.ClassCastException:
org.netbeans.core.windows.view.EditorView$EditorAreaComponent
	at
javax.swing.plaf.metal.MetalBorders$ScrollPaneBorder.paintBorder(MetalBorders.java:899)
	at javax.swing.JComponent.paintBorder(JComponent.java:903)
	at javax.swing.JComponent.paint(JComponent.java:1006)
	at javax.swing.JComponent.paintChildren(JComponent.java:842)
	at javax.swing.JComponent.paint(JComponent.java:1014)
	at org.netbeans.core.windows.view.ui.MultiSplitPane.paint(MultiSplitPane.java:291)
	at javax.swing.JComponent.paintChildren(JComponent.java:842)
	at javax.swing.JComponent.paint(JComponent.java:1014)
	at org.netbeans.core.windows.view.ui.MultiSplitPane.paint(MultiSplitPane.java:291)
	at javax.swing.JComponent.paintChildren(JComponent.java:842)
	at javax.swing.JComponent.paint(JComponent.java:1014)
	at javax.swing.JComponent.paintChildren(JComponent.java:842)
	at javax.swing.JComponent.paint(JComponent.java:1014)
	at javax.swing.JLayeredPane.paint(JLayeredPane.java:559)
	at javax.swing.JComponent.paintChildren(JComponent.java:842)
	at javax.swing.JComponent.paint(JComponent.java:1014)
	at javax.swing.JComponent.paintChildren(JComponent.java:842)
	at javax.swing.JComponent.paint(JComponent.java:1014)
	at javax.swing.JComponent.paintChildren(JComponent.java:842)
	at javax.swing.JComponent.paint(JComponent.java:1014)
	at javax.swing.JLayeredPane.paint(JLayeredPane.java:559)
	at javax.swing.JComponent.paintChildren(JComponent.java:842)
	at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4970)
	at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
	at javax.swing.JComponent.paint(JComponent.java:995)
	at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
	at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
	at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
	at java.awt.Container.paint(Container.java:1709)
	at org.netbeans.core.windows.view.ui.MainWindow.paint(MainWindow.java:530)
	at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
	at sun.awt.RepaintArea.paint(RepaintArea.java:224)
	at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:254)
	at java.awt.Component.dispatchEventImpl(Component.java:4031)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Window.dispatchEventImpl(Window.java:1774)
	at java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 roc 2006-03-14 06:53:45 UTC
I solved this issue by opening a project, then viewing a file in the editor view
by double clicking it with the half broken gui. Suddenly my EditorView sprung
back into life and there was no exception! Weird. Don't know if this needs
looking at or not; if no one thinks so, can someone please set the status to FIXED.
Comment 2 roc 2006-03-14 09:02:42 UTC
Ok I did some more investigating, and it happens whenever I close all the
document tabs. This seems like quite a big issue, does it happen for anyone
else? Sorry, I'm pretty new to all this.
Comment 3 Marian Mirilovic 2006-03-15 06:45:56 UTC
What JDK are you using? Have you changed L&F?
Comment 4 Marian Mirilovic 2006-03-15 06:46:32 UTC
*** Issue 73576 has been marked as a duplicate of this issue. ***
Comment 5 roc 2006-03-15 09:27:44 UTC
I got the latest J2EE JDK version 1.4.03 for win32 before installing netbeans 5.0.
Comment 6 David Simonek 2006-04-27 16:18:41 UTC
Passing to Standa, smt with MultiSplitPane painting. However I never saw such a bug.

Reporter (roc) please, could you try with JDK 1.5? Also, are you running with
metal L&F forced on windows? Otherwise I don't see why "MetalBorders" are even
called on Win XP...
Comment 7 roc 2006-04-28 01:05:05 UTC
I am using JDK 1.5 from C:\Sun\AppServer\jdk\jre.

I'm not sure what metal L&F is or if I have metal borders forced. I haven't
changed many java or netbeans settings at all, but how can I check? My netbeans
borders look smooth and metallic with rivets, from my opinion. They look
different to my installation in linux though, the linux one is more flat
looking, windows is  more 3d.
Comment 8 roc 2006-04-28 01:10:28 UTC
I also get this similar exception when I click advanced options in Tools->Options.

java.lang.ClassCastException: javax.swing.JSplitPane
	at
javax.swing.plaf.metal.MetalBorders$ScrollPaneBorder.paintBorder(MetalBorders.java:899)
	at javax.swing.JComponent.paintBorder(JComponent.java:903)
	at javax.swing.JComponent.paint(JComponent.java:1006)
	at javax.swing.JComponent.paintChildren(JComponent.java:842)
	at javax.swing.JComponent.paint(JComponent.java:1014)
	at javax.swing.JComponent.paintChildren(JComponent.java:842)
	at javax.swing.JComponent.paint(JComponent.java:1014)
	at javax.swing.JComponent.paintChildren(JComponent.java:842)
	at javax.swing.JComponent.paint(JComponent.java:1014)
	at javax.swing.JComponent.paintChildren(JComponent.java:842)
	at javax.swing.JComponent.paint(JComponent.java:1014)
	at javax.swing.JLayeredPane.paint(JLayeredPane.java:559)
	at javax.swing.JComponent.paintChildren(JComponent.java:842)
	at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4970)
	at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
	at javax.swing.JComponent.paint(JComponent.java:995)
	at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
	at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
	at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
	at java.awt.Container.paint(Container.java:1709)
	at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
	at sun.awt.RepaintArea.paint(RepaintArea.java:224)
	at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:254)
	at java.awt.Component.dispatchEventImpl(Component.java:4031)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Window.dispatchEventImpl(Window.java:1774)
	at java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 9 Stanislav Aubrecht 2006-05-23 12:09:11 UTC
i haven't found any relevant references to javax.swing.plaf.metal.MetalBorders
neither in netbeans source tree nor in swing sources.

is this reproducible with a fresh jdk/jre installation and fresh netbeans
installation?

roc, please try running the swingset demo application to see if it's a jre/jdk
problem.
Comment 10 Stanislav Aubrecht 2006-06-26 15:05:24 UTC
can't reproduce - closing

please reopen if you can reproduce on a clean user dir using latest jdk.