whiteboard application [closed]
i wanted to develop a whiteboard application..i know the basics of java..but have no idea where to start from..so..i'd really appreciate if you could guide me..as in..where do i start from??
I'd advise you to download an existing open-source whiteboard Java project and study the code. For example, look at some of the existing ones here.
Download a few different ones and look at how they do it, then you'll have a better idea of what's necessary and can come up with how you are going to do yours.
Most likely their implementations will be centered around the following packages: java.awt.*
, java.awt.event.*
, java.awt.geom.*
. You'll probably want to have some kind of Shape class from which you derive other classes representing each shape you want to draw. The drawing will be done in the paintComponent()
method of the component you'll use to draw (for example a JPanel).
If you plan on making this a shared whiteboard, I'd advise you to focus on getting the painting done first, then worry about distribution. For distributing the app you can look at Sockets, Applets, Corba, RMI, Apache River, Web services, ... The easiest to implement will probably be RMI, and the fastest plain sockets.
精彩评论