# javaFX internet browser in a swing component

**URL:** <https://forum.inductiveautomation.com/t/javafx-internet-browser-in-a-swing-component/7869>\
**Category:** Module Development\
**Created:** [January 18, 2014, 5:23pm UTC](https://forum.inductiveautomation.com/t/javafx-internet-browser-in-a-swing-component/7869 "2014-01-18T17:23:25Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [January 18, 2014, 5:23pm UTC](https://forum.inductiveautomation.com/t/javafx-internet-browser-in-a-swing-component/7869/1 "2014-01-18T17:23:25Z")

</div>

A javaFX internet browser in a swing component :  
[http://docs.oracle.com/javafx/2/swing/swing-fx-interoperability.htm#CHDIEEJE](http://docs.oracle.com/javafx/2/swing/swing-fx-interoperability.htm#CHDIEEJE)  
could be a solution to add an internet browser component ???

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [January 19, 2014, 11:46am UTC](https://forum.inductiveautomation.com/t/javafx-internet-browser-in-a-swing-component/7869/2 "2014-01-19T11:46:27Z")

</div>

Tried. Failed. Crazy deadlocks. Will post code soon. I can’t figure it out. Other than the redraw deadlock, the module is usable.

---

<div class="post-metadata">

**Author:** ![sfitze](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@sfitze](https://forum.inductiveautomation.com/u/sfitze)\
**Post date:** [February 14, 2014, 8:35pm UTC](https://forum.inductiveautomation.com/t/javafx-internet-browser-in-a-swing-component/7869/3 "2014-02-14T20:35:47Z")

</div>

I had the same problems with deadlocks but I managed to get it to work. You need to add a “zoom-incompatible” property to the outer javafx panel after you construct it. It is a constant in:`com.inductiveautomation.ignition.designer.designable.DesignableRepaintManager.ZOOM_INCOMPATIBLE`

```auto
final JFXPanel fxPanel = new JFXPanel();
jfxPanel.putClientProperty(
				com.inductiveautomation.ignition.designer.designable.DesignableRepaintManager.ZOOM_INCOMPATIBLE,
				true);
```

Once I did that the deadlocks went away and it is perfectly usable.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [February 15, 2014, 12:43pm UTC](https://forum.inductiveautomation.com/t/javafx-internet-browser-in-a-swing-component/7869/4 "2014-02-15T12:43:51Z")

</div>

Great news, ![:thumb_left:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/e26afb081ddde6df016df6ee49159cf56aaca688.gif ":thumb\_left:")  
could you please post a demo version of the module to try it !

---

<div class="post-metadata">

**Author:** ![sfitze](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@sfitze](https://forum.inductiveautomation.com/u/sfitze)\
**Post date:** [February 16, 2014, 10:26pm UTC](https://forum.inductiveautomation.com/t/javafx-internet-browser-in-a-swing-component/7869/5 "2014-02-16T22:26:31Z")

</div>

My Java skills are not that good but here is an example module. It is extremely crude. Maybe someone form Inductive can take a look at it and make it useful.

You need to add ` wrapper.java.additional.XX=-Dignition.enablejfx=true`  
(where XX is the next number in sequence)  
to your ignition.conf file to use it.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [February 17, 2014, 2:44pm UTC](https://forum.inductiveautomation.com/t/javafx-internet-browser-in-a-swing-component/7869/6 "2014-02-17T14:44:15Z")

</div>

Thanks for sharing,  
the module works but some freze when I navigate to another windows or try to reopen the windows with the component…

---

<div class="post-metadata">

**Author:** ![sfitze](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@sfitze](https://forum.inductiveautomation.com/u/sfitze)\
**Post date:** [February 17, 2014, 5:51pm UTC](https://forum.inductiveautomation.com/t/javafx-internet-browser-in-a-swing-component/7869/7 "2014-02-17T17:51:49Z")

</div>

I don’t have a good grip on how exactly the javafx thread works. The problem is that when you close the window with the javafx component it kills the javafx thread and doesn’t restart it when you reopen the window. I found a trick on a forum that seems to fix the problem. I had to add: ` Platform.setImplicitExit(false);
` to the constructor. I also fixed a few other bugs. This version seems to work better. I’m still in the process of teaching myself Java. So I can’t promise a lot.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [March 13, 2014, 6:38pm UTC](https://forum.inductiveautomation.com/t/javafx-internet-browser-in-a-swing-component/7869/8 "2014-03-13T18:38:47Z")

</div>

We have experimented with the JavaFX browser. It has a few issues, it seems a bit unreliable, and it isn’t compatible with Java 6.

That said, we’ve recently found a different Swing based browser that looks extremely promising, and will be doing some proof of concepts with it shortly.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [March 18, 2014, 9:09am UTC](https://forum.inductiveautomation.com/t/javafx-internet-browser-in-a-swing-component/7869/9 "2014-03-18T09:09:39Z")

</div>

Good news 🙂

---

<div class="post-metadata">

**Author:** ![BSH](https://avatars.discourse-cdn.com/v4/letter/b/c68b51/32.png) [@BSH](https://forum.inductiveautomation.com/u/BSH)\
**Post date:** [March 19, 2014, 2:15pm UTC](https://forum.inductiveautomation.com/t/javafx-internet-browser-in-a-swing-component/7869/10 "2014-03-19T14:15:28Z")

</div>

Really interested in this, there is a huge use case for us.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [March 19, 2014, 3:43pm UTC](https://forum.inductiveautomation.com/t/javafx-internet-browser-in-a-swing-component/7869/11 "2014-03-19T15:43:30Z")

</div>

Proof of concepts went very well. Web browser module is under development, I think it’ll make it for 7.7

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [May 2, 2014, 11:03am UTC](https://forum.inductiveautomation.com/t/javafx-internet-browser-in-a-swing-component/7869/12 "2014-05-02T11:03:32Z")

</div>

Is Web browser module approaching ?  
it will be a specific module or included in 7.7 ?

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [May 2, 2014, 3:48pm UTC](https://forum.inductiveautomation.com/t/javafx-internet-browser-in-a-swing-component/7869/13 "2014-05-02T15:48:53Z")

</div>

I can confirm that a web browser module will be available for 7.7. It is a separate module. I believe the price will be $495 USD.
