I would like to know how to hide/show OS desktop icons (like this) in windows using a Java swing app (for instance clicking a button). I check this it's with C#, I thought use JNA, but I don't have idea how to start. Any ideas?
Asked
Active
Viewed 899 times
0
-
2Are you trying to hide the OS desktop icons or the `JDesktopPane` icons?? – MadProgrammer Oct 30 '12 at 00:31
-
@MadProgrammer Tag `jna` answers your question. – Mordechai Oct 30 '12 at 00:34
-
Note that if your app. put them there using the JNLP API, it is possible to remove them using the same API. Otherwise, if they don't belong to your app. you probably shouldn't be hiding desktop icons (at least, not using Java). – Andrew Thompson Oct 30 '12 at 00:35
-
Not a very informative question. Please give us the details of your problem so we don't have to guess. – Hovercraft Full Of Eels Oct 30 '12 at 00:36
-
@M.M. Given how many errant tags get added to questions, that's not always the case ;) – MadProgrammer Oct 30 '12 at 00:41
-
I'm trying to hide OS desktop icon [this](http://www.sevenforums.com/tutorials/3659-desktop-icons-hide-show.html) but I want to do from a swing app (using a button) – Jefferson Oct 30 '12 at 00:41
-
1OK, so what have you tried, and what isn't working? – Hovercraft Full Of Eels Oct 30 '12 at 00:42
-
I check this with [C#](http://stackoverflow.com/questions/6402834/how-to-hide-desktop-icons-programatically) I thought to use [JNA](https://github.com/twall/jna), but I don't have idea how to start. – Jefferson Oct 30 '12 at 00:45
-
Icons on the taskbar(of iconified frames), if so what should it do with the frame. Or of files and folders? – Mordechai Oct 30 '12 at 00:45
-
@M.M. I try to do [this](http://www.sevenforums.com/tutorials/3659-desktop-icons-hide-show.html) but using a swing app, click a button and hide/show desktop OS icons. – Jefferson Oct 30 '12 at 00:52
-
1@Jeff: no, you don't want to do with a Swing app, at least not yet. For any programming project the key is to divide and conquer. **First** do it with JNA in a very simple console app, and only when you've got that debugged should you worry about doing something this (in a background thread of course) in a Swing application. Do not over-complicate your problem lest it becomes insurmountable. And I speak from experience because I have created quite a few Swing apps that use JNA. – Hovercraft Full Of Eels Oct 30 '12 at 00:56