0

I am designing a eclipse plugin, where i use Components of Swing and JavaFx. In this I can apply CSS on JavaFX. But i could not apply CSS for Swing components. I was forced to use Swing component for some features of the plugin. So i would like to apply CSS for Swing components too. Is there any api that supports CSS on Swing component?

//This code applies css for javafx components
SwingJavaFxSample.class.getResource("samples.css").toExternalForm();

Please help me in applying css for Swing components too.

AJJ
  • 3,570
  • 7
  • 43
  • 76

1 Answers1

1

You can not use the JavaFX CSS support on Swing controls so to me the question makes no sense. Let me also say that using 3 UI-Technologies together is not really a good idea you'll run into many threading issues (SWT & FX share the same event thread whereas Swing is on another one), ... .

What is the reason you still need Swing? JavaFX can be embedded directly into SWT.

tomsontom
  • 5,856
  • 2
  • 23
  • 21