Creating a GUI in Scala, but WITHOUT Swing / AWT

I am going to write a new application that should have a graphical interface. When I recently turned over a book about Scala (and became really clogged), I decided to learn this language first and then try to create a program.

What I was interested in: Is there a decent way to create a GUI in Scala without having to use Swing / AWT tools? I don't like Swing / AWT because they seem immature compared to Qt and Co. Unfortunately, I could not find much information about creating a GUI in Scala, regardless of them.

Since I’m completely new to Scala and don’t know too much about it, however, I’m also wondering if it is possible to use Java binding of certain toolkits in Scala in a way that wasn’t sacrifice any of Scala's nice features (e.g. pattern matching )

One more note. The toolkit should support Linux and Windows, and Look-and-Feel should be equal to the source on each platform.

UPDATE: This is my current toolkit rating (feel free to comment on this):
1. SWT
+ native L & F
+ real java solution
not sure about performance but
I'm not sure about the simplicity of training and coding, but
- dealloc is necessary to free resources
2. Qt Jambi
+ partially native L & F
+ many features
+ pretty easy to learn
not sure about performance but
- wrapper around C ++ toolkit => can the code become ugly?
3. Java Gnome
I'm not sure about anything, yet - has anyone tried this?

Toolboxes for which there is no active Java shell development:
- WxWidgets

Toolboxes that are discarded:
- Swing / AWT: Old and I don't like coding
- JavaFX: the target application of Rich Internet - I want a separate application

A new toolkit, written for Scala programmers from scratch, would be nice, but I assume that this will not happen because of the possibility of reusing Java-based solutions.

+7
source share
3 answers

Scala should do everything you can do in java, so yes, if you have a java binding for the gui library, it should work fine.

Have you considered SWT as an alternative to AWT / Swing? If possible, he uses his own widgets. Eclipse is written using SWT.

+6
source

How about JavaFX? JavaFX 2.0 is expected to appear soon. You can write JavaFX in Scala :)

0
source

QT-Jambi is a way to go, it doesn’t work out of the box,

Instructions? This link will be useful for you: http://www.davidlauzon.net/2010/01/getting-started-with-qt-jambi-on-linux/

http://qt-jambi.org/downloads

I suggest using 4.6.3 because it is complete, the beta version has no files

__

I decided to learn this language first, and then try to create a program.

And I don’t know if you are looking for a specific Java solution, but Python is a good alternative and you can choose QT (again), wxWidgets and much more ...

Python QT Specifically, there are 2 bindings, one is PyQT and PySide, the advantage of the latter is the LGPL license, and you can monetize it.

Sample code here and here: http://qt-project.org/wiki/PySide_Example_Applications https://github.com/PySide/Examples

0
source

All Articles