# IgnitionDesigner cannot be cast to javax.swing.JComponent

**URL:** <https://forum.inductiveautomation.com/t/ignitiondesigner-cannot-be-cast-to-javax-swing-jcomponent/5163>\
**Category:** Ignition\
**Created:** [September 19, 2012, 4:03pm UTC](https://forum.inductiveautomation.com/t/ignitiondesigner-cannot-be-cast-to-javax-swing-jcomponent/5163 "2012-09-19T16:03:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.inductiveautomation.com/u/Jonathan)\
**Post date:** [September 19, 2012, 4:03pm UTC](https://forum.inductiveautomation.com/t/ignitiondesigner-cannot-be-cast-to-javax-swing-jcomponent/5163/1 "2012-09-19T16:03:50Z")

</div>

When I am in the designer using preview mode and click a component in the project browser I receive the following error message. all components will cause the error except the window and the root container.

[code]java.lang.ClassCastException: com.inductiveautomation.ignition.designer.IgnitionDesigner cannot be cast to javax.swing.JComponent  
at com.inductiveautomation.factorypmi.application.components.util.FPMILayout.getOffsettingParent(FPMILayout.java:577)  
at com.inductiveautomation.factorypmi.designer.workspace.WindowWorkspace$Delegate.getOffsettingParent(WindowWorkspace.java:2720)  
at com.inductiveautomation.factorypmi.designer.workspace.WindowWorkspace$Delegate.convertRectSpecial(WindowWorkspace.java:2673)  
at com.inductiveautomation.factorypmi.designer.workspace.WindowWorkspace$Delegate.getBounds(WindowWorkspace.java:2653)  
at com.inductiveautomation.ignition.designer.designable.tools.SelectionTool.getStatusBarText(SelectionTool.java:393)  
at com.inductiveautomation.ignition.designer.designable.AbstractDesignableWorkspace.updateStatusBarText(AbstractDesignableWorkspace.java:157)  
at com.inductiveautomation.ignition.designer.designable.AbstractDesignableWorkspace$3.itemSelectionChanged(AbstractDesignableWorkspace.java:134)  
at com.inductiveautomation.ignition.designer.designable.AbstractDesignableWorkspace.fireSelectedItemsChanged(AbstractDesignableWorkspace.java:261)  
at com.inductiveautomation.ignition.designer.designable.AbstractDesignableWorkspace.setSelectedItems(AbstractDesignableWorkspace.java:244)  
at com.inductiveautomation.factorypmi.designer.model.navtree.AbstractTopLevelContainerNode.onChildrenSelected(AbstractTopLevelContainerNode.java:275)  
at com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode.dispatchSelectionEvent(AbstractNavTreeNode.java:624)  
at com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode.dispatchSelectionEvent(AbstractNavTreeNode.java:620)  
at com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode.dispatchSelectionEvent(AbstractNavTreeNode.java:620)  
at com.inductiveautomation.ignition.designer.navtree.NavTreePanel$SelectionListener.valueChanged(NavTreePanel.java:437)  
at javax.swing.JTree.fireValueChanged(Unknown Source)  
at javax.swing.JTree$TreeSelectionRedirector.valueChanged(Unknown Source)  
at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(Unknown Source)  
at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(Unknown Source)  
at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(Unknown Source)  
at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(Unknown Source)  
at javax.swing.JTree.setSelectionPath(Unknown Source)  
at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(Unknown Source)  
at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(Unknown Source)  
at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressedDND(Unknown Source)  
at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(Unknown Source)  
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)  
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)  
at java.awt.Component.processMouseEvent(Unknown Source)  
at javax.swing.JComponent.processMouseEvent(Unknown Source)  
at java.awt.Component.processEvent(Unknown Source)  
at java.awt.Container.processEvent(Unknown Source)  
at java.awt.Component.dispatchEventImpl(Unknown Source)  
at java.awt.Container.dispatchEventImpl(Unknown Source)  
at java.awt.Component.dispatchEvent(Unknown Source)  
at com.jidesoft.docking.b.a(Unknown Source)  
at com.jidesoft.docking.DefaultDockingManager.handleEvent(Unknown Source)  
at com.jidesoft.docking.DefaultDockingManager$49.eventDispatched(Unknown Source)  
at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Unknown Source)  
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)  
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)  
at java.awt.Toolkit.notifyAWTEventListeners(Unknown Source)  
at java.awt.Component.dispatchEventImpl(Unknown Source)  
at java.awt.Container.dispatchEventImpl(Unknown Source)  
at java.awt.Component.dispatchEvent(Unknown Source)  
at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)  
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)  
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)  
at java.awt.Component.dispatchEventImpl(Unknown Source)  
at java.awt.Container.dispatchEventImpl(Unknown Source)  
at java.awt.Window.dispatchEventImpl(Unknown Source)  
at java.awt.Component.dispatchEvent(Unknown Source)  
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)  
at java.awt.EventQueue.access$000(Unknown Source)  
at java.awt.EventQueue$1.run(Unknown Source)  
at java.awt.EventQueue$1.run(Unknown Source)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)  
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)  
at java.awt.EventQueue$2.run(Unknown Source)  
at java.awt.EventQueue$2.run(Unknown Source)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)  
at java.awt.EventQueue.dispatchEvent(Unknown Source)  
at java.awt.SequencedEvent.dispatch(Unknown Source)  
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)  
at java.awt.EventQueue.access$000(Unknown Source)  
at java.awt.EventQueue$1.run(Unknown Source)  
at java.awt.EventQueue$1.run(Unknown Source)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)  
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)  
at java.awt.EventQueue$2.run(Unknown Source)  
at java.awt.EventQueue$2.run(Unknown Source)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)  
at java.awt.EventQueue.dispatchEvent(Unknown Source)  
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)  
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)  
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)  
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)  
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)  
at java.awt.EventDispatchThread.run(Unknown Source)

