Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1566 > unrolled thread

Drag and drop to native b

Started by"Yug3sh" <yug3sh@THRWHITE.remove-dii-this>
First post2011-04-27 15:34 +0000
Last post2011-04-27 15:34 +0000
Articles 4 — 2 participants

Back to article view | Back to comp.lang.java.gui


Contents

  Drag and drop to native b "Yug3sh" <yug3sh@THRWHITE.remove-dii-this> - 2011-04-27 15:34 +0000
    Re: Drag and drop to nati "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:34 +0000
      Re: Drag and drop to nati "Yug3sh" <yug3sh@THRWHITE.remove-dii-this> - 2011-04-27 15:34 +0000
        Re: Drag and drop to nati "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:34 +0000

#1566 — Drag and drop to native b

From"Yug3sh" <yug3sh@THRWHITE.remove-dii-this>
Date2011-04-27 15:34 +0000
SubjectDrag and drop to native b
Message-ID<No9_h.55$LR5.13@newssvr17.news.prodigy.net>
  To: comp.lang.java.gui
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.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [next] | [standalone]


#1578 — Re: Drag and drop to nati

From"Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Date2011-04-27 15:34 +0000
SubjectRe: Drag and drop to nati
Message-ID<71b51033bf430@uwe>
In reply to#1566
  To: comp.lang.java.gui
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

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#1607 — Re: Drag and drop to nati

From"Yug3sh" <yug3sh@THRWHITE.remove-dii-this>
Date2011-04-27 15:34 +0000
SubjectRe: Drag and drop to nati
Message-ID<bOy0i.2311$zj3.946@newssvr23.news.prodigy.net>
In reply to#1578
  To: comp.lang.java.gui
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...
> 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
>

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#1608 — Re: Drag and drop to nati

From"Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Date2011-04-27 15:34 +0000
SubjectRe: Drag and drop to nati
Message-ID<71f67fe284dfc@uwe>
In reply to#1607
  To: comp.lang.java.gui
Yug3sh wrote:
>Andrew,
>
>Thanks for the response. 

Your thanks can best be expressed, in your future lack
of top-posting..

>..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
>

>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

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web