Stuff to Play With: the EnumComboBoxModel
April 17th, 2006
One of the great things about having a project like SwingLabs is that it gives me a place to put classes I've built that others might find useful. Today I'm going to describe my recent addition to SwingLabs, the
EnumComboBoxModel, a cute little class that lets you stuff enums directly into your comboboxes with no extra work.
The Summer of 1998
April 10th, 2006
Some time ago I wrote an article for Slashdot discussing Be, Apple, and the future of operating systems. The mention of Be should indicate just how far ago this was. The other day I decided to try to find the article both to find out if I was at all correct in my conclusions, and to see if my writing has improved at all. Well, I couldn't find the relevant article, as Slashdot's archives are not complete (and their search engine even less so) but as I was going backwards in time I ran across some articles that are quite interesting today. I suppose it's odd to think of something as recent as 6 years ago in an historical context, but in Internet years it must be centuries. So let's dive in:
Once more Matisse Rocks
March 9th, 2006
I would just like to say that I'm more and more impressed with Matisse. It does it's absolute best to provide a realistic preview of running components at design time. Today I was building some component tests and was amazed to see that indeterminate progress bars are animated while in the designer! Have a look!
Props to the Trig Teacher
March 1st, 2006
I'm working on a program that requires I convert degrees of longitude into miles. Since we are mapping radians on to the sphere (mostly) that is Earth, I needed to do some trigonometric calculations. Upon whipping out some paper and pencil and drawing the triangles I needed I realized had to remember which function to use. Is it Sine, Cosine, or Tangent? Hypotenuse over Adjacent? Adjacent over Opposite? All... blurring... together....
All hail the PropertyChangeListener
February 26th, 2006
Often times when you are building an application you need to hook multiple components together in such a way that when one component changes others must do something. When you are building custom components there is often the temptation to build a custom set of listeners to go along with it. This seems like good component etiquette; after all this is how most of the
javax.swing.* components are built. Still, that's a big pain to create new listener types that must be implemented, just for observing simple changes. Plus it tightly couples your classes which can make your code brittle when making changes later. There must be a better way. And there is!
SwiXml builds better guis
February 21st, 2006
Just a quick note to let you know that I've got a new article up about SwiXml. SwiXml is an open source library for building Swing GUI layout using XML instead of code (ie: the evilness that is GridBagLayout). In the article you'll learn what you need to get started using it and how it works. Check it out and let me know what you think. Also let me know what other articles you'd like to see. I'm looking for new ideas. Thanks Josh
My Mustang Beta Thoughts
February 21st, 2006
By now you've probably all read
Easily Use Custom Swing Components with Matisse
February 7th, 2006
I know it's been quite a while since I've written anything. I've been busy with quite a few project and I'll have some cool stuff to share soon. In the meantime I thought I'd show you an interesting tidbit I discovered in Matisse and Netbeans.
Netbeans on Mac Tip
November 23rd, 2005
As some of you may know I'm a big Mac person. I split my time equally between my iBook (now heading back to the shop, alas) and my WinXP desktop. Being a dyed in the wool plain jane text editor type of programmer I've used jEdit for the past five years and have only recently started using an IDE like Netbeans. I've found Netbeans to a great productivity booster but on my iBook it seems to generate garbage at a mad pace. This is okay, it's just garbage, not a memory leak; but it's a pain when the editor locks up for five seconds to do garbage collection. Fortunately there is a solution.
I don't normally post about
November 18th, 2005
I don't normally post about non Java related tech stuff, but I thought I would mention this really cool new filesystem called ZFS. It's part of Open Solaris but will most likely be ported to other OSes soon enough. Even though it's made by my employer I hadn't ever heard of it until news started hitting the web a couple of days ago (Sun is a big company, after all).
Why use Java for Web 2.0?
November 14th, 2005
There's been a lot of talk lately about Web 2.0, and which technologies are going to take us there. We can debate the exact definition of Web 2.0, but I'd say a rough approximation would be an application which blurs the distinction between desktop apps and web apps. Many feel that the future is ultra-thin browser based client platforms like XUL or Ajax but I think that Java has a place, and will continue to grow in the future.
My First Full Day of JavaOne Japan
November 8th, 2005
I woke up this morning painfully early, 4:00, which, as anyone who knows me can say, is the time that people should be going to bed, not waking up. Until recently I didn't even know there was a 4:00 in the morning. Oh well, such is the cost of jetlag. Considering I'm 14 (or 10) hours different I think I'm adjusting pretty well.
My LA-JUG Peabody Presentation
November 6th, 2005
Last week I gave a presentation on Project Peabody for the Los Angeles Java Users Group, and I think it was well received. What's that? You've never heard of Project Peabody? That's okay. No one at the LA-JUG had heard of it either. We've only recently started using the name. Project Peabody is our community development project for new releases of Java; principally Mustang, aka: Java SE 6
Preparing for Tokyo
November 5th, 2005
I'm spending today packing for my exciting trip to Japan this week. Yes, I managed to wrangle a trip to JavaOne Tokyo, where I will be speaking on Java 2D performance, Swing layout, and helping out with the Peabody booth.
Design of a distributed disaster relief system
September 2nd, 2005
Katrina is big. Too big. By Katrina I don't mean the storm, but the overall situation. I feel like I did almost four years ago, unable to help or even understand much but realizing that our disaster services simply aren't up to the task. Sitting in California with sunny weather I wait, watch, and wonder what I can do.
Swing Hacks Bonus Article
August 12th, 2005
Time stands still for no man. Technology even less so. The world moves on and we have to adapt.
Get Swing Hacks for Five bucks
August 6th, 2005
I just got an email from my co-author and looked up the Fry's ads for the San Jose Mercury news. If you live in the Bay Area (or San Jose, at least) then you can get a copy of Swing Hacks for 20$ minus a 15 dollar rebate, for a final cost of 5 bucks. Supposedly it's even cheaper in Atlanta. I don't know what stores this applies to so be sure to check out the ads for the local Fry's in your area. So if you've been wanting to get the book it's on sale. Also be on the look out for a new article feature more Swing Hacks material that didn't make it into the book.
Using Java2D to to build a Stacked Image Editor
July 25th, 2005
Every now and then I get the idea to build a cool program that does something interesting. Sometimes I get an idea by seeing another program, or seeing an interesting API I've never noticed before. Sometimes both. A few weeks ago I was thinking about how close to 3D I could get while still using the Java2D APIs. There's no perspective transforms in Java2D but you can fake a lot of 3D with creative use of the standard affine transforms. Around the same time Romain complained about having to draw some 3d diagrams using Photoshop. It wasn't hard work, just tedious.
Fold N' Drop
July 19th, 2005
This has to be one of the coolest frame hacks I've run across. I also think this is a great use of a gestural interface techniques. The idea is that you can fold windows down to access what is behind them. They have a small java application (54k) that does everything.
Java One Lessons : The book
July 15th, 2005
Java One Lessons
The highlights for me were our session for Swing Hacks and meeting with customers at the JDIC and JDNC booths (more on that in my next blog). It's great to interact with developers (my "customers" essentially) and get some real feedback.
July 14th, 2005
Okay. So I realize this is about two weeks late. I've been on vacation back home in Atlanta and then catching up on about 4 weeks worth of email, blogs, java.net forums, and even some features I promised to the Flying Saucer and JDIC Misc projects. I actually wrote most of this over a week ago but just now got the time to finish it up. Enjoy!
June 30th, 2005
It's been a long, fun, and exhausting week. I'm going to get some sleep and vainly try to take a flight home tomorrow. Since I'll be there for hours, most likely, this will give me time to write proper entries about the second half of the week and how the conference went overall. In the mean time, our book Swing Hacks is finally shipping on Amazon and we've hit almost #3000. (as of this evening) That puts us in the in 1st of all Swing books, 5th of all Java books, and 79th of all programming books. Combined with the great turnout for all desktop related sessions I think this bodes very well for Desktop Java and rich client development. Look out Flash!
JavaOne: Day One
June 28th, 2005
Watching the keynote. Nice to see a reference to Morgan and Edison. We often forget our technology roots.
June 28th, 2005
I promise I won't shill too much, but Chris just told me that our book was the number 2 seller yesterday according to the list posted by the book store! To our readers we send a heartfelt thanks!
JavaOne: Day -1
June 26th, 2005
My JavaOne week has actually started two days early on Saturday. Why? Because I'm a co-community lead for Java.net's Mac community. What's that? You didn't know that there's a Java.net Mac community? Hmm. That's a problem. Well, that's why we have the Java.net community leaders weekend event two days before JavaOne. It's our time to get together face to face, discuss the issues we face, figure out how to solve them, and then make Java.net a better place for all of you.
JavaOne: Day 0
June 26th, 2005
Sunday is over and I need to get some sleep, as JavaOne starts for real tomorrow, but I wanted to blog down my thoughts (can blog be a verb now?) before I head off to the land of Nod.
A picture is worth a thousand words.
June 25th, 2005
This is a random thought, but where are the pictures. Most java.net projects, even the ones that have some visual user interface (as opposed to a library like Rome), don't have screenshots or diagrams. When I come to a new project I want to quickly know what it's about and if it's quality. A picture really helps with that. I know it sounds bad, but if there's a picture then it can first tell me if these people are serious and active, or if the project dead. A picture can also convey a lot of information more quickly than a paragraph of text will. When it comes to visual projects, say a date picker component, then this is doubly important. Show me a picture! It just takes a bit of time and it really helps grab my interest.
Getting ready for JavaOne: The Day of the Desktop
June 24th, 2005
Well. Here I am getting ready for my first real JavaOne. Actually, I attended back in 1999 and had the rare fortune to see Douglas Adams speak, but this is the first time I will be speaking as an author and attending as a Sun employee. It's going to be exciting. And since most Java developers can't attend JavaOne (where would they all sit?) I expect these Java.net blogs to light up like a Christmas tree during the next week. There's going to be all sorts of cool stuff going on, but don't just pay attention to the highlights. Some of the best things will be in the BoFs, smaller sessions, and especially the simple person to person talks over a good beer. (This is what we called P2P in the old days before they invented music, computers, and light.)
technology has warped my brain
June 17th, 2005
Today I was moving a bunch of files around for a new project. I had to copy several directories worth of code and images from a mounted remote disk to my home directory. Here's what I typed:
Why I haven't been posting
June 14th, 2005
Joshua talks about what he's been doing, what's coming up, and hands out some reading material.
The Reponse to Why Don't you Ship Swing Apps
May 9th, 2005
It's been a while since I posted my original weblog on why some developers aren't shipping Swing apps, and it's gotten over a hundred responses! This makes me happy because it means there are a lot of you out there who really care about desktop Java and want to ship good apps. It's our goal to make Swing the best way to write a quality desktop application, so all of this feedback is great.
Mac OS X 10.4 has arrived, with a Hi-Rez secret
April 29th, 2005
As everyone on this side of the galaxy must know by now, Tiger, version 10.4 of Mac OS X (will they ever hit Mac OS XI?), has finally arrived. If you're a Mac head like me you've been eagerly awaiting it at least since the previews last summer, if not from day 2 of 10.3's release.
A Hi-Rez Future
April 21st, 2005
I've been working from home in Atlanta since I started at Sun. I have two homes under renovation and a lot of things to take care of before I can move out west, so working from home for a few months seemed like the best solution. The problem is I only own a laptop, my new iBook. Coding and writing for 10 hours a day on a 1024x768 screen really is no fun. I've got a USB hub, mouse, and keyboard to make it feel more like a desktop, but nothing can replace having a good screen. Today I bought a flatpanel.
Sometimes you only need a little.
April 11th, 2005
The book is done and I'm up to my ears in Windows bugs so I thought I'd take a break and work on some Mac stuff. There are a few features I've always wanted from Java and needed anyway for another side project (I've got about 3 dozen, of course). The result is a few teeny, tiny classes I've added to the new JDIC Misc project. This project is meant as a catchall for small APIs, things that require only one class or perhaps even one method. The implementation may be complicated as all get-out, but to use it you need only call a function or two.
The Portable MiniApp: Mortgage Calculator
April 7th, 2005
Hey guys. A while back I started talking about something called a MiniApp and presented several examples (Weather, Christmas, Storm, and RSI Buster). I wrote another installment some time ago but never got around to finishing it because other projects (namely the book) took precedence. Now that Chris and I have turned in our final draft (yay!) I have more time to finish up the next MiniApp.
Why don't you ship Swing apps?
March 31st, 2005
Time and time again I hear that there are no Swing apps (or no good swing apps). We can come up with lots of excuses and explanations but that doesn't get us any closer to having more Swing apps. So I'd simply like to ask all of you. Starting with the assumption that all of you are Java developers in some fashion or another, but not necesarily Swing developers, I want to ask you:
Quick Tip for OSX Users
March 31st, 2005
If you are like me you have broken finger bindings. Probably from years of
bash use or maybe you just have to switch platforms all the time. Since finger bindings are difficult to change this little utility will change the key bindings instead.
Subversion Rename Rocks!
March 24th, 2005
I don't like revision control systems
I should start off by saying that I'm not a big fan of revision control systems. What I want out of an RCS is simple. Let me check files in and out so that my code is backed up and I can revert and merge as needed. I have found that branches rarely get used except in the biggest of projects. Though your RCS system can probably handle it, developers are still people and you can end up in a lot of trouble when you work on more than one branch at a time. Over the years I have used PVCS, RCS, Contiuum, Source Safe, Star Team (I think that was the name) and a few others. I keep coming back to CVS because it does exactly what I want (backup and store revisions of a tree of files) and does it with a few simple commands. It also has the advantage of being supported everywhere.
No Session-y Goodness for Me.
March 13th, 2005
As many of you have discovered, your submissions to JavaOne were rejected. Don't feel bad. Only one of my 6 proposals were accepted, and I'm now a Sun employee myself. I the competition was fierce. The upside is we should have a really rocking JavaOne conference coming up.
Big news. I'm going West.
February 23rd, 2005
Hello All. I know it's been a while since I've been posted, so I'd like to let you all know what I've been working on. Lots of good things have happened or are coming soon. First of all....
Apple's latest efforts are the triumph of software over hardware.
January 12th, 2005
Normally I don't comment on new products, especially hotly anticipated ones that a million others will pontificate endlessly. However, I'm breaking my rule because I'm quite amazed by the new iPod Shuffle and iMac Mini. Not because of the products themselves but because of what they represent. They are both the triumph of software over hardware.
XML to Swing and the Gradual API
December 7th, 2004
I know it's been a while since I've posted, and sadly it's going to be a while until I do again. Work, my opensource projects, and my book are keeping me slammed. I've lots of good stuff cooking, so stay tuned.
October 25th, 2004
Send me your ideas of what you'd like to see out of webstart. What are the missing features. What are the most important bugs? I want to figure out what we can do through addons and what requires changes from Sun.
Please: think of the users!
October 18th, 2004
Usability is the number one concern when designing software. And I don't mean "today with modern computing and the lack of new types of software usability is easier and growing in importance". I mean computers have no other purpose than to serve humans, and a better computer serves humans better. End of story. Software that doesn't conform to the way humans do things is bad software. (bad!) I don't care how cool and awesome your software is, if it's not understandable then it's useless.
Countdown to Christmas: a Customizable MiniApp
October 3rd, 2004
Weather Watcher: Release Deux
September 29th, 2004
One of the things I love about Java is that I can quickly change things. With an army of libraries and Java's renowned platform independence I can quickly hack on a new feature or move code from the client to the server. A couple of days ago I showed off a webstart app with, umm, a few issues. I now proudly present :
A New Rich Client: WeatherWatcher
September 27th, 2004
I think this MiniApp idea is starting to have legs. Thinking about all that Java Web Start provides we can start to imagine an application category: the so called "Rich Client". The key to a successful rich client is that it must do something that neither webapps nor native programs can do well. It must exist outside of the webrowser (the rich part), use the network for something (the client part), and not require installation (or as minimal as possible). I think my new MiniApp does this quite well.
New MiniApp: Storm Drain
September 22nd, 2004
While playing around some more with this miniapp idea, I came across geographer Tyler Mitchell's weblog post about hurricane tracking using Web Map Service urls. I thought this would make an interesting MiniApp and give me a good opportunity to play with a few webservices. Starting from his base (and with some greatly appreciated clarification emails from Tyler), I've created StormDrain, a simple program that loads WMS data and displays it graphically. Here's what it looks like:
September 10th, 2004
Hmm. Perhaps it should have been mouth.getLocation() instead. That would present a more consistent BadJoke API. :)
Visions of truly portable applications.
September 5th, 2004
I've been thinking about the miniapps idea some more. I still think it's a good idea, but I want to extend it a bit. Miniapps are great and all, 'cause they're, well, mini.. but I want more. Java is supposed to by write once run anywhere, but in practice any given program only runs on one computer. I'm not talking about whether it can be on Mac or Windows. I mean that I typically install the software on one computer and that's it. If we've got this great portable runtime then why aren't our applications truely portable?
Unleash the MiniApp
August 23rd, 2004
It's gonna be a busy week so I'll keep this short. I've been thinking a lot about moveable applications and the idea of rich clients. This is mainly on my mind because the Flying Saucer team has been hard at work on the next version of XHTMLRenderer. (We're shooting for an August 31st release) An embedded rendering component has pretty much one core use: applications with both GUI and html interfaces. But what do they look like? What creatures live in that shadowy borderland between the desktop and the web?
My 1 year anniversary at Java.net: the social side of software.
August 20th, 2004
It's been a little over a year since I've been here, and what a year it's been. Or something along those lines.
Quick Radial Blurring w/ Java2D
July 26th, 2004
I have to say that Java2D is amazing simply for it's productivity. The other day I was watching the psychedelic display in iTunes when I thought, I wonder how hard it would be to do that? I know it's a blurred and stretched out from the center, but that was pretty much it. I found some demoz that did something similar but I didn't feel like pawing through badly documented C++ code to figure it out. Instead I went to Java2D and wrote this in about half an hour:
Myth: There aren't any commercial apps written in Java.
July 19th, 2004
The last few months have been great for client side Java. With the release of JDIC, JDNC, Java 1.5 betas, and more support than ever from Sun, I think we are seeing a revival in interest for client side Java. Still, I hear the usual refrain: "If Java is so good on the desktop, then where are all of the commercial apps?" If I point to something like LimeWire I get: "No. I mean big applications, like Word." Well, I never have an answer for that one. I didn't seven years ago and I don't know. Speed and API support isn't an issue anymore, but there still aren't any well known commercial applications written in Java. That finally led me to the question "Is any big name application written in anything other than C/C++?"
My new opensource project: Flying Saucer, an all Java XHTML renderer.
June 18th, 2004
I normally try to be even handed, un-biased, and bi-partisan; but today I'm going to shamelessly use my muchly vaunted position as a highly skilled blogologist in field of java.net to plug my new project: Flying Saucer, an all Java XHTML + CSS renderer.
Swing Hack 8: An eyedropper tool
May 18th, 2004
On the plane back from California I decided I've had enough with politics for a while and I'm ready to get back to coding. One thing I've always thought was missing from Swing is a good color chooser. Swing provides a color chooser model and a default color chooser, but it's always felt unfinished. Another 3rd party opportunity I suppose.
An Analysis of Open Sourcing Java
May 3rd, 2004
I'm going to try to really tackle the issue of opensourcing Java and state my opinion of why it's a bad idea. Then I'll propose a way would could do it without all of the problems. It's a long one but please read to the end and provide your feedback. This is an issue that many feel strongly about and has the potential to influence Java's long term future. And as a career Java developer, it's something that personally concerns me.
Java's got a Bad Rep: The Rebuttal
May 3rd, 2004
So it's been a week and I've seen a lot of response to my last entry. One commentor in particular asked for a point by point rebuttal; which struck me as a spectacularly good idea. Here are the bulk of the arguments and my responses.
Does Java have a bad reputation?
April 26th, 2004
I recently read on Slashdot (something I promised myself I was going to do less) about Miguel de Icaza's comments on Longhorn. It was a pretty interesting read and makes me think I should read up on XAML and Avalon, Microsoft's new technologies for making advanced rich web applications. What struck me as particularly jarring, however, was this thread where someone asked about Java as a webapplication stack to compete with Microsoft or an as yet unwritten opensource toolkit. Most of the readers jumped on this and attacked Java from all sides. What particularly worries me was not that so many of these readers are opposed to Java, but that their arguments are almost completely wrong. Take a look at some of these comments:
From Scarcity to Excess: The economics of commodity software.
April 5th, 2004
I don't want to talk about how Open Source technology changes the rules by breaking up monopolies or giving you the freedom to reconfigure. I want to talk about actual economic effects as the cost of software approaches zero. It doesn't just save money, it produces new features by the way it's used.
The future is Vectorized
March 30th, 2004
I know it's been a while since I've posted. But I've been busy. With, um, you know, stuff! Writing stuff. Coding stuff. Drawing stuff.
Any HTML Renderers for Java?
February 3rd, 2004
I haven't written anything in a while because it was a busy Christmas season, Kimi is going back to school along with work, Lizi has to be fixed, and I started an exciting new job in the field of document management. But more on all of these later. Back to technology.
2004: the year of the Net-App
January 5th, 2004
A lot of people have put out lists of what they expect to see for the new year. Instead of going across the industry I'm going to focus on one topic in particular: networked applications. I really think that 2004 is the year of the netapp. Now sure, I know what you're thinking: "I thought 1994 was the birth of the most popular networked application ever: the webbrowser. You're about ten years too late". I'm not talking about the webbrowser. It's a general purpose application that isn't very good at anything, but good enough for almost everything. I really think the last few years have shown a desire for specific networked applications that, in the long run, will blow the pants off ye old browser.
Swing Hack 7: Let it Snow!
December 22nd, 2003
I've always wanted to make some sort of display that draws outside of a window with images scattered all across the screen. Though previously impossible in Java, I found a way to do it. And since Christmas is coming up I thought I'd use it to make a snowflake display. Here's a cropped screenshot of what it looks like:
How do you develop?
December 17th, 2003
We hear a lot about development processes these days, but I'd like to know what techniques people actually use? Do you create UML diagrams? Do you map out the states? And when it comes down to the actual code, how do you break it up into classes and packages? Does your methodology vary depending on the type of program you are creating?
December 12th, 2003
I was looking at the referers to my Swing has failed article and I noticed a site called Java Hispano.org. I think it's really cool that there is a spanish language java site. This is one of the things I love about the Java community. It brings together people from many different backgrounds, unified by the goal of making high quality reusable software.
Swing Hack 6: Ghost Mouse
December 9th, 2003
I've been playing with Swing a lot lately for my new series of articles. In my research I came across another interesting class
java.awt.Robot. It's a class that can automate the UI, mainly for testing. One particularly cool feature is the
mouseMove function. Once I saw this I got evil ideas. :) Imagine rogue java programs that move the mouse cursor to mystify and befuddle the user. Spelling out hideous horrible messages. Redrum! Redrum!. :)
Point, Click, and Drool!
December 1st, 2003
When reading discussions about Unix versus Windows versus Mac, I often hear people complain about the Point, Click, and Drool user interface. This is usually directed at the Mac, but I've heard it refer to Windows and even KDE before. These people imply (or sometimes simply state) that powerful computers are hard to use and that these easy to use computers are for mindnumbingly stupid people who can't be trusted with pencils, much less normal computers.
Microwaves Are Evil (at least mine)
November 24th, 2003
Yes, that's right microwaves are evil. More specifically, the microwave in my office. Or, to get right down to it, the interface on this microwave. You see, it's awful. Just plain awful. And yet, I've seen worse.
Swing Hack 5: a magic lens
November 5th, 2003
It's been a while since I've written something, so I thought I'd start out with another Swing Hack. This time I've expanded on the overlay idea of SwingHack 3 by adding sort of a magic lens. In this hack the overlaid information can only be seen when the special lens cursor is over it. To pull this off I've created a custom cursor using a buffer image and set it on the glasspane. The buffer contains a crude set of boxes to define the view area, but you could just as easily use an image of a magnifying lens. Next I've restricted the drawing of the glass pane to only be under the cursor by getting the cursor coordinates from a mouse motion listener and setting a clipping rectangle centered around the cursor. Finally I've added code to print the mouse coordinates as part of the cursor. Run, compile, and you get this: (pretend that you can see the cursor which Windows printscreen thoughtfully removes for you)
How about a jApp for my car?
October 21st, 2003
Chris recently wrote about the jApps One in particular intriqued me: the Dukester a little java box that plays MP3s and can download other things. This fits very nicely with an idea I had a few years ago and always wondered why no one ever did it: good MP3 car stereos.
How do kids program today?
October 14th, 2003
I have often wondered how people learn to program today. In the old days we had Basic and Logo, but what do kids use today? The old standbys are powerful enough to make something for the web (assuming they even exist) and nothing else has a simple development environment for children. Perhaps we need something new.
We should be software *designers*
October 9th, 2003
I stumbled across an older online magazine recently. A List Apart has a wide variety of topics, ranging from CSS and typography to what a designer truly does for their client. While the discussions range from the technical to the philosophical they always target their stories at designers. They've built a truly useful site and I look forward to their return (it's on hiatus now but should be back soon with new content).
Swing Hack 4: The universal right click
October 3rd, 2003
I received an email today asking about my use of the glass pane. It seems this fellow wants to handle right clicks on any component in each screen. A logical request. In most cases your right clicks are not limited to a single component, yet to receive the events required to show popups you have to add a listener to each component! Not enjoyable.
I have seen the light.
October 2nd, 2003
As part of a new project for work I have finally broken down and learned Struts and JSPs. Struts is tremendously useful. I wish it had been around five years ago when I was up to my ears in webbased applications. But JSPs I've never been impressed with. They are good for templating but the combination of java code and html always seemed crufty. I've been minimizing the amount of code I put in them and certainly prefer to use something like XSL to keep the UI and code separate.
Swing Hack 3: Overlay Graphics
September 26th, 2003
It's Friday so I thought I'd do another Swing hack:
Too many ways.
September 24th, 2003
There's been an uproar about Phillip Greenspun calling Java the SUV of computer languages lately. I don't agree with the general theme of the entry that a project done in Java will cost 5 times as much, take twice as long, and be harder to maintain than a scripting language.
Truly reliable software?
September 21st, 2003
I've been thinking. We have lots of software crashing these days. Some due to bugs. Some due to viruses and worms. Some due to hardware failure. And yet software is becoming more common and important than ever before. So what can we do to make software more reliable? Can it be 100% reliable when it is written by failable humans.
The two opposing forces of software: why career programmers will always have a job.
September 15th, 2003
A lot of people have been complaining about the loss of jobs in the programming field, and it's only going to get worse they say. I don't think it's true. There will always be work for the career programmer. We just have to make sure we move up the abstraction ladder. Even in a world where basic coding is done overseas and many components are opensourced, there's still plenty of work to be done, and paid for.
Passive Tech on the Ocean
September 9th, 2003
Last week I spent a much needed vacation in The Outer Banks. If you ever see a sticker with OBX in a circle on it, that's the Outer Banks. Beautiful and isolated barrier islands off of the coast of North Carolina, they provide great rest and relaxation. And also the opportunity to think about how technology fits in our lives. I've got lots of new ideas to discuss in my coming entries, but one in particular struck me: Passive technology.
SwingHack: keyboard spinner
August 28th, 2003
While crusing through the AWT/Swing documentation for another project I ran across a method I never knew existed:
Toolkit.setLockingKeyState(int keyCode, boolean on). It's been there since 1.3 (which is what, 3 years old now) but I never noticed it before. Hmm, I thought. What could I use that for?
Swing Hack: Window Snapping
August 22nd, 2003
While working on another project I came up with a silly idea. How could I force windows to remain completely on screen and to snap to the screen edges? A simple form of window snapping. Since you can receive an event every time the window is moved it's easy to create a Component Listener to do it.
Strong vs Weak Typing: Can't we have the best of both worlds?
August 15th, 2003
I've seen lots of arguments on the merits of weak typing. It encourages flexiblity. It lets me write code faster. I don't worry about the details until later. I can do cool runtime tricks.
Where are my free JavaBeans?!
August 11th, 2003
CVS or Else?
August 6th, 2003
In my years as a professional programmer I have used many Revision Control Systems (RCSes). It's that software that manages and protects the software you use. One of the tools of the toolmaker. Many companies pay tens of thousands of dollars for this software, often licensing it per-seat, and yet a perfectly good free alternative exists: CVS. In fact I will argue that there almost no reasons not to use CVS. While there are some other RCSes which beat CVS on technical grounds like parallel development I think that CVS has the edge in everything that counts.