Skip to main content

Error using JCalendar

1 reply [Last post]
tskale
Offline
Joined: 2005-08-17
Points: 0

I am trying to use JCalendar component as follows:

import javafx.ui.*;
import com.greef.ui.calendar.JCalendar;

class MyWidget extends Widget
{
attribute w: JCalendar;
}

Frame {

title: "hello"
width:600
height: 600
content:

MyWidget {
w: new JCalendar()
}
visible: true
}
While running the applicaiton, following error results. Has anyone used any date picker in JavaFX application:

run:
compile thread: Thread[AWT-EventQueue-0,6,main]
compile 2.75
uncaught FX exception: java.awt.IllegalComponentStateException java.awt.IllegalComponentStateException: contentPane cannot be set to null.

at frame.setContentPane(w.getComponent()) ("jar:file:/C:/Program%20Files/NetBeans%206.0.1/javafx/modules/ext/javafx/javafxrt.jar!/javafx/ui/Frame.fx", Line 303)
at frame.setContentPane(w.getComponent()) ("jar:file:/C:/Program%20Files/NetBeans%206.0.1/javafx/modules/ext/javafx/javafxrt.jar!/javafx/ui/Frame.fx", Line 303)
at this.setContentPane(value) ("jar:file:/C:/Program%20Files/NetBeans%206.0.1/javafx/modules/ext/javafx/javafxrt.jar!/javafx/ui/Frame.fx", Line 298)
at new Frame {title: "hello", width: 600, height: 600, content: new MyWidget {w: new JCalendar}, visible: true} ("file:/D:/JavaFXApplication9/build/classes/javafxapplication9/Main.fx", Line 20)
Caused by: java.awt.IllegalComponentStateException: contentPane cannot be set to null.
at javax.swing.JRootPane.setContentPane(JRootPane.java:602)
at javax.swing.JFrame.setContentPane(JFrame.java:676)
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 net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl$ExpressionValueImpl.invokeMethod(TypeFactoryImpl.java:11238)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl$ExpressionValueImpl.execute(TypeFactoryImpl.java:20487)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl$Interpreter.interpret(TypeFactoryImpl.java:25507)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl$Interpreter.doStmtList(TypeFactoryImpl.java:25469)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl$Interpreter.interpret(TypeFactoryImpl.java:25622)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl$Interpreter.interpret(TypeFactoryImpl.java:25559)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl$Interpreter.doStmtList(TypeFactoryImpl.java:25469)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl$Interpreter.interpret(TypeFactoryImpl.java:25622)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl$Interpreter.interpret(TypeFactoryImpl.java:24748)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl$ExpressionValueImpl.execute(TypeFactoryImpl.java:20675)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl$Interpreter.interpret(TypeFactoryImpl.java:25507)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl$Interpreter.doStmtList(TypeFactoryImpl.java:25469)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl$Interpreter.interpret(TypeFactoryImpl.java:25622)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl$Interpreter.callChangeRule(TypeFactoryImpl.java:24588)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl.callChangeRule(TypeFactoryImpl.java:26024)
at net.java.javafx.typeImpl.ExpressionFactoryImpl.callChangeRule(ExpressionFactoryImpl.java:9469)
at net.java.javafx.typeImpl.ExpressionFactoryImpl$Trigger.callChangeRule0(ExpressionFactoryImpl.java:270)
at net.java.javafx.typeImpl.ExpressionFactoryImpl$Trigger.attributeValueReplaced(ExpressionFactoryImpl.java:289)
at net.java.javafx.typeImpl.ExpressionFactoryImpl$VTable.fireReplaceTrigger(ExpressionFactoryImpl.java:412)
at net.java.javafx.typeImpl.ExpressionFactoryImpl.fireReplaceTrigger(ExpressionFactoryImpl.java:9536)
at net.java.javafx.typeImpl.PL$2.attributeValueReplaced(PL.java:251)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl.fireAttributeValueReplaced(TypeFactoryImpl.java:4384)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl$ValueImpl.setAttribute(TypeFactoryImpl.java:8361)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl$ValueImpl.addAttribute(TypeFactoryImpl.java:8540)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl$ExpressionValueImpl.execute(TypeFactoryImpl.java:22568)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl$Interpreter.interpret(TypeFactoryImpl.java:25507)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl$Interpreter.doStmtList(TypeFactoryImpl.java:25469)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl$Interpreter.interpret(TypeFactoryImpl.java:25622)
at net.java.javafx.typeImpl.Compilation$CompilationUnitImpl.init(Compilation.java:521)
at net.java.javafx.typeImpl.Compilation$CompilationUnitImpl.init(Compilation.java:456)
at net.java.javafx.typeImpl.Compilation.doCompile(Compilation.java:1080)
at net.java.javafx.typeImpl.Compilation.compile(Compilation.java:837)
at net.java.javafx.typeImpl.Compilation.compile(Compilation.java:819)
at net.java.javafx.typeImpl.F3Shell$1.run(F3Shell.java:93)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
D:\JavaFXApplication9\nbproject\build-impl.xml:414: The following error occurred while executing this line:
D:\JavaFXApplication9\nbproject\build-impl.xml:261: Java returned: 1
BUILD FAILED (total time: 12 seconds)

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
alexsch
Offline
Joined: 2007-07-12
Points: 0

The interpreter version of JavaFX Script language is not supported.
Use the compiler one.