开发者

Websocket and Java Swing front end

开发者 https://www.devze.com 2022-12-15 07:05 出处:网络
Is it开发者_JAVA技巧 doable to make Websocket interfacedwith Java Swing front end?If so how?Try mine:

Is it开发者_JAVA技巧 doable to make Websocket interfaced with Java Swing front end? If so how?


Try mine:

http://github.com/TooTallNate/Java-WebSocket

Contains a Client and Server implementation. In the example folder there's a simple JFrame subclass called ChatClient. Look at it's source for a Swing reference.

Essentially you just need to subclass net.tootallnate.websocket.WebSocketClient and implement the onOpen, onClose, and onMessage methods. The class has an interface very similarly to the WebSockets API for HTML5.


Kaazing WebSocket Gateway ships with support for JavaScript, Flex, Silverlight, but also native Java clients (stand alone as well as applets). For more information, check out http://tech.kaazing.com/documentation/index.html

0

精彩评论

暂无评论...
验证码 换一张
取 消