• Post Reply Bookmark Topic Watch Topic
  • New Topic

Drag and Drop in web applications  RSS feed

 
Sakthivel Paramasivam
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, My new project requirement is draw the text box, table, arrow, line etc in the browser window. In MS-Word we have all the features to draw the text box, table etc like that i need to implement throw browser window dynamicaly and it should store in file or db. Please share with how can we achieve this in java. thanks in advance.
Regards,
Sakthi
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you really need to do it in Java, Applets are probably your only option.

Alternatively, you could consider using JavaScript.
 
Sakthivel Paramasivam
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Ilja, Thanks for your reply.

My actual requirement is the text box, arrow etc should be present in the browser window. The user can drag that one like MS-Word and draw the text box then expand to the size the put ther text as well in the text box. If possible user can connect arrow with those text boxes or some other shapes. After finished if they submit it should be store in some other places like file or db. Please give some ideas how can we achieve this one. thanks.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sakthivel,

First we need to clear something up. The "how" depends on the "with what". There are basically two options:

1. Applet/WebStart - You can write all your code in Java (Swing) and deploy it as an applet or deploy it via Java Web Start. Both are perfectly valid and Swing has pretty good drag and drop support and really good rendering via Java2D.

2. A combination of JavaScript and Server side (J2EE). This would require you to develop a web application and using JavaScript to do all your drag and drop and image rendering. While this is entirely possible it will be more difficult than 1, in my opinion. I suppose its a bit relative to your knowledge in both areas.

So if it is 1 we can begin answering your question. If it is 2 then we need to move this thread to the appropriate forum and begin responding to your questions there.

Thanks.
 
Prafulla N. Patil
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my suggestion is applets only
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Prafulla N. Patil:
my suggestion is applets only


That's great Prafulla. But without any basis for your opinion it is hard to take it seriously. A better approach would be to tell the poster why you suggest Applet only in this case.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!