user interface - How to add Richfx in a layout -


i have been trying add inlinestyletextarea , codearea in anylayout both in main method in javafx , in fxml file. receive thread error. please if possible examples how can add these components javafx layout? if possible tutorial link.

this simple code

public class main extends application {  @override  public void start(stage primarystage) { textfield mytextfield = new textfield(); inlinecsstextarea textarea = new inlinecsstextarea();    hbox hbox = new hbox(); hbox.getchildren().add(mytextfield); hbox.getchildren().add(textarea); hbox.sethgrow(mytextfield, priority.always); hbox.sethgrow(textarea, priority.always);  scene scene = new scene(hbox); primarystage.setscene(scene); primarystage.show();}  public static void main(string[] args) { launch(args);   } 

}

exception in application start method java.lang.reflect.invocationtargetexception @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(unknown source) @ java.lang.reflect.method.invoke(unknown source) @ sun.launcher.launcherhelper$fxhelper.main(unknown source) caused by: java.lang.runtimeexception: exception in application start method @ com.sun.javafx.application.launcherimpl.launchapplication1(unknown source) @ com.sun.javafx.application.launcherimpl.lambda$launchapplication$152(unknown source) caused by: java.lang.noclassdeffounderror: org/reactfx/value/suspendableval @ application.main.start(main.java:20) @ com.sun.javafx.application.launcherimpl.lambda$launchapplication1$159(unknown source) @ com.sun.javafx.application.launcherimpl$$lambda$53/19776028.run(unknown source) @ com.sun.javafx.application.platformimpl.lambda$runandwait$172(unknown source) @ com.sun.javafx.application.platformimpl$$lambda$45/18503843.run(unknown source) @ com.sun.javafx.application.platformimpl.lambda$null$170(unknown source) @ com.sun.javafx.application.platformimpl$$lambda$48/3799573.run(unknown source) @ java.security.accesscontroller.doprivileged(native method) @ com.sun.javafx.application.platformimpl.lambda$runlater$171(unknown source) @ com.sun.javafx.application.platformimpl$$lambda$46/2180324.run(unknown source) @ com.sun.glass.ui.invokelaterdispatcher$future.run(unknown source) @ com.sun.glass.ui.win.winapplication._runloop(native method) @ com.sun.glass.ui.win.winapplication.lambda$null$145(unknown source) @ com.sun.glass.ui.win.winapplication$$lambda$36/3326003.run(unknown source) ... 1 more caused by: java.lang.classnotfoundexception: org.reactfx.value.suspendableval @ java.net.urlclassloader.findclass(unknown source) @ java.lang.classloader.loadclass(unknown source) @ sun.misc.launcher$appclassloader.loadclass(unknown source) @ java.lang.classloader.loadclass(unknown source) ... 15 more exception running application application.main  @ com.sun.javafx.application.launcherimpl$$lambda$50/14845382.run(unknown source) @ java.lang.thread.run(unknown source) 

from stack trace, looks java runtime can't find (at least 1 class in) reactfx library, dependency of richtextfx. since gets far looking that, must have found inlinecsstextarea, richtextfx library must installed.

if using kind of dependency management (gradle or maven, example), tool should manage dependencies you.

if managing dependencies hand (i.e. downloading jar files , adding them classpath), need make sure either download dependent jar files well, or use "fat jar file".


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -