Wednesday, August 30, 2006

And now for a pointless, silly semi-rant that nobody should take too seriously:

Pardon me while I put my sarcasm hat on.

I love working with Swing.

Okay, I can take my hat off now.

Went to add some of the last functionality to the toy program today (the rest of the work needed is basically UI tweaks), and ran into a problem.

The frame was showing two copies of what I wanted to display.

Okay, let’s make sure that I told it to remove everything from the panel in question. Indeed I am. Let’s invalidate it and revalidate it. Still having the problem.

That’s weird. Time to reach for the nutshell book.

No, I’m not missing anything that could possibly help remedy the problem as things are set up now. After thinking about it for a few minutes, I decided to try something stupid.

I added the pane that I wanted to erase the contents of as the only component of another pane and then just told the program to erase that pane instead.

It worked. It’s stupid but it worked. I am rapidly learning that so much of dealing with Swing is nesting things in one container after another. It’s kind of silly, frustrating, and amusing all at the same time.

Oh well. It’s not like it’s a big deal, and it works now.

Current mood: amused
Current music: Garbage – Fix me Now

No comments: