forked from webview/webview_java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExample.java
More file actions
20 lines (14 loc) · 534 Bytes
/
Example.java
File metadata and controls
20 lines (14 loc) · 534 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package dev.webview;
public class Example {
public static void main(String[] args) {
Webview wv = new Webview(true); // Can optionally be created with an AWT component to be painted on.
// Calling `await echo(1,2,3)` will return `[1,2,3]`
wv.bind("echo", (arguments) -> {
return arguments;
});
wv.setSize(800, 600);
wv.loadURL("https://google.com");
// Run the webview event loop, the webview is fully disposed when this returns.
wv.run();
}
}