Project
IntelliJ IDEA
Priority
Normal
Type
Bug
Fix versions
No Fix versions
State
Fixed
Assignee
Dmitry Jemerov
Subsystem
GUI Designer
Affected versions
No Affected versions
Fixed in build
108.65  
  • Created by   Thomas Edwin Santosa
    4 years ago (18 Oct 2007 02:45)
  • Updated by   root
    2 years ago (17 Jan 2010 20:54)
  • Jira: IDEADEV-22693
    (history, comments)
 
IDEA-41603 java.lang.InstantiationError with abstract custom create component
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
I want to add a JGoodies separator. So, I add JComponent to the palette and drop it to my form.
I set customCreate to true.
I add this code below:
private void createUIComponents() {
    woSeparator = DefaultComponentFactory.getInstance().createSeparator("Work Order");
}


Then, I try to preview the form. InstantiationError is thrown:
Exception in thread "main" java.lang.InstantiationError: javax.swing.JComponent
	at FormPreviewFrame.$$$setupUI$$$(FormPreviewFrame.java)
	at FormPreviewFrame.<init>(FormPreviewFrame.java:69)
	at FormPreviewFrame.main(FormPreviewFrame.java:15)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)


I think IDEA tried to instantiate the class although the class is abstract. It should be better to skip abstract custom created components.

Issue was resolved
Comments (1)
 
History
 
Linked Issues (?)
 
Thomas Edwin Santosa
  Thomas Edwin Santosa
18 Oct 2007 19:26
4 years ago
wow, that's fast.