We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
来源。我建议检查一下。
另外,Ingo 发布了不错的介绍到 scala.swing 设计。
我发现阅读源代码并不难,而且有很大帮助。
There are many good examples in sources. I recommend checking it out.
Also, Ingo posted a nice intro to the scala.swing design.
I found that reading the sources wasn't so hard and helped a lot.
这是 Ken Scambler 的简短演示 (幻灯片),其中他解释了 scala.swing 的基本思想,并使用 mixin 组合来绘制组件,并做了一些不错的技巧。
Here's a short presentation by Ken Scambler (slides here) in which he explains the basic idea of scala.swing and does some nice tricks using mixin composition to paint components.
官方scala.swing 描述 有许多很好的例子。此外,Martin Odersky 的 Programming in Scala 书中也有一些示例和其他人。
The official scala.swing description has a number of good examples. Also, there are examples in the Programming in Scala book by Martin Odersky and others.
Odersky 的 Scala 编程 的最后一章(第 33 章)介绍了制作一个简单的过程,但使用 Scala 的 GUI 电子表格程序肯定不简单。这是一个非常丰富的 GUI 应用程序,源代码(以及解释)都在那里。前面的章节详细介绍了使用 scala.swing 进行 GUI 编程,并且充满了示例,但完整的示例并不多。
Scala 在创建桌面应用程序中并未被过多使用,但它确实可以做到。如果您想要一个带有 Scala 应用程序的 GUI,Swing 绝对可以解决问题(它是在许多流行的桌面应用程序中以 Java 形式使用,例如 Eclipse,以及scala.swing 只是 javax.swing 的包装器)。
The last chapter (Ch. 33) in Odersky's Programming in Scala goes through the process of making a simple, but certainly non-trivial GUI spreadsheet program using Scala. It's a pretty rich GUI application and the source (as well as explanation) is all there. The chapter before it details GUI programming using scala.swing and is full of examples, but it doesn't have very many complete ones.
Scala isn't used too heavily in creating desktop applications, but it certainly can be done. If you want a GUI with a Scala application, Swing definitely does the trick (it's used in its Java form in a number of popular desktop applications, like Eclipse, and scala.swing is just a wrapper for javax.swing).
scala.swing 附带了示例,可能匹配“小但不平凡”。这是 Scala Swing 的 GitHub 主页 /test 的链接文件夹。
这还不够,但却是最好的开始。
堆栈溢出问题Scala 中的 Swing 教程?有一个回复指向德语教程,并附有示例(不需要说德语,继续按按钮)。
这个 tetrix 示例并不简单,但 GUI 很简单。
包根不是直接回答问题,但在这些情况下,API 是一个好的开始。
scala.swing comes with examples, likely matching "small but not trivial". This is a link to the GitHub home of Scala Swing, /test folder.
It's not enough, but it is the best start.
The Stack Overflow question Tutorial on Swing in Scala? has a reply pointing to a German tutorial, with examples (no need to speak German, keep pushing the buttons).
This tetrix example is not trivial but GUI-simple.
package root is not answering the question directly, but in these circumstances the API is a good start.