开发者

Can I get my minimized Java app to react to files being dropped on it (on Windows)?

Can I get my minimized Java app to react to files being dropped on it (on Windows) so that a user can drag files onto the icon on the toolbar and that will cause my application to reopen and process the the files that were dropped on it.

Im usi开发者_开发问答ng Java 6


This isn't possible with pure Java. Java gives you some level of control over the Frame (the window) but it doesn't give you an API to the toolbar (I assume you mean the bar which corresponds to the Frame you create in the start bar?). You can create a drop target for something inside your frame like a component (e.g. a JPanel) so that if you drag stuff onto that you will receive dnd events but there is no component that you have access to which maps to the start bar or your Frame's entry in it so there is nothing to add the DropTarget to.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