 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Yug3sh Guest
|
Posted: Thu May 03, 2007 4:46 am Post subject: Drag and drop to native broken? |
|
|
Hi,
I tested the DragPictureDemo tutorial
(http://java.sun.com/docs/books/tutorial/uiswing/dnd/intro.html#cut) on both
Windows XP (32 bit) using JDK 6 and on Windows Vista (64 bit) using the Sun
64 bit JDK (version 6).
The demo does not drop the images to an external application e.g. windows
paint. I also tried dropping the images to Wordpad. In wordpad, I get a
drop, however the "image" dropped into wordpad is just a black square.
I have also been trying to write my own code that will drop an image from a
Java Swing application to an external app on Vista 64 (e.g. paint), however
it does not seem to work.
Anyone else have a problem dropping images from a Swing app to a native app
(e.g. paint)?
Any info would be appreciated!
Thanks. |
|
| Back to top |
|
 |
Andrew Thompson Guest
|
Posted: Sat May 05, 2007 7:11 am Post subject: Re: Drag and drop to native broken? |
|
|
Yug3sh wrote:
...
| Quote: | I tested the DragPictureDemo tutorial
(http://java.sun.com/docs/books/tutorial/uiswing/dnd/intro.html#cut)
|
Huh? Which JNLP are you referring to? This one?
<http://java.sun.com/docs/books/tutorialJWS/uiswing/dnd/ex6/DragPictureDemo2.jnlp
| Quote: |
...on both
Windows XP (32 bit) using JDK 6 and on Windows Vista (64 bit) using the Sun
64 bit JDK (version 6).
|
Win XP Pro (..32 bit) JDK 6.
| Quote: | The demo does not drop the images to an external application e.g. windows
paint.
|
No. It (the one I linked to) is sandboxed. Pictures
can be drag/dropped to blank squares withint the
frame, but nowhere else.
Try this (also sand boxed) use of copy/paste between
a web start app. and *external* native apps.
<http://www.physci.org/jws/#cbs>
I have been vaguely wonderring if it might be adaptable
to D'n'D.
Of course get the app. singed (digitally) and accepted
by the user with 'all-permissions' and you might use
D'n'D how you would in an application launched from
the command line (w/ no security manager).
| Quote: | I have also been trying to write my own code that will drop an image from a
Java Swing application to an external app on Vista 64 (e.g. paint), however
it does not seem to work.
|
Maybe it is just lazy. ;-)
Otherwise, if you can reduce that code as an
SSCCE*, and post it here, complete with the
copy/pasted stacktraces you are seeing, and
we might be able to advise further.
* <http://www.physci.org/codes/sscce.html>
--
Andrew Thompson
http://www.athompson.info/andrew/
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-gui/200705/1 |
|
| Back to top |
|
 |
Yug3sh Guest
|
Posted: Thu May 10, 2007 7:10 am Post subject: Re: Drag and drop to native broken? |
|
|
Andrew,
Thanks for the response. I don't think it's a sandbox issue. I copied the
source code from the demo link I specified and compiled and ran it as a java
application and had the same problem.
My application is also run as a java app (not applet or web start) and has
the same issue.
Thanks.
-Yugesh.
"Andrew Thompson" <u32984@uwe> wrote in message news:71b51033bf430@uwe...
| Quote: | Yug3sh wrote:
..
I tested the DragPictureDemo tutorial
(http://java.sun.com/docs/books/tutorial/uiswing/dnd/intro.html#cut)
Huh? Which JNLP are you referring to? This one?
http://java.sun.com/docs/books/tutorialJWS/uiswing/dnd/ex6/DragPictureDemo2.jnlp
...on both
Windows XP (32 bit) using JDK 6 and on Windows Vista (64 bit) using the
Sun
64 bit JDK (version 6).
Win XP Pro (..32 bit) JDK 6.
The demo does not drop the images to an external application e.g. windows
paint.
No. It (the one I linked to) is sandboxed. Pictures
can be drag/dropped to blank squares withint the
frame, but nowhere else.
Try this (also sand boxed) use of copy/paste between
a web start app. and *external* native apps.
http://www.physci.org/jws/#cbs
I have been vaguely wonderring if it might be adaptable
to D'n'D.
Of course get the app. singed (digitally) and accepted
by the user with 'all-permissions' and you might use
D'n'D how you would in an application launched from
the command line (w/ no security manager).
I have also been trying to write my own code that will drop an image from
a
Java Swing application to an external app on Vista 64 (e.g. paint),
however
it does not seem to work.
Maybe it is just lazy. ;-)
Otherwise, if you can reduce that code as an
SSCCE*, and post it here, complete with the
copy/pasted stacktraces you are seeing, and
we might be able to advise further.
* <http://www.physci.org/codes/sscce.html
--
Andrew Thompson
http://www.athompson.info/andrew/
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-gui/200705/1
|
|
|
| Back to top |
|
 |
Andrew Thompson Guest
|
Posted: Thu May 10, 2007 3:27 pm Post subject: Re: Drag and drop to native broken? |
|
|
Yug3sh wrote:
| Quote: | Andrew,
Thanks for the response.
|
Your thanks can best be expressed, in your future lack
of top-posting..
| Quote: | ..I don't think it's a sandbox issue. I copied the
source code from the demo link I specified and compiled and ran it as a java
application and had the same problem.
|
This project?
<http://java.sun.com/docs/books/tutorial/uiswing/examples/zipfiles/dnd-DragPictureDemo2Project.zip
| Quote: |
My application is also run as a java app (not applet or web start) and has
the same issue.
|
That is odd. Since you confirmed the app. was trusted,
I gave the classes in the archive (mentioned above) a
quick run.
I could (on the aforementioned machine) paste pictures into
Paint Shop Pro 3.12 (an ancient version of a nice image editor)
and could D'n'D (or paste) pictures with Open Office 2 (Draw/Calc
or Writer).
It got a little more interesting when I tried D'n'D to WordPad
and confirmed your result of 'blank image' arriving. It got a
little more interesting still when I discovered that I could
see the images I had drag/dropped into OpenOffice,
when copy/paste from OO into WordPad - as an
actual image!
So in the same WordPad document, I had a blank image
D'n'D'd direct from DragPictureDemo2, beside a colored
version that had come via OO.
A little bit of hunting led me here..
<http://www.rockhoppertech.com/java-drag-and-drop-faq.html#nativeimages>
Which leads me to think that whatever flavor these
images are being served up to (MS) Windows
programs, it is not bitmap. OO seems to handle
whatever format the D'n'D offers - so does PSP.
HTH
--
Andrew Thompson
http://www.athompson.info/andrew/
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-gui/200705/1 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|