java

Mac Java - A default Mac menubar without a JFrame

Yesterday I ran into a pretty obscure situation in my Imagen application where I needed to show a modified Mac menubar, even though I didn't have a Java JFrame displayed at the time. The way Imagen works is that I show a JFrame, then hide it, and the application then waits for the user to do something with the application icon in the Mac Dock, typically dropping an image onto that icon.

Java programming best practices - Create interfaces for your Dao classes

One Java programming "best practice" that has been strongly reinforced for me during the last several weeks is making sure you have a declared interface that defines the behavior (signature) of your Dao (data access objects) classes.

How to report Mac Java bugs

Mac Java FAQ: How do I report Mac Java bugs?

I just saw this information on the Mac Java mailing list, how to report Mac Java bugs:

Java EDT - How to see if your code is running on the Java Event Dispatch Thread

Java EDT FAQ: How can I tell if my Java Swing code is running on the Event Dispatch Thread (EDT)?

Where are Java WebStart files kept on Mac OS X 10.6?

Mac Java WebStart FAQ: Where are Java WebStart files (Jar files) kept on Mac OS X systems? And how can I delete WebStart apps on a Mac?

Java WebStart Jar files are kept below this directory on Mac OS X 10.6:

/Users/al/Library/Caches/Java/cache

More than likely you're asking because you want to delete these Java WebStart files on your Mac. The easiest way to delete them is:

A Java version of Xeyes

In my spare time over the last two days I've created a Java version of the old Unix Xeyes application. If you ever used Xeyes, you know it as a pair of eyes that are displayed on-screen, and follow the mouse cursor as you move it around.

Here's a little one-minute video that demonstrates how my Java Xeyes application works:

A Java Model View Controller example (Part 1)

After writing several recent Model View Controller (MVC) pattern articles (A Model View Controller diagram, Model View Controller definitions), I thought it might help to share a real-world implementation of an MVC design. To that end, I'd like to share some information from a Java/Swing GUI application I wrote several years ago to help me in my work with Function Point Analysis (FPA).

Transparent JFrame - How to make a JFrame transparent on Mac OS X

Summary: How to make a Java JFrame transparent (translucent) on Mac OS X.

A lot of people complain about a lot of things in regards to Java on Apple's Mac OS X platform, and okay, occasionally I'm one of them, but a very cool thing you can do on OS X is to create translucent (transparent) frames and windows with Java.

How to create directories in Java

Java directory FAQ: How do I create a directory (or directories) in Java? (Also written as, "How do I make a directory in Java?)

To create a directory in Java, just use the "mkdir" or "mkdirs" methods of the Java File class. Here are a few examples to demonstrate this.

Regular expression examples (common regex patterns)

Regular expression FAQ: Do you have a list of common regular expression examples, i.e., the most common regex patterns used in programming languages like Java, Perl, PHP, Ruby, and others?

I've been asked several times, so I thought it might be helpful to post some of the most common regular expression examples that are used in programming. Honestly I haven't tested any of these yet -- I did them off the top of my head -- but I think they will work for most open source programming languages.

Syndicate content