JavaFX chat application for focus groups

Over the last months, we have worked on an application that allows companies and organizations to chat with a dedicated focus group in a controlled environment. We already have some users for this, e.g. a marketing company that wants to get the first impressions from users on a new campaign. The chat client is written in JavaFX and the backend runs on Glassfish v3 with Comet support enabled.

I have written some blog entries about JavaFX chat code before. The principles in these entries are also used in the iParticipate application --- iParticipate is the commercial name of the application, I think. The iParticipate application is focused on moderated chats, though, allowing a moderator to review, delay, accept or reject messages before they are shown to the other users. The setup is hence slightly more complicated, but you can try it yourself at

We have 2 different views on the application: an administrator view and a user view. The user view is pretty simple and shows a chat window, an overview of participants, and a whiteboard:

The administrator view is based on the same code, but we have some more panels here:

The moderator has some more options:

  • add pictures and movies to the sessions and show them (full-screen or not)
  • moderate incoming chat messages: accept them, reject them, or put them in a queue
  • manage the auto-approve option by setting moderation time
  • send a private message to a user
  • manage bookmarked messages
  • ...
Actually, there are a lot more options, but they should be described somewhere else.

Going back to the code and architecture, this project is a nice combination of Glassfish v3 and JavaFX. The backend is a Java EE 6 WAR application, containing REST handlers (using Jersey), session beans and JPA Entity Beans. Different projects can be created simultaneously, and messages for one project are of course separated from the other projects. Actions (writing text, bookmarking messages, confirming messages,...) are implemented as REST calls, and each client has a Comet Handler.

The JavaFX client code uses the HttpRequest for sending all request actions, and the incoming messages are retrieved using the asynchronous JavaTaskBase/RunnableFuture constructions. See for some basic code.
Animations are used for dealing with the auto-approval functionality (if the moderator does not do anything during a configurable amount of seconds, a message will be automatically approved).
The media packages are used for showing media content. The administrator manages when and how media content is shown to the user.

The iParticipate application shows that you can do lots of things with JavaFX that are extremely difficult to achieve in HTML. Once again, this convinces me that HTML is not the way forward for application development.

written on 22 Jan 2010 15:56.

no comments

Create comment