Hacker News new | past | comments | ask | show | jobs | submit login
Zetes: A lightweight cross-platform GUI application framework for Java (github.com/bigfatbrowncat)
41 points by medeu on July 2, 2014 | hide | past | favorite | 31 comments



People are complaining about how bad SWT is, and I definitely agree. It's a product of systems engineers, not the modern hipster-designer breed of developers.

If you fall into the latter category and want to work with Java, I highly recommend JavaFX Webview. It's essentially webkit as a UI layer, so you get to work with HTML5/Bootstrap/whatever. Surprisingly, its interface from Java to Javascript is quite well designed.


I second your JavaFX Webview recommendation. And if you are using JavaFX, you can always use its built-in native packaging tool

http://docs.oracle.com/javafx/2/deployment/self-contained-pa...

Not to say everything else is perfect in JavaFX world but I think if you want to deploy a JavaFX application that is cross platform, the only major missing piece now is auto update support/framework for these self contained applications


This actually looks intriguing. Some links to screenshots or sample programs would be nice.




Low-res and you can't really see the control elements.

Color me skeptical.


Indeed, apps consisting of cat pictures in otherwise empty windows don't inspire me.


> Zetes is a crossplatform lightweight framework which allows the user to develop console or native-looking GUI programs, written in Java, that could run on a machine without any JVM installed.

Awesome, sounds great.

> And in addition it has a beautiful GUI (based upon SWT).

Hm, I had a bad experience with SWT (which was over 10 years ago, so probably irrelevant). But what annoyed me is that if Windows could do X and Y, and Linux could do Y and Z, then SWT could only do Y. I found its lack of features a problem. I felt like I had to create my own components by hand a lot of the time. Swing, on the other hand, would let me do X, Y and Z and make sure they look decent on both OSes.

> The main feature of the library is that it makes a thin wrapper on SWT and basic system libraries that makes it possible to make an app which has a native look-and-feel under different platforms. For example, the "Exit" item is in system menu on OS X, but in "File" menu under Windows; about box has "OK" button in Windows, but doesn't have any on OS X and so on...

Mind, it's been over 10 years, but how is this different from plain SWT? Is it just that it can run without a JRE?


A lot of effort went into this obviously.

How does it compare to JavaFX -- the new GUI toolkit built into the standard JRE now?

(I have not used SWT, but I do love JavaFX)


JVM is a sticky affair by itself.For concurrent and per-formant GUI applications in java that grow over a given expectation,it would need very specific VM tuning like GC behavior,native profiling etc.Most of it comes packaged in a decently stable manner for Oracle JVM, how about a new JVM vendor like in here?

Also am i the only one or is JVM packaging a really big affair?Cant we use netbeans platform pack200+MSI installer or pack200+linux+native_installer or similar for packaging as app?


You mean to bundle a jre into your application?

There is:

- install4j

- exe4j

- AdvancedInstaller

etc...

All will bundle your jre into an exe, msi, .sh (auto-unpacker), etc. You can even do .dmg's if you want.

I actually find packaging my java apps pretty easy. :)

Also... there are a LOT of JVM vendors. Oracle's JRE/JDK just so happens to be the most well known. Besides OpenJDK/JRE, many other companies make their own such as IBM, BAE, BlueSystems, etc.


From supported os section:

> Ubuntu 12.10 or any compatible (x86_64)

Is it gtk compatible or what? Why just 12.10? Some specific gtk version? I don't get it.


You are interpreting this wrong I believe.

I think the intent was to say:

Linux, on any x86_64 architecture, is supported.

For some reason... people like to list Ubuntu instead of "Linux" when stating they support Linux. The 12.10 is probably just to ensure you have a relatively recent disto.


I tend to think when people specifically claim to support "Ubuntu" (instead of "Linux") it means they actively tested it with Ubuntu and have determined that it is compatible with Ubuntu. I guess it's easier to just assume everyone uses Ubuntu rather than put in the time/effort to confidently assert that it works with any distro you throw at it.


Probably a fair assessment. However, it should "just work" on any Linux disto provided any dependencies are installed on the distro and/or packaged into the toolkit.

