GUI Form "Morph Component..." menu not appearing.
Answered
I am on IntelliJ version 2017.3.4.
After placing a JTextField inside the form creation area and inside a JPanel I am unable to morph the JTextField into any other compatible component like JFormattedTextField because when I right click on the component in the form view or the added component tree listing on the left side the option "Morph Component..." does nothing at all.
I have restarted the program and my computer to no avail.
Can anyone please point out to me why this problem might exist?
Thanks.
Please sign in to leave a comment.
Any errors in idea.log (https://intellij-support.jetbrains.com/hc/articles/207241085)? Bug report with the sample to reproduce and the logs is welcome at https://youtrack.jetbrains.com/issues/IDEA.
Here is the error that appears after trying to morph a component:
2018-03-14 03:03:14,659 [96027344] ERROR - llij.ide.plugins.PluginManager - views/AddActorForm has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
java.lang.UnsupportedClassVersionError: views/AddActorForm has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:276)
at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:272)
at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:226)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.intellij.uiDesigner.designSurface.InsertComponentProcessor.getRadComponentFactory(InsertComponentProcessor.java:531)
at com.intellij.uiDesigner.designSurface.InsertComponentProcessor.getRadComponentFactory(InsertComponentProcessor.java:524)
at com.intellij.uiDesigner.actions.PaletteListPopupStep.hideNonAtomic(PaletteListPopupStep.java:155)
at com.intellij.uiDesigner.actions.MorphAction.actionPerformed(MorphAction.java:81)
at com.intellij.uiDesigner.actions.AbstractGuiEditorAction.lambda$actionPerformed$0(AbstractGuiEditorAction.java:59)
at com.intellij.uiDesigner.actions.AbstractGuiEditorAction.actionPerformed(AbstractGuiEditorAction.java:68)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:220)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:237)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.a(ActionMenuItem.java:321)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:911)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:136)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:311)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.a(ActionMenuItem.java:130)
at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:111)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:120)
at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:122)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:130)
at com.intellij.ui.plaf.beg.BegMenuItemUI.a(BegMenuItemUI.java:521)
at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:48)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:541)
at java.awt.Component.processMouseEvent(Component.java:6541)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6306)
at java.awt.Container.processEvent(Container.java:2237)
at java.awt.Component.dispatchEventImpl(Component.java:4897)
at java.awt.Container.dispatchEventImpl(Container.java:2295)
at java.awt.Component.dispatchEvent(Component.java:4719)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
at java.awt.Container.dispatchEventImpl(Container.java:2281)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4719)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.awt.EventQueue$4.run(EventQueue.java:735)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.j(IdeEventQueue.java:822)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:646)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:366)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
2018-03-14 03:03:14,660 [96027345] ERROR - llij.ide.plugins.PluginManager - IntelliJ IDEA 2017.3.4 Build #IU-173.4548.28
2018-03-14 03:03:14,660 [96027345] ERROR - llij.ide.plugins.PluginManager - JDK: 1.8.0_152-release
2018-03-14 03:03:14,660 [96027345] ERROR - llij.ide.plugins.PluginManager - VM: OpenJDK 64-Bit Server VM
2018-03-14 03:03:14,660 [96027345] ERROR - llij.ide.plugins.PluginManager - Vendor: JetBrains s.r.o
2018-03-14 03:03:14,660 [96027345] ERROR - llij.ide.plugins.PluginManager - OS: Windows 8.1
2018-03-14 03:03:14,660 [96027345] ERROR - llij.ide.plugins.PluginManager - Last Action: GuiDesigner.Morph
This stuck out to me "version of the Java Runtime only recognizes class file versions up to 52.0"
I didnt update or downgrade the JRE while working on this current project so I don't know why this could be.
IDE runs on Java 8, if your project uses UI components built with Java 9 or targets Java 9, it will fail since IDE will not be able to load these classes.
It's puzzling because during the course of the project I'am working on I've been able to morph components in the past. All this while I was acquainting myself with the GUI builder. Is there a possibility that using some of the code features available in Java 9 the interferes with the GUI builder? The other parts of the form builder work apart from the "Add component to pallete..."
Thanks for your help so far.
You either need to change project JDK to 8 or run IntelliJ IDEA on Java 9 (which is not officially supported yet).
Thanks I've reverted to JDK 8 for my current project since I'am not using any features specific to Java 9. The morphing and "Add component to pallete..." now works