Swing与SWT [英] Swing versus SWT

查看:167
本文介绍了Swing与SWT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应该使用什么标准来选择SWT和Swing?我认为它们都提供了令人满意的GUI性能和平台可用性。

What criteria should I use to choose between SWT and Swing? I assume they both provide satisfactory GUI performance and platform availability.

我的个人标准目前包括:

My personal criteria currently include:


  • 布局/布局管理器;

  • 数据绑定;

  • 预建控件;

  • 易于开发。

  • layouts/layout managers;
  • data binding;
  • pre-built controls;
  • ease of development.

推荐答案

我在SWT和Swing之间做出选择的标准:

My criteria to choose between SWT and Swing:


  1. 文档的质量和可用性(文档,书籍,教程,片段)

  2. 自定义组件的数量(两者都有)商业和免费)

  3. 开发工具的质量和可用性,如RAD窗口构建器,平台
    用于自动化gui测试..等等。

  4. 原生外观与自定义外观

  5. 学习曲线(与第一点相关)/易于开发

  1. quality and availibility of documentation (docs, books, tutorials, snippets)
  2. number of custom components (both commercial and free)
  3. quality and availibility of development tools like RAD window builder, platform for automate gui testing..etc.
  4. native look and feel vs custom look and feel
  5. learning curve (related to point one) / ease of development

通知:我在小型项目上只有SWT的商业经验,而且我的挥杆经验非常小,不能认真对待 - 我的知识相当理论而非实际。

notice: I have only commercial experience with SWT on small project and my swing experience is so small that can't be taken seriously - my knowledge is rather theoretical than practical.

简要介绍一下我的SWT / Eclipse RCP经验 - 下一个项目我会选择Swing 即可。
对于我而言,api似乎比SWT更容易(您无需手动管理组件以防止内存泄漏,您将组件添加到面板而不是使用父面板信息构建组件,前者更接近我以前的经验...等等。),原生的外观和感觉你也可以摆动,整体性能足够好(swt应该更快,因为它使用支持操作系统的原生组件 - 但性能增益真的很大吗?我不也这样觉得..)。 Swing中有很多自定义组件比SWT更多(这对于挥杆来说非常大)。

Briefly after my SWT/Eclipse RCP experience - on next project I would choose Swing. It api seems for me easier than SWT (you haven't got to manage disposing components by hand to prevent memory leaks, you adding component to panel instead of constructing components with parent panel information, former is closer to my previous experience...etc.), native look and feel you can get in swing too, overall performance is enough good (swt should be faster because it's using native components of backed OS - but is the performance gain really big pro? i don't think so..). And there is lot of more custom components in Swing than in SWT (this is very big pro for swing).

这篇关于Swing与SWT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