File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes HELP!!! free format drawing. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "HELP!!! free format drawing." Watch "HELP!!! free format drawing." New topic
Author

HELP!!! free format drawing.

Graham Porter
Greenhorn

Joined: Apr 19, 2001
Posts: 14
hi there, i hope you can help. I was wondering...is it possible to write an applet that would enable the web user to do a drawing on the web page? I.e perhaps draw some rectangles etc and lines connecting them? If so how would i do this.
Any help would really be appreciated.
Graham.
Andrew Shafer
Ranch Hand

Joined: Jan 19, 2001
Posts: 338

The answer is yes.
It is spelled AWT and/or Swing.
Please move this to the Applet forum.


!_I_Know_Kung_Fu_!
Graham Porter
Greenhorn

Joined: Apr 19, 2001
Posts: 14
o, ok, sorry about that, didn't realize.
One quick question though....whats the difference between an applet and a servlet. I'm guessing applets run on the client side and servlets run on the server but is that the only difference and why would you pick one over the other?
Graham.
Andrew Shafer
Ranch Hand

Joined: Jan 19, 2001
Posts: 338

It isn't really an either or situation.
You can have both.
It just depends on what you are trying to do. If you need to connect to a Database for example, you gotta have a servlet involved. If you want people to be able to draw stuff as you have described, has to be an applet.
Servlets work in a request/response sequence of events between a client and a server, generally using HTTP and dynamically generating html.
Applets are like applications that run on the client side, but they have more security restrictions. (unless they are signed, which is basically asking for permission) Applets are invoked using tags in html.
You can build your UI as an Applet and let a Servlet handle the business end. You really don't have to choose between them. Your case will dictate which is more appropriate to use.
Andrew Shafer
Ranch Hand

Joined: Jan 19, 2001
Posts: 338

To do what you originally described, I suggest learning about applets, which will inevitably lead you to awt/swing.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HELP!!! free format drawing.