简体   繁体   English

Scala,动画和图形用户界面

[英]Scala, animations and graphical user interface

I want to be able to do graphics with Scala programming language. 我希望能够使用Scala编程语言进行图形处理。 Need to be able to do animations and attractive user interface, where to start? 需要能够做动画和有吸引力的用户界面,从哪里开始?

Remember that scala can use java classes? 请记住,scala可以使用java类吗? :) I would start by learning the Swing framework , which is a Java framework containing everything you need to get you started building GUIs. :)我将从学习Swing框架开始 ,这是一个Java框架,包含了开始构建GUI所需的一切。 For animations, have a look at javax.swing.Timer , which fires events on the event dispatch thread (the thread on which all Swing GUIs must run on - Swing is not thread safe). 对于动画,请查看javax.swing.Timer ,它会触发事件调度线程上的事件(所有Swing GUI必须在其上运行的线程 - Swing 不是线程安全的)。

Scala provides helper classes simplifying the building of swing applications in the package scala.swing , its API found at scala swing API 2.7.5 Scala提供了帮助类,简化了scala.swing包中swing应用程序的scala.swing ,它的API在scala swing API 2.7.5中找到

Java also provides an experimental framework to simplify Swing development, the appframework . Java还提供了一个实验框架来简化Swing开发,即appframework

Hope this helps :) 希望这可以帮助 :)

As Flaviu said, anything that's available in Java is also available in Scala for creating nice GUIs. 正如Flaviu所说,Java中可用的任何东西都可以在Scala中用于创建漂亮的GUI。

If you want to learn how to write really nice and sexy GUIs with Swing, I recommend the book Filthy Rich Clients by Chet Haase and Romain Guy. 如果你想学习如何使用Swing编写非常漂亮和性感的GUI,我推荐Chet Haase和Romain Guy的书Filthy Rich Clients

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

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