JavaFX

From BITPlan can4eve Wiki
Revision as of 11:06, 5 September 2017 by Wf (talk | contribs)
Jump to navigation Jump to search

JavaFx on Raspberry PI

http://gluonhq.com/download/javafx-embedded-sdk/
root@pino:/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/lib/ext# 
cd /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/lib/ext
sudo ln -s /usr/local/src/armv6hf-sdk/rt/lib/arm .
sudo ln -s /usr/local/src/armv6hf-sdk/rt/lib/ext/jfxrt.jar .
sudo ln -s /usr/local/src/armv6hf-sdk/lib/javafx-mx.jar .
sudo ln -s /usr/local/src/armv6hf-sdk/rt/lib/jfxswt.jar .

sudo apt-get install openjdk-8-jdk

Medusa Gauge Library

https://github.com/HanSolo/Medusa/wiki/Gauge-Skins

SwingNode not useable on Raspberry PI

The following code needs Swing and doesn't run properly on a raspberry PI even if JavaFX support is enabled.

/**
   * update the given tab with the given panel
   * 
   * @param tab
   * @param panel
   */
  public void updateTab(Tab tab, JPanel panel) {
    if (panel != null) {
      final SwingNode swingNode = new SwingNode();
      swingNode.setContent(panel);
      tab.setContent(swingNode);
    }
  }

Links