简体   繁体   English

如何使您的桌面Java应用看起来像Open Office或Eclipse等?

[英]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安装面板中的一个元素,用于删除已安装的软件。

我尝试了Jar2ExeJSmooth ,它们都从jar存档中生成exe文件。

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.

相关问题 如何从java打开IE并通过java执行click()等操作? - How to open IE from java and perform operations like click() etc. through java? 如何在Windows(ffmpeg等)中使用Java快速截取桌面? - How to take a screenshot of desktop fast with Java in Windows (ffmpeg, etc.)? 如何更新Java构造函数,等于,哈希等。在日食? - how to update Java constructors,equals,hash,etc. in eclipse? 蚀如何感觉像中断循环结束,关键字等? - How eclipse senses the things like break loop end, keywords etc.? 为Java桌面应用程序设置IDE(eclipse) - setting your IDE(eclipse) for java desktop application 如何将弹出菜单的可见性限制为所有类型的文件,包括Java文件等可编译文件? - How to limit visibility of a popup menu to all type of files including compilable file like Java file, etc.? 如何使用 Angular 和 Java 在浏览器的另一个页面中打开预览文件(pdf、docx、txt 等) - How to open a preview file (pdf, docx, txt, etc.) in another page of the browser using Angular and Java 如何反映像java.Math这样的类(我想提取参数的函数类型,如:Math.abs()等) - How to reflect classes like java.Math(I would like to extract parameters' types of functions like: Math.abs(), etc.) 如何在 GUI Java 中制作功能区(如 Office 2013 功能区)? - How to make a Ribbon in GUI Java (like Office 2013 Ribbon)? Java是否有平台无关的代码来调用默认应用程序以查看诸如PDF,DOCX,JPEG等文档类型? - Is there platform-agnostic code in Java to invoke the default app to view document types like PDF, DOCX, JPEG etc.?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM