Here are a few notes from "my other life". Amazing what happens when I've actually gotten a little sleep. It's been this way since forever.
Alvin Alexander | Java, Scala, Unix, Perl, Mac OS X
Here's the material from a seminar I've done several times on "Working Backwards with JUnit". The idea for this seminar came about from an article of the same name by several authors in the Extreme Programming blue book. I can't remember their names right now, but all of the credit goes to them for the idea, and I need to acknowledge them properly.
Java JTextField question: How do I right-align the text in a JTextField?
Long answer: I need to look at this some more to understand the difference between the alignment constants in SwingConstant and the alignment constants in JTextField.
Holy Microsoft Passport security flaws! Where do you want to trust your money today?
Ouch ... here's a quick little ditty on how to properly size a JDialog to fit the size of a wide/large JTable that it contains.
(From a recent email.) Help, I have a 13-column JTable, inside of a jscroll pane, inside of a borderlayout, inside a JDialog. Ideally, I would like the dialog to initially open up to the correct width needed to display the 13 columns without horizontal scrolling.
Setting the preferred width of each column (only) does not work very well. Setting the minWidth gets the columns to open up to the correct width, but then the last 7 or so columns fall off the right hand side of the dialog.
Java FAQ: Can you share some source code for a “Java wget” program, i.e., a Java program that works like the Unix wget or curl commands?
Here's the source for a program I've named JGet, which acts similar to the wget or curl programs. I didn't have wget installed when I needed it (and my client wouldn't let me install it), so I wrote this Java wget replacement program.
I have used GRASP in one context in this blog, but the GRASP I'm interested in today refers to Craig Larman's General Responsibility and Assignment Patterns. I saw those first referenced in Larman's book titled "Applying UML and Patterns". Larman's home page is one big page, but what the heck, he's a good author.
Don't know much about the following site, but it does contain an online version of a book titled Practical PostgreSQL.
Here's a little Java best practics info from someone named Ahmet Haliloglu. It's mostly on servlets and JDBC.
Probably the most interesting document I've found on user interface design is the PDF from this site, discussing Do's and don'ts of user interface design. The funny part is that the site itself is named "Civil Engineering with Computing: OOP with C++, UML, and the STL" ... but this page does not contain any type of HTML title. Goes to show that we're all human. :)
Note to me: Using
sendmail from the command line can be better than using the
/usr/lib/sendmail -t -f firstname.lastname@example.org -F "Al Alexander" < my_message.txt
This works very well if I put things like To:, Cc:, Reply-to:, etc, in the file named my_message.txt.
One of my co-workers pointed me to this site by Jeanette Winzenburg that discusses some issues regarding the Swing framework in the land of Java, including problems with the JTable.
Ah, the Java Look and Feel Design Guidelines ... so this is what my apps are supposed to look like. :) Most useful.
A little ditty on how to find the caret position in a JTextComponent, and display a JPopupMenu near that position. This is one of those things that may not be 100% correct, but it works until someone finds a better way.
Java caret position FAQ: How do I get the Java caret position in a JTextComponent, such as a JTextArea or JEditorPane?
Wow, this was a bear to find anything about. Everyone always wants to show you how to use a JPopupMenu with a mouse click, such as a right-mouse click, but nobody ever shows you how to display a JPopupMenu when someone uses a keystroke, or keyboard accelerator.
So, using a little Java mojo, here is how I get the caret position in a JTextComponent (JTextArea, etc.) to display a JPopupMenu near the current caret position:
I'm about to take a look at a tool (an Excel spreadsheet) named "XP Tracker" that may help track progress on a current XP project. I'll try to put updates here on this tool as I work with it. At work we use the Twiki a lot and Bugzilla, so this tool may not be perfect, but I'm on a quest for something like this.
(Personal stuff) Kim is having some teeth pulled out today, Kenny has been in the hospital since last Wed or Thu and the doctors think he has pancreatitis (sp) or worse, and we had a big ice/sleet storm over the weekend. Yikes! On a bright note, I ran/walked/biked for 80:29+ last night, followed by a couple of sets of "god-dammits", my least favorite exercise.