Software Developer / Photography Enthusiast 

Facebook Flickr LinkedIn RSS

Centering a JFrame

I prefer to have my desktop applications start up in the center of the screen rather than at the (0, 0) position. There are two ways to do this.

Continue Reading

 

Detect link clicks in JEditorPane

If you’re using a JEditorPane to display HTML, you need a way to handle hyperlinks so that when the user clicks on one, it opens the URL in their default browser. Creating a HyperlinkListener will solve the problem.

Continue Reading

 

Gradient JPanel Backgrounds

Using gradient backgrounds in your application creates a clean and polished look. Doing so can really help improve the interface without too much effort.

Continue Reading

 

Java File Extensions

In dealing with files, you’ll realize that there isn’t a method to get the extension which you sometimes need to appropriately handle certain file types.

Continue Reading

 
Home 2009 June