If you have a bounty of creative energy and way too much time on your hands,
why not explore the new Java 1.4 APIs by creating a video game. That's
exactly what I did when I produced a parody of Street Fighter II called Meat
Fighter (see Figure 1).
"Meat Fighter" is a side-scrolling one-to-one fighting game featuring
anthropomorphic hot dogs and sausages. You can choose from six possible
players and battle through seven stages of intensive meat fighting. So be
prepared to meet the wiener warriors: Sal Lammee, Rat Dog, Oscar M. Wiener,
Hot Doug, Cornelius Dog, and Oliver.
In this article, I present a simple framework to enable you to quickly take
advantage of full-screen animation, music, and sound effects without learning
all the intricate details of the new APIs. (The ... (more)
Even for many seasoned developers, Swing code can be notoriously difficult to
organize. Where is the right place to put parsing and validation logic? How
do you prevent those threading issues that cause lockups or repainting
glitches? Is it possible to unit test GUI logic? Can the code somehow be
shared with other user-interfaces, like a web front-end? If these questions
sound familiar, ... (more)
The function pointer, a powerful concept in the C and C++ programming
languages, has no direct equivalent in Java. No syntax exists to pass the
address of a method to a JButton, for instance, that links it with pressing
the button. Instead, Java promotes the use of anonymous inner classes, like
this one:
okButton.addActionListener(new ActionListener() { public void
actionPerformed(Actio... (more)
The function pointer, a powerful concept in the C and C++ programming
languages, has no direct equivalent in Java. No syntax exists to pass the
address of a method to a JButton, for instance, that links it with pressing
the button. Instead, Java promotes the use of anonymous inner classes, like
this one:
okButton.addActionListener(new ActionListener() {
public void actionPerformed(Action... (more)