Frame Z-order in Java?

Thursday, July 13th, 2006

I must be missing something obvious. Is there a method anywhere in the AWT (preferably in Java 1.4 but maybe 1.5) that allows me to determine the z-order, relative or absolute, of free-standing windows such as frames and dialogs? Specifically I need to know which of several dozen frames is on top among that group. To make this trickier:

  1. There may be other frames and dialogs that do not count. For instance, if the preferences dialog is really on top, I still need to know which of my application’s document windows is on top among the document windows.
  2. I need to know this even when the application is in the background, so that the top window may not be active.

Surely there’s a function for this somewhere? If not, it’s a pretty glaring hole. Do I really have to write code to watch each and every operation that can move a frame to the front, and track the front window manually?

Why I Never Go to Concerts

Wednesday, July 12th, 2006

God damn it. Roger Waters is coming to Madison Square Garden, will play Dark Side of the Moon, I actually noticed far enough in advance to get tickets, and I’m going to be out of town at SD Best Practices those two nights. :-(

Usually I don’t even notice a band I’d like to see is touring until they’ve come and gone, or at least until tickets are sold out. I think the last rock concert I saw was X in San Jose in 2001. Before that maybe Joan Jett at Central Park Summer Stage or Meatloaf at Radio City Music Hall a few years earlier. That concert was weird: a lot of thirty and forty-somethings with their preteens in tow. One of the backup singers was Meatloaf’s ~20 year old daughter. Could it really be 40 years ago that Roger Daltrey first sang “I hope I die before I get old”? Even 90’s icon Liz Phair is now singing about dating men too young to know who she is.

Surely somewhere there’s a service that will let me enter a list of my favorite bands and e-mail me when tickets are about to go on sale? Ideally one that doesn’t spam me with a lot of needless HTML e-mail, advertising, and other junk. Any suggestions?

Disposable Phone Numbers

Friday, July 7th, 2006

For years I offered my fax number when asked to give a phone number to a credit card company, bank, merchant, politician, or other organization that I knew was going to turn around and sell it telemarketers. After I disconnected my fax line a couple of years ago, I switched my standard fake to my office number since it has no answering machine and I’m only there about one hour a week. (If I actually want to talk to someone, I’ll give them my home number.)

However, now NetZero has launched Private Phone which provides an unlimited supply of disposable phone numbers for free. This is like Mailinator for phones (though unlike Mailinator you do have to sign up before using a number, and you’ll have to clear your cookies if you want to change numbers).
(more…)

Copying files from one JAR to another using ANT

Friday, July 7th, 2006

To avoid needless duplication of source files in two different repositories, I would like to write an Ant build.xml file that copies files from one .jar file to another. I don’t want to copy everything in the source jar, just certain selected files.
(more…)

Shopping for a Prepaid Mobile Plan

Wednesday, July 5th, 2006

I’m a very light cell phone user, except occasionally when I travel. Currently I’m on the very bottom-of-the-barrel T-Mobile monthly plan that they don’t even offer any more. Only 60 minutes a month + weekends, and I very rarely even use that. Looking around it seemed I could save quite a bit of money by going to a prepaid plan. That wouldn’t cost me more than about $100 a year, roughly 20% of what I’m paying now. I was just going to switch my T-Mobile phone over, but apparently the roaming on their prepaid plans isn’t so good.

What are people recommending for prepaid phones these days? I need:
(more…)

Apple Mail Shows Home Directory

Wednesday, July 5th, 2006

Here’s something I just figured out a year+ too late. If you’re using Apple Mail (at least in version 2.0, but probably others as well) to access an IMAP server for a Unix account with shell access, it will treat your home directory (i.e. ~) as the mail folder. This is almost always wrong. It may work for mail only accounts, but regular shell accounts usually place the mail somewhere else; for instance in ~/mail.

To tell Apple Mail where the mail folder is, place the relative path to the mail folder (starting fromn your home directory) in the Advanced tab of the Accounts pane of the Preferences dialog:
(more…)