• Post Reply Bookmark Topic Watch Topic
  • New Topic

things o the desktop  RSS feed

 
Osacar bhakta
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does any one know the code in BlueJ or Jcreaetor to make folders on the desktop and then have a notepad inside with writing in the notepad document?
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Windows APIs to create desktop stuff are OS-specific, so they're not in Java. They could be accessed via a C/C++ module with JNI, and there might be such a thing somewhere on the Internet. As always, try Google.

Windows folders and such are just a directory structure, so you can try to find your way to an appropriate folder and make new ones. If you put a file in the folder with an extension that is associated with NotePad (maybe .txt) you should see a NotePad icon on the file.

Shortcuts to programs are in an undocumented format so I doubt you'd be able to just write one as a file. But if you figure the format out, let us know!
[ March 02, 2006: Message edited by: Stan James ]
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Creating a directory in the windows-user-Desktop-directory is pretty much the same as creating a directory in the linux-user-Desktop-directory - isn't it?

I don't know about solaris or MacOs, but perhaps they use the same technique?

Of course we wouldn't call a .txt-file a Notepad-document but an emacs-, vi-, mcedit or scite-document

And at least some linux-window-managers don't use desktop-icons, and I can tell you: it's a joy.

Back to topic: You don't need an API and JNI and create a platformdependend solution.
[ March 02, 2006: Message edited by: Stefan Wagner ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!