Ignition v7.5.2 (b1146)  
Java: Sun Microsystems Inc. 1.6.0\_33  
[/code]

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [September 20, 2012, 11:13am UTC](https://forum.inductiveautomation.com/t/ignitiondesigner-cannot-be-cast-to-javax-swing-jcomponent/5163/2 "2012-09-20T11:13:15Z")

</div>

Confirmed here as well.

Ignition v7.5.2 (b1146)  
Java: Sun Microsystems Inc. 1.6.0\_26  
Ubuntu 12.04 64-bit

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [September 20, 2012, 3:43pm UTC](https://forum.inductiveautomation.com/t/ignitiondesigner-cannot-be-cast-to-javax-swing-jcomponent/5163/3 "2012-09-20T15:43:42Z")

</div>

This problem was fixed in 7.5.3. Upgrading will solve the problem.

---

<div class="post-metadata">

**Author:** ![cbabb](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cbabb/32/49029_2.png) [@cbabb](https://forum.inductiveautomation.com/u/cbabb)\
**Post date:** [December 19, 2012, 2:56pm UTC](https://forum.inductiveautomation.com/t/ignitiondesigner-cannot-be-cast-to-javax-swing-jcomponent/5163/4 "2012-12-19T14:56:13Z")

</div>

> [@Travis.Cox](#):
>
> This problem was fixed in 7.5.3. Upgrading will solve the problem.

> [@](#):
>
> When I am in the designer using preview mode and click a component in the project browser I receive the following error message. all components will cause the error except the window and the root container.

Same thing for me, but I'm getting this in 7.5.4

[code]ClassCastException: com.inductiveautomation.ignition.designer.IgnitionDesigner cannot be cast to javax.swing.JComponent

Ignition v7.5.4 (b1206)  
Java: Sun Microsystems Inc. 1.6.0\_30[/code]

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [December 19, 2012, 5:09pm UTC](https://forum.inductiveautomation.com/t/ignitiondesigner-cannot-be-cast-to-javax-swing-jcomponent/5163/5 "2012-12-19T17:09:38Z")

</div>

This is working fine for us with 7.5.4.

Ignition v7.5.4 (b1206)  
Java: OpenJDK 1.7.0\_9  
Ubuntu 12.10 64-bit

---

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [December 19, 2012, 6:41pm UTC](https://forum.inductiveautomation.com/t/ignitiondesigner-cannot-be-cast-to-javax-swing-jcomponent/5163/6 "2012-12-19T18:41:28Z")

</div>

Just found this thread and wanted to let you know that i see the same on 7.5.5-beta 5 on windows. It happens on a system using Java 1.6.37. On another machine running Java 1.7.9 i don’t get an exception but selecting a component in the nav tree does nothing while in preview mode.

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [December 19, 2012, 7:11pm UTC](https://forum.inductiveautomation.com/t/ignitiondesigner-cannot-be-cast-to-javax-swing-jcomponent/5163/7 "2012-12-19T19:11:06Z")

</div>

Yeah, I can confirm that this exception is being thrown in the latest version of Ignition. I’ll put in a bug ticket for this issue.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [March 14, 2013, 5:38pm UTC](https://forum.inductiveautomation.com/t/ignitiondesigner-cannot-be-cast-to-javax-swing-jcomponent/5163/8 "2013-03-14T17:38:39Z")

</div>

Oops - this post slipped my net. This was fixed (for real this time) in 7.5.6.
