UPM 1.5 Released

Just thought I’d slip another release of UPM out before the end of the year.

Here’s what’s new in this release…
– Added Czech and German translations (courtesy of Petr Ustohal)
– Added username and password fields to the HTTP proxy options
– The HTTP Proxy can be enabled/disabled using a checkbox while still retaining the settings for later use
– In the account information dialog the password is masked by default. To view it you untick a checkbox. Thanks to Jelle De Pot for suggesting this feature
– Removed the French localisation (no French translator available)
– Fixed a problem that caused a NullPointerException on the Mac OS X version when exiting the Options dialog after changing the language
– A few small bugfixes here and there

Hiding & Unhiding the text in a JPasswordField

JPasswordField is a Java SWING control used to manage password fields. Rather than use a normal JTextField it masks the characters typed by the user with some other character (default is an ‘*’).

Very often it’s useful to see the actual text in this field. One way to do this is to give the user the option to have a quick peek behind the masked characters by clicking on a checkbox. After adding this feature to UPM I thought it might share it since it used a feature of JPasswordField I hadn’t seen before.

The code below shows the action listener I placed on the checkbox used to toggle the password visibility.

hidePasswordCheckbox.addItemListener(new ItemListener() {
    public void itemStateChanged(ItemEvent e) {
        if (e.getStateChange() == ItemEvent.SELECTED) {
            httpProxyPassword.setEchoChar('*');
        } else {
             httpProxyPassword.setEchoChar((char) 0);
        }
    }
});

Basically the setEchoChar() method sets the character that’s displayed instead of the actual character. When you set this value to “0” JPasswordField doesn’t perform any masking. It’s that simple.

Why I’m Ditching My iMac G5 for Windows

About 2 years ago (Nov 2004) I bought my first mac, an iMac G5. In general I’ve been quite happy with it but it’s never really blown me away. There are a few nice features and applications but over the past few years there have been some pretty great free applications brought to the PC that can compete with the equivalent on the Mac, Picasa being one that comes to mind.

Aside from the average user experience, the performance certainly hasn’t been anything to get overly excited about. I know it’s just an iMac and not a Mac Pro but I’d still have expected it to be at least as fast as a comparative PC. The problem with the Mac is that if you’re not prepared to spend vast amounts of money on certain software the free alternatives are pretty lame. As an office replacement I used NeoOffice. This is a Mac specific build of OpenOffice. The performance is nothing short of brutal and I know it’s not an OpenOffice problem because I also run it on a PC with a much lower hardware spec and it performs fine. Another application I use regularly is Eclipse. On the PC this application performs fine (it’s Java so it’s not blazing fast). Again, the Mac version performs like an absolute dog. It did originate on the PC so it’s not surprising there’s not been as much focus on the Mac version I suppose.

Even with the average user experience and comparatively poor performance I’ve stuck with the Mac over the years. However, problems over the last couple of weeks have finally made me turn my back on the Mac. First of all my wireless keyboard died suddenly. No warning of any sort, it just decided not to work one day and that was the end of that. The next problem was a bit more serious. For a couple of weeks or months up to this point the Mac was behaving quite strange. Every now and then an application would just crash suddenly. It’d start back up fine but it wasn’t normal. Eventually the problem manifested itself as a pixelated screen at bootup time. To get the machine to boot up I’d have to restart it three or four times, effectively getting it to warm up. After looking around on the web I came across this site that explained my problem pretty well. When I opened up my Mac the capacitors were even worse than those shown on the site just mentioned. They were all leaking a creamy sort of goo. I assumed this wasn’t good so after I rang Apple they confirmed that I had a know problem and agreed to fix the problem for free under a repair extension program. I brought it into TypeTec and they had it back to me in a week or two. It worked perfect for about a week but now I’m having another problem, the colors on the screen all have a blue hue to them. Every now and then (particularly if the machines been on for a while) it will suddenly flick back to normal but that’s an exception.

So that’s where I am now. The new year will bring a new computer and I’ve decided to go back to the PC and Windows. It’s not been a hard decision really. I’ve had my Mac holiday but now I’m ready to go back to the safety and comfort of what I know best.