History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-22693
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Dmitry Jemerov
Reporter: Thomas Edwin Santosa
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

java.lang.InstantiationError with abstract custom create component

Created: 18 Oct 07 01:45   Updated: 06 Dec 07 18:53
Component/s: GUI Designer
Fix Version/s: Selena 7.0.2

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 7,361
Fixed in build: 7,508
Severity: High


 Description  « Hide
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.



 All   Comments   Work Log   Change History      Sort Order:
Thomas Edwin Santosa - 18 Oct 07 18:26
wow, that's fast.