You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+59Lines changed: 59 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,6 +132,65 @@ Source code for the example is located in /src/main/java/com/openfin/desktop/dem
132
132
133
133
Once the demo is running, Windows snap while being draggted close to other windows. Snapped windows dock on mounse release.
134
134
135
+
## Run the example of embedding HTML5 application into a Java Swing window
136
+
137
+
1. Clone this repository
138
+
139
+
2. Go to release directory and start embed.bat
140
+
141
+
3. Once the java app starts, click on "Launch OpenFin" button, which should start OpenFin Runtime and embed the OpenFin application that points to https://openfin.co
142
+
143
+
4. Click "Shutdown OpenFin" button to close HTML5 application and the Java Swing window
144
+
145
+
## Source Code Review for embedded OpenFin application
146
+
147
+
Source code for the example is located in /src/main/java/com/openfin/desktop/demo/WindowEmbedDemo.java
148
+
149
+
1. create a canvas and place it where the HTML5 application should be embedded.
150
+
151
+
embedCanvas = new java.awt.Canvas();
152
+
panel.add(embedCanvas, BorderLayout.CENTER);
153
+
154
+
2. listen to the canvas resize event, and resize embedded HTML5 application accordingly.
0 commit comments