Not really an announcement: GUI frontend to Scala Interpreter

So, I’ve finally got sick of the unusable command line interface to the Scala interpreter.

Don’t get me wrong, I like command line interfaces. But I’ve always found command line interfaces written in Java to be pretty horribly unusable, and the variety of different quirks shown by the scala one between windows and linux is pretty gruesome.

Anyway, the upshot is that I’m building a simple GUI frontend to it. It turns out that the interpreter API is actually really easy to work with – it only took me about half an hour to hack together a basic working frontend (after some… minor issues with Java’s IO API)

So far this isn’t really in a state that other people can use it – no proper buildscript, the GUI frontend is hacked together in the interface designer and doesn’t handle resizing properly at all (so is probably broken on any resolution but mine). This is more of a “If you want to look at the code and see how to do it” than anything else. It’s available in my misc hg repository.

A particular reason you might want to look at the code is that it uses QT Jambi rather than Swing, so if you want a Swing version you’ll have to write it yourself and might find this a useful starting point. Why? Well, two reasons. Firstly, I like the results and API of QT better than Swing’s. Secondly, Swing doesn’t work on my home PC so it would be pretty pointless for me to use it.

This entry was posted in programming and tagged , , , , , on by .

4 thoughts on “Not really an announcement: GUI frontend to Scala Interpreter

  1. david Post author

    Ah, interesting. Thanks.

    I figured someone must have done this before, as it’s not exactly hard, but I couldn’t find any examples.

    I’ll probably still continue tinkering with this. It’s fun, and I’d like to flesh out the featureset. But I’ll definitely take a look at yours.

  2. Ben Jackman

    I just starting a project to do similar a few days ago, what is weird was I was going to write to you to get your permission to use the MenuBar class that you wrote because I would like to use it for the menus.

    It doesn’t work yet. You can check it out if you want. I am using google-code to host it,

    I am trying to make an interface similar to Mathematica.

    Let me know if you want me to remove your MenuBar implementation.

    Best of Luck,
    Ben Jackman

  3. david Post author

    As mentioned, any code I blog about or post on should be considered to be under the WTFPL unless I say otherwise. Do whatever you like with the menu bar code. is having… issues… at the moment, but you can grab an updated copy of my code from if you want it. Still very much a work in progress!

Comments are closed.