Tuesday, November 23, 2010

TSA will grab a handful if you let them

With this latest government fleece, the Transportation Safety Administration(TSA) has enhanced its body search procedures. They now have body scanning machines that take a nude picture of every person who goes through an airport security checkpoint. If a traveler doesn't want to have random TSA employees looking at their naked bodies, there's another option...the enhanced body search. TSA employees will feel breasts, butts and crotches. It brings new meaning to "Oh what a feeling!"

Why don't we hear any serious talk about boycotting the airlines? That's an option too. The airlines are allowing this to happen as well as the flying public. Too often the conversation in the media is about what rights the government is taking away and how people are going to cope with being fleeced. Very rarely is there any conversation about American citizens taking action.

I have been listening to the talking heads on this topic, but it only goes as far as how the government is going to use its power against us and how we're going to deal with it. We have the power to coerce the TSA to scale back its enhanced security screening by not flying. The airlines have to respond to their market. The government will push as far as its citizens allow.

Sunday, November 21, 2010

Java NumericTextField Issues

Problem: JButton requires two clicks to execute.
Apparent Cause: Adding a DocumentListener to a JFormattedTextField

Background:
I created form inside of a JDialog. The form contained a JFormattedTextField, OK and Cancel buttons and a JComboBox. The JFormattedTextField filters text, not format it. Everything worked as expected until I added a DocumentListener to the JFormattedTextField. When that happened, I noticed that it takes two clicks on the OK button for it to execute its actionPerformed() method. Visually the JButton appeared to be clicked by displaying the "mouse over", "mouse pressed" and "mouse released" events, but nothing happened as a result of clicking the button.

I replaced the JFormattedTextField with a JTextField. To ensure that the JTextField only allows numeric text, I attached a DocumentListener to it. Since my text field needed to filter user input and not format it, this is what I should have used anyway.

Sunday, October 3, 2010

Good Riddance JavaFX...not so fast

JavaOne 2010 has just ended and my love/hate relationship with JavaFX(JFX) is about to get a lot more intense. For the last year, I have been trying to force myself to learn JavaFX Script(JFXS) but it hasn't been easy. The language is a complete paradigm shift from Java. I have 14 years of experience with Java and have loved it from the first time I saw an applet bring life to static web pages. JFXS uses a completely new syntax, changes the meaning of terminology that Java developers have grown to accept and added totally new concepts to learn. Don't get me wrong, learning new concepts is part of who I am, but this was so different, I had to think differently about how to construct an application. It was weird. As it turns out, I was not alone.


Oracle must have heard my expletive filled rants about them creating a new language to do what Swing should have been empowered to do years ago. During JavaOne Oracle announced that they were going to scrap any further development of JavaFX Script and add the strengths of JFXS to Java.


Until that announcement, I was unaware that JFX and JFXS were two different things. I guess because JFXS was the only to program JFX, there was no need to differentiate between the two. Now that JFX is going to become a set of Java libraries, it will be available from Java and many of the other JVM languages. That was music to my ears. I love the power of JFX, but hate having to learn a new language to have access to that power.


So what does this mean for the future of Java GUI development?
  • Don't expect any access to JFX from Java until JDK 7, which is scheduled for release some time in the first half of 2011.
  • I am scrapping my two JFX books and will continue to focus on Swing.
  • Since I love applets, I will follow my passion and release some real world applets. When the new JFX libraries are released, I will incorporate them into my Swing projects.
  • It is my sincere hope that Java applets will gain a stronger foothold in the web browser wars. I think applets are superior and will support Java all the way.
  • Hopefully Oracle will make Java GUI development more popular by using it themselves on their own web site and throughout their products.
The GUI is screaming for a new leader and JFX can capture this position. The real war will start next year with the release of JDK 7. I'm building my suit of Java/JFX armor right now.

Join me.

Sunday, March 28, 2010

Air Dried Sack

One day I was at the local fitness center, finishing an intense leg workout. I was kinda tired and before leaving I needed to grab my bag from the locker room. So far everything was normal. My mind was set on drinking some Powerade that I had in my bag like an athlete in a TV commercial. In the locker room I heard the typical sports talk coming from a television over in the corner. I also noticed the sound of the typical hair dryer. Once again, nothing unusual. Then, out of the corner of my eye, something seemed out of the ordinary. The guy using the hair dryer was not drying his hair in the normal way. I would not have noticed this but he was doing something rather peculiar. His head was between his legs, like he was looking for his balls. I guess men look for their balls every so often, especially married men. But this guy was fiddling with his balls with one hand and had the hair dryer in the other. It took a second for my mind to register that he was blow drying his balls. It's not that I was paying attention to such a thing, but it was so weird that I couldn't help but notice.

That was over a month ago and I still have that strange sight burned into my memory.