[英]How to make your desktop Java app looks like Open Office or Eclipse etc.?
How to make your desktop Java app looks like Open Office or Eclipse etc ? 如何使您的桌面Java应用看起来像Open Office或Eclipse等? Installation process looks like any Windpws app. 安装过程看起来像任何Windpws应用程序。 installation. 安装。 There is no Java logo on the to on a app window. 应用程序窗口上的上没有Java徽标。 You run it by .exe file. 您通过.exe文件运行它。 How it is done? 怎么做的? Is this jar->exe conversion? 这是jar-> exe转换吗? Is there any free tool to do that? 有没有免费的工具可以做到这一点?
For the native look, you can obviously go the SWT way, like Eclipse does, however it's a painful one. 对于本机外观,显然可以像Eclipse一样采用SWT方式,但这是一个痛苦的过程。 You could/should prefer the Swing look'n'feel, by using, as an example, the Substance Look'n'Feel . 通过使用Substance Look'n'Feel作为示例,您可以/应该更喜欢Swing的外观 。
For the installation part, you can use 对于安装部分,您可以使用
For the exe wrapper, you can use 对于exe包装器,您可以使用
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. 实际上,可以使用Java Web Start的方法来代替繁琐的经典下载/安装步骤:您只需单击一个网页链接即可将应用程序安装到其计算机上(直接集成了更新机制),然后进行安装可能包括桌面和开始菜单快捷方式,以及Windows安装面板中的一个元素,用于删除已安装的软件。
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...). 这个问题尚不清楚,但是我认为您要追求的是使您的Java应用程序像本地应用程序一样工作(类似于双击图标时运行它的东西,等等。)。 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. 请注意,对于图形部分,Eclipse使用了一个名为SWT的库,该库是一组感觉和行为与Java Swing或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. 无论如何,如果您采用常规的Java(Swing)方式,则应用程序窗口顶部的Java徽标是JFrame组件中的setIconImage()方法。
Riduidel already told you about .exe wrappers and installers you can use. Riduidel已经向您介绍了可以使用的.exe包装程序和安装程序。 For the installer, I also suggest you to consider Java Web Start instead of a normal Windows installer. 对于安装程序,我还建议您考虑使用Java Web Start而不是普通的Windows安装程序。
I think it uses LookAndFeel, I let you read: http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 我认为它使用LookAndFeel,我让您阅读: 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... 编辑:我没有阅读整个问题^^'也许对某人有用...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.