If there are system-side dependencies... I'd like it more if they just listed those... then I can determine if my Fedora system, for example, will work or not... and I know what I need so that it will work instead of just guessing.

Looking at the toolkit... well.. it's Java... so it will "just work" provided java is installed on your machine (a given if you are writing or running a java program). There is some native C in there, likely for hooking into the OS and making windows, etc.... that could be system specific... but probably still does not require any external dependencies. So... this toolkit... probably "just works".



The screenshot for the TinyViewer on Windows shows why this sort of thing is difficult to pull off well. The File drop-down doesn't align where it should, it hangs off to the left. The Window drop-down is far, far worse.


Not a Java guy. Not sure the differences between JDK 1.7.x and JDK 8 (8u5 is the current version in the link). I assume it's JDK 1.8.x, but am not sure. Is JDK 8 okay or do we need an older version?


i think it's very telling that someone built a GUI framework but didn't feel the need for any screenshots. If it's a GUI tool and it ain't worth showing screenshots, then it ain't worth using IMNSHO.



To see the difference between Swing and SWT just look at Intellij and Eclipse.

Intellij (use the darkula theme its beautiful), looks great and responds very quickly in both the editor and when performing asynchronous operations. (I have issues with some of its functionality but thats a different story). Intellij is Swing.

Eclipse, is a 2 second push to pain IDE and always has been. Its SWT. As a 15 year java developer I really believe anyone building on the eclipse/SWT framework needs to stop. There is no benefit to the user or the developer at this point to using it except to support a dead fork of the language. In fact there really are no (as in almost zero) SWT apps out there, so why would you think its even a good idea 10 years later? Go work for IBM submit a patch to eclipse. YAY.

I have built personally beautiful apps using Swing, and if Intellij can pull it off so well, clearly swing has gotten a bad rap.

My last nit pick is the exe concept. This is utterly moronic. Its a more or less straightforward concept to bundle a JRE with your app or use an installed local copy. People have only been doing this for oh I dunno, 13 or so years??

The Windows-ification of Java gets infinite down votes from me. The SWT part is merely a waste of time.


Yeah. Swing is so easy to use and you can make it do anything you want. I don't know why people complain so much. I got used to using layout managers and not specifying x,y locations and widths and heights that I just don't like JavaFX.


After my horrible experience building a desktop cross platform app in Swing GUI, I vowed to never use Java. I wonder how Zetes addresses the problems with Swing.


Any concrete example of issues with Swing, or just general discomfort?


The font rendering for Linux is terrible. Just look at Intellij IDEA in ubuntu for example.

It's a wonderful editor but I can't use it since it is almost not readable.


>> The font rendering for Linux is terrible.

Ubuntu fonts are great, which Linux are you talking about and is this recent as in the last 5 years experience or is it qualified non-sense on your part?

>> Just look at Intellij IDEA in ubuntu for example.

I have, I'm not impressed overall though on Ubuntu the fonts are fine. I stick with Eclipse because SWT was and is a brilliant idea, the widgets don't just look native, they _are_ native.

That bears repeating, with SWT, the widgets don't just look native, they _ARE_ native.


Swing does its own font rendering, so the fonts look wrong[0] on every platform.

[0] Where "wrong" means "different from what is expected on the platform" – until we get higher-resolution screens font rendering is a compromise between sharpness and correctness-of-shape; different platforms make different choices; users adjust to the specific choices their platform has made. To observe this in the wild, read any discussion of Safari on Windows.


FWIW this patch:

http://www.infinality.net/blog/infinality-freetype-patches/

https://launchpad.net/~no1wantdthisname/+archive/openjdk-fon...

Makes IntelliJ fonts actually look good on Linux. It's unbelievable how much better they look, and why no one has fixed this before.

I might actually switch to IntelliJ now.


This is a real problem one thing worth trying is Terminus at 16/12pt it's a pixel perfect font created as a TTF so requires no aliasing etc.

Completely solved the issue for me.


By using SWT instead of Swing, it would seem.


perhaps if you gave some examples of your issues with swing, you'd find out.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: