简体   繁体   English

桌面Java应用程序替代品

[英]Desktop java application alternatives

I want to start developing desktop java applications and I would like to know what the java community uses. 我想开始开发桌面Java应用程序,我想知道Java社区使用了什么。

I started with Swing but I found it very rudimentary. 我从Swing开始,但我觉得它很初级。

I'm used to work with .net c# WPF with Visual Studio 2010 and I was looking for something with the same quality (or close) with java ( Swing + Window builder is not an option ) 我曾经在Visual Studio 2010中使用.net c#WPF,但我一直在寻找与Java具有相同质量(或接近)的东西(不能使用Swing + Window构建器)

I would appreciate your inputs, even if you disagree with my Swing opinion 即使您不同意我的Swing意见,也希望您能提供宝贵的意见

thanks all 谢谢大家

The other option you want want to look into is SWT (The toolkit Eclipse uses). 您要查看的另一个选项是SWT (Eclipse使用的工具箱)。 It renders using mostly native components so it feels more robust like a real desktop application. 它使用主要是本机组件进行渲染,因此感觉像真正的桌面应用程序一样更健壮。

I'm looking for a better looking and feel development.. 我正在寻找更好的外观和感觉。

Swing offers 4 PLAFs as standard. Swing标准提供4个PLAF。 There are at least a dozen more 3rd party PLAFs, some with dozens of variants. 至少还有十几个第三方PLAF,其中一些具有数十种变体。 Of that plethora of possibilities, end-users generally prefer the 'native' PLAF - which looks and feels mostly like 'every other native app.' 在众多可能性中,最终用户通常更喜欢“本地” PLAF,它在外观和感觉上都非常像“其他所有本地应用程序”。 on their machine. 在他们的机器上。

You can see a small app. 您可以看到一个小应用。 that changes PLAF. 会改变PLAF。 on the Nested Layout Example . 关于嵌套布局的例子 Here is the Mac. 这是Mac。 native PLAF. 原生PLAF。


..why do you think it is not easy? ..您为什么认为这并不容易?

This was said in relation to a general comment that it is harder to build a GUI in Swing than (for example) Visual Studio. 据说这是与一般评论有关的,比起Visual Studio,在Swing中构建GUI更为困难。

The reason for that is that Swing is intended to work on multiple platforms, screen-resolutions/sizes, PLAFs (and other factors). 这样做的原因是,Swing旨在在多个平台,屏幕分辨率/大小,PLAF(和其他因素)上工作。 As such, 'dragging and dropping' components into their final position is impractical, since that might change according to the factors listed above. 因此,将组件“拖放”到其最终位置是不切实际的,因为这可能会根据上面列出的因素而改变。 Instead Java relies on the concept of layout managers, which calculate the size and position of components as they appear at run-time. 取而代之的是,Java依赖于布局管理器的概念,该管理器在运行时显示组件时计算组件的大小和位置。

The layout managers use 'logical groupings' of components to achieve the desired general shape expected of a GUI. 布局管理器使用组件的“逻辑分组”来实现期望的GUI期望的一般形状。 The image above is an example of how to combine layouts to achieve different effects in different parts of the GUI. 上图是如何组合布局以在GUI的不同部分实现不同效果的示例。

Although I don't use GUI builders for Java I do feel that they can increase productivity, it is just a matter of: 尽管我没有使用Java的GUI生成器,但我确实认为它们可以提高生产率,但这只是一个问题:

  1. Already knowing what Java Layouts are available, and how to use them. 已经知道哪些Java布局可用,以及如何使用它们。
  2. Using the standard layouts in combination in the GUI, to achieve the desired effect. 在GUI中结合使用标准布局,以达到所需的效果。

If you don't mind an external dependency, you could also take a look at SWT . 如果您不介意外部依赖关系,则还可以查看SWT It's the framework that eclipse is built with, though it's not the easiest thing in the world to use. 它是eclipse的构建框架,尽管它并不是世界上最容易使用的框架。

It does provide a GUI-builder called SWT designer (if I remember correctly). 它确实提供了一个称为SWT设计器的GUI生成器(如果我没记错的话)。 It's not as good as what you're used to in Visual Studio though. 但是,它不像您在Visual Studio中所习惯的那样好。 That's a pretty high bar for quality. 这对质量来说是一个很高的标准。 In the brief experience I have with it, there was a fair amount of boiler plate code, and the API isn't quite as intuitive as I'd like personally. 在我的简要经验中,有很多样板代码,而且API并不像我个人所希望的那样直观。

However, it is fairly widely used. 但是,它已被广泛使用。 Eclipse is built on it, and by extension, so are many professional tools built from that same base (Such as IBM's Rational tools, and Adobe's ColdFusion Builder). Eclipse是在此基础上构建的,并且通过扩展,许多基于该基础构建的专业工具(例如IBM的Rational工具和Adobe的ColdFusion Builder)。 That should give you an idea of the power of the tool, if nothing else. 如果没有别的,那应该使您对工具的功能有所了解。

How about Java under Mono,using IVKM and Gtk? 在Mono下使用IVKM和Gtk的Java如何? You would be able to program in java, but your application would actually be .NET code... Not sure if that works for you. 您可以使用Java进行编程,但是您的应用程序实际上是.NET代码...不确定是否适合您。

If you want to move away from .NET alltogether, then perhaps you could use the java Gtk bindings: http://java-gnome.sourceforge.net/ 如果您想完全脱离.NET,则可以使用Java Gtk绑定: http : //java-gnome.sourceforge.net/

Check out JFormDesigner . JFormDesigner JFormDesigner with Eclipse is a very powerful tool set. 带有Eclipse的 JFormDesigner是一个非常强大的工具集。 Also look for a good LaF. 还要寻找好的LaF。 See The Alloy Look and Feel and JGoodies . 参见合金外观JGoodies You may find Look and feel in java useful. 您可能会发现Java中的外观很有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM