Monday, February 28, 2005

Fun with Unicode

I've been working on this application that has a Swing frontend which is being generated from Visio diagrams in Visual Basic (don't laugh, it's actually pretty clean code). I need to populate this huge form from our domain objects. The problem is, we don't have all the needed fields in our domain objects (yet). I can make the form come up with all these empty textfields, but it's hard to tell if the fields are empty because we have a null value in the database or it's because I didn't populate it. I need some kind of visual indicator to differentiate the unpopulated fields from null values.

Then I thought to myself, java strings are built on top of Unicode, I am sure there is some kind of Unicode character I can use that'll really stand out. A bit of googling led me to this site, and long behold ✘ would work beautifully. In java, that's "\u2718". Pretty neat, don't you think?

0 Comments:

Post a Comment

<< Home