有使用“scala.swing”的好例子吗?

发布于 2024-10-09 00:56:11 字数 1539 浏览 0 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

春花秋月 2024-10-16 00:56:11

来源。我建议检查一下。

另外,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.

神也荒唐 2024-10-16 00:56:11

这是 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.

半寸时光 2024-10-16 00:56:11

官方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.

夏日落 2024-10-16 00:56:11

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).

顾忌 2024-10-16 00:56:11

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文