Can I develop UI libraries with Java

Can I develop UI libraries like JavaFX with core Java, or should I use native methods (which is wrote in C and transformed to Java)?