开发者

How to make your desktop Java app looks like Open Office or Eclipse etc.?

开发者 https://www.devze.com 2023-01-27 10:10 出处:网络
How to make your desktop Java app looks like Open Office or Eclipseetc ? Installation process looks like any Windpws app. installation. There is no Java logo on the to on a app window. You run it by .

How to make your desktop Java app looks like Open Office or Eclipse etc ? Installation process looks like any Windpws app. installation. There is no Java logo on the to on a app window. You run it by .exe file. How it is done? Is this jar->exe conversion? Is there any free tool 开发者_C百科to do that?


For the native look, you can obviously go the SWT way, like Eclipse does, however it's a painful one. You could/should prefer the Swing look'n'feel, by using, as an example, the Substance Look'n'Feel.

For the installation part, you can use

  • InstallAnywhere
  • IzPack

For the exe wrapper, you can use

  • Launch4J
  • JSmooth

or others ...

However, I think that, by doing so, you're doing it wrong. indeed, instead of the classical download/install step, which is cumbersome, you can go the Java Web Start way : user only has to click one webpage link to install application to its machine (with an update mechanism directly integrated in), an install that go as far as potentially including desktop and start menu shortcuts, and an element in the Windows install panel to remove installed software.


I tried Jar2Exe, and JSmooth, they both produce exe files from jar archives.


The question is a little unclear, but I think that what you're after is making your java app behave like a native app (stuff like running it when an icon is double-clicked, etc...). There is an excellent tutorial on this here.


Note that, for the graphic part, Eclipse uses a library called SWT, which is a set of widgets that feel and behave in a different way that Java Swing or AWT.

Anyway, if you go the normal Java (Swing) way, the Java logo on the top of an app window is setIconImage() method in JFrame components.

Riduidel already told you about .exe wrappers and installers you can use. For the installer, I also suggest you to consider Java Web Start instead of a normal Windows installer.


I think it uses LookAndFeel, I let you read: http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html

try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch(Exception e){}

EDIT: I didn't read the entire question ^^' Maybe it will be useful to someone...

0

精彩评论

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

关注公众号