Click to See Complete Forum and Search --> : How to add an application icon inside of window toolbar
beachboy1976
December 17th, 2003, 04:58 PM
Hi,
What I try to figure out is that I need add my applicaiton icon inside of window toolbar so the user can open my application from there.
Any advice will be appreicated.
justin2
December 17th, 2003, 05:04 PM
um...im not an expert but i dont think you can with the frame class though you may be able to with an ImageIcon but i think you might have to create it using the Window class.
by the way would you be interested in developing an rpg?
beachboy1976
December 17th, 2003, 05:25 PM
Do you have any example I can use it as a reference?
Thanks
justin2
December 17th, 2003, 05:43 PM
sorry, im pretty sure that is how you would do it but i havent actually done it. I looked for an example but couldnt find one. sorry again...
mrolympia615
December 17th, 2003, 06:06 PM
you could create a jar file containing your program, then create a shortcut to your jar file on the windows toolbar...am i thinking about your situation correctly?
beachboy1976
December 17th, 2003, 06:30 PM
so basically, my jar will be an executable program and the shortcut I create will execute my jar program?
mrolympia615
December 17th, 2003, 06:35 PM
yep...if you need any details about jar files check out http://java.sun.com/docs/books/tutorial/jar/
beachboy1976
December 17th, 2003, 06:44 PM
However, my boss want me to create a shortcut in the program so the user can launch it from the desktop toolbar. Is there anyway I can do this at all?
mrolympia615
December 17th, 2003, 06:48 PM
i'm confused now. does he want a shortcut inside the program that launches another program...or does he want a shortcut that can be placed in the desktop toolbar to launch your program?
beachboy1976
December 17th, 2003, 06:53 PM
he wants a shortcut that can be placed in the desktop toolbar to launch your program? But the shortcut will be generated by my program automatically. just like some window applications, when you install them, they will create a shortcult on your toolbar.
mrolympia615
December 17th, 2003, 06:59 PM
i see. sorry about that. i'm not sure how you would do something like that from within java. hopefully it's in the java api, if not you may have to resort to using native code.
dlorde
December 18th, 2003, 06:51 AM
Java is designed to be platform independent, so it doesn't have any Windows-specific facilities like adding to tool bars, etc. The provision of shortcuts and startup icons is usually the responsibility of the application installer program. Check out InstallAnywhere (http://www.hallogram.com/installanywhere/) and similar installers for Java.
The highest reward for a person's toil is not what they get for it, but what they become by it...
J. Ruskin
cjard
December 19th, 2003, 06:41 AM
the easiest way to achieve what you want, is to place your program into a jar file, then create a shortcut to that jar file, and double click the shortcut. jar files are automatically opened by javaw.exe, using the -jar switch, so provided your jar file has a correctly formatted manifest file, it will work just like any other windows exe
codeguru.com
Copyright WebMediaBrands Inc., All Rights Reserved.