• Post Reply Bookmark Topic Watch Topic
  • New Topic

need to create whiteboard application  RSS feed

 
Alan Shiers
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I'm wanting to create a simple whiteboard application. Nothing fancy, just an app that allows me to select a pencil tool and draw shapes on a whiteboard. Does anyone know where I can obtain sample code on how to do this?

I've had a look at numerous tutorials on Java2D but those tutorials only show basic method calls like drawOval(..). That's all well and good, but I require code that demonstrates how to pick a tool, like a pencil tool (which in turn changes your cursor to look like a pencil), and allows you to draw on the panel any shape you desire and fill a shape with a different tool, like a paint bucket tool.

I require this whiteboard app as part of a collaborative client/server application which includes chat capabilities. I've got the chat part already completed. Now I just need to research this whiteboard part.

Please advise,

Alan
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of the many things ImageJ does is to let the user draw on an image. It can deal with color and has many built-in drawing primitives. The application is not big (jar file of less than 1MB), and you'd be able to remove many parts of it that don't apply to your case, if size is an issue.
 
Alan Shiers
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow! This is impressive. More than I had bargained for. I didn't realize that ImageJ was out there. Do you think I would be able to integrate it into my client/server application and use it as a collaborative whiteboard?

Alan
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see why not. ImageJ has a plugin feature that allows user-supplied to be run from within the application. That could be used to pop up a little dialog that controls the interactive features (say, "send update now" or "check for updates from others now"). That code has access to any open image windows, so I see no problems in principle.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!