Ok. I tried it, and it does indeed produce the appearance of being
Windows native (mostly). But is there any way to make the icon the
correct icon, and not a Java coffee cup?
Thanks!
Simon - 09 May 2006 13:03 GMT
> Ok. I tried it, and it does indeed produce the appearance of being
> Windows native (mostly). But is there any way to make the icon the
> correct icon, and not a
Frame.setIconImage(Image)
I think there is no method getDefaultIconImageForPlatform() but I guess your
application will have an icon of its own. Otherwise, that is a good reason to
design one now :-)
Cheers,
Simon
> Well, I developed it in Java initially because I was familiar with the
> language, and sure that I could build a proof of concept in it. My
> concern is that if I let other people run it, I want it to appear to
> them to behave exactly as a program should in their native environment,
> including installing the way that native programs install. I don't
> want them to say "what is JRE?" and get confused.
Distribute an installer. It deals with that.
If you don't, they're going to say "what is DLL?", "what is the registry?",
etc.
Alun Harford
nooneinparticular314159@yahoo.com <nooneinparticular314159@yahoo.com>
wrote:
> Well, I developed it in Java initially because I was familiar with the
> language, and sure that I could build a proof of concept in it. My
> concern is that if I let other people run it, I want it to appear to
> them to behave exactly as a program should in their native environment,
> including installing the way that native programs install. I don't
> want them to say "what is JRE?" and get confused.
They don't need to. You can distribute the JRE with your application.
The JRE (Sun's, anyway) does not need to be "installed" in any special
way. You can just extract it to a subdirectory of your application, and
set up a shortcut / shell script / Start menu entry, or whatever else is
appropriate for the platform, that runs it with a full path. Using
executable JARs for your own application helps here, too, since it makes
the JRE less dependent on environment variables and the like.
I've done that for years, and our customers don't have any clue what a
JRE is.
> It looks to me that SetLookAndFeel generates a GUI appearance that is
> similar to, but not the same as, the native GUI. For example, you have
> a java logo in the corner, and widgets don't look quite right. Is
> there a way around this?
Those are not native controls. If they look subtly different from
native controls, there's nothing to be done about it. My experience is
that Sun's look and feels are close enough that customers don't tend to
care about the remaining differences... assuming, of course, that your
application actually does unique and interesting things besides just
having a user interface.
For native controls that are usable, see SWT, but you'll pay a price in
working with a relatively impoverished programming model. The AWT also
has native controls, but they are well-nigh unusable and don't include
things that are considered fundamental these days, like tree and table
controls.

Signature
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation