Now blogging at diego's weblog. See you over there!

Why the 'Java Stigma' - Part 2

Glen was asking for some sample code for BoxLayout/BorderFactory, and
here it is. It's a simple frame with a set of components inside,
mostly a copy of the code I use in spaces to create the "Edit Mail Account"
dialog.

In the previous entry on this topic I mentioned Borders and Layouts as one factor that affect how a UI looks in Java. Another factor is... the details (where the devil is :-)). Things that we tend to take for granted but that are really what makes an application feel "solid" or simply well done. These are things that in general I think contribute to the stigma of Java being unable to support client applications properly.

Take colors.

For example, suppose that you have a JTable in a JScrollPane. Because the table is by default not opaque (the cells are) if you have a larger ScrollPane than the rows in the table you end up with the unpleasant side effect of seeing one background color (for the table) and another for the ScrollPane. Except that the ScrollPane isn't handling the background, it's the JViewport inside the JScrollPane. So when using tables in scrollpanes the following line always comes in handy:

scrollPane.getViewport().setBackground(table.getBackground())
Another example of details that make an application feel strange are icons. In the case of spaces, I created the icons myself (except for a few that I used from the Java Look and Feel Graphics Repository) after I noticed that the icons were making the app feel like ... er, wrong. Finally, details are not only visual, they are also behavioral. Consider right-click menus. Right or wrong, people have gotten used to right-clicking everywhere on an interface. In some cases, if the right-click popup menu isn't there, the application feels incomplete.

In sum, it's not that Java doesn't do it, but simply that what in other platforms is already taken care of (and you have to give Microsoft credit for making it easy to build "proper" Windows-looking with Visual Studio) has to be done more or less "manually" in Java, and sometimes it's not obvious how to do it.

Next topic (tomorrow? Friday?): UIs as an afterthought.

Categories: technology
Posted by diego on December 4, 2002 at 5:45 PM

and cows fly, too

According to this News.com article, IDC says that Windows Server is cheaper than Linux. Right, right. The whole TCO thing. Apparently the administrators that IDC talks to never have any problems with Windows, and they assume that Linux has higher cost because people are not familiar with it.

These are the same "analysts" that say that Linux is only used by people who are... familiar with it. Because it's too hard for other users!

Maybe these guys would like to take a course on propositional logic one of these days...

Categories: technology
Posted by diego on December 4, 2002 at 1:03 PM

a-nother comment

Matthew comments on spaces also referencing a really, really old (in Internet time at least, I mean, almost a month! :-)) comment from beblogging about it downloading multiple copies of the same message. That was actually fixed (and released) by the time Ugo made that comment (testing on a pre-alpha release, btw.)

I just realized, almost a month already since spaces was first released. wow.

Categories: technology
Posted by diego on December 4, 2002 at 12:15 AM

Copyright © Diego Doval 2002-2011.