Articles & Jars | About This Project | Legal |
AlphaComposites: Which Does What? (October 2009)
This is a very short article with a little hands-on demo of how the different This doesn't necessarily teach anything or present new ideas; it's just a quick applet to consult if you need it. |
Angles: need GUI widget for angles? (May 2008)
Take a Comes in Aqua and non-Aqua flavors. |
Buttons: New UIs (August 2009)
Sure the buttons in Apple's Tech Note 2196 are great, but they're so... black-box-ish. And they're only available on Macs. This article sets up a new framework for |
Colors: a Color Dialog (April 2007)
This is a Photoshop-style color choosing dialog. You can pull some parts of it apart for customization, but out-of-the-box it offers a great interface if you're dealing with a power user. Of course: all dialogs are at least slightly evil, and they should be used with care... |
Colors: a ColorPalette (January 2010)
This is an isolated GUI component from this article. This app shows the progression of several different concepts for ColorPalettes. (Hopefully each one is an improvement over the previous?) |
Colors: a Good GUI for Selecting Colors (January 2010)
This jar includes all my color-related GUI components:
the I'm not going to argue that this will meet your needs and save the world; but it includes a lot of useful tools and it might help (save the world). |
Crossfades: What Is and Isn't Possible (June 2008)
As far as I can tell: there's not a good (efficient) way to crossfade two translucent images in Java2D. (Crossfading opaque images? That's easy. But not translucent ones.) This article focuses on discussion and not a downloadable end result. |
|
In lots of Apple's software there's a handy menu option called "Customize Toolbar" that lets users drag and drop components in a toolbar. It's functional and great eye candy. This article presents a similar mechanism for Java. A single thumbnail doesn't do justice to this feature, but if you go to the article you'll see a screencast. |
DecoratedPanel: a Sleeker Looking JPanel (May 2008)
This is a little toy I made a while ago that really adds a lot of pizazz to a You might argue it adds too much pizazz, and so it should be used sparingly. :) But on occasion
it has definitely come in handy. The thumbnail doesn't do it justice, though... |
Event Dispatch Thread: Responding to Deadlocks (June 2008)
What can you do when your event dispatch thread is blocked? For starters: this article mentions how to automatically detect this situation and get great console output to help pinpoint the problem.
Also this delves into a very murky partial solution. (It has worked multiple times for me, but it uses unsafe deprecated black magic.) |
Gradients: Using TexturePaint for Gradients (November 2009)
This class uses a This was mostly an experiment I put together for this article. As of this writing I'd only recommend using this if you can't use the MultipleGradientPaint in Java 1.6 or its earlier incarnations in the batik project. This is functional, though. And if you're stuck in an earlier Java version: it's a very small class to add if you need it. |
Gradients: a GUI Widget to Design Them (May 2008)
This is a concise GUI component to arrange the distribution of colors for complex gradients. (By default it also leans heavily on some existing color GUI widgets I wrote, but you can replace those with your own components if you want to.) |
Gradients: a Halftone Gradient (November 2009)
This is a handy little gradient that resembles halftone print. I came across this idea by accident while working on the |
Graphics2D: Improving Performance (February 2009)
It turns out some This is becoming less of a problem now that Quartz is being phased out, but even without Quartz we can still make some improvements... |
Graphics2D: Serializable Vector Graphics (December 2008)
This has been a real life-saver when I'm trying to debug our graphics-rich desktop apps at work. I prewire it so pressing F4 serializes the foremost window, and then whenever something isn't rendering right I can see where each graphic instruction is being called from. |
Images: Accessing NSImages in Mac 10.5 (June 2008)
This is a refresher on how to get at Also: if you're like me you have no idea what images are out there to be accessed. :) This article also provides a table of the images we have at our disposal, as well as a few comments about some of them. |
Images: BMPs and Thumbnails (June 2010)
This provides an efficient mechanism for creating BMP thumbnails,
and a crude BMP decoder/encoder. |
Images: Managed Images (April 2007)
There used to be a way to completely ruin your graphics performance. This problem can still occur on Mac if you're use the Quartz rendering engine, but
more and more that is being phased out so this is less of a problem than it used to be. |
Images: Reading JPEG Thumbnails (March 2010)
This demonstrates a class that extracts thumbnail information out of a JPEG.
|
Images: Scaling Down (June 2010)
This improves the image quality and memory allocation when scaling large |
Images: Scaling JPEGs and PNGs (May 2011)
Need to scale megapixel JPEGs on-the-fly without loading them entirely into memory? This might just do the trick. |
Images: Studying MediaTracker (April 2007)
I never did trust MediaTracker. Why does it require a Here I wrote my own class that converts abstract |
[ Article ]
We needed to display modal dialogs in full-screen mode. On Mac this proved to be in impossible using normal JDialogs, so we had to come up with an alternative solution. |
JOptionPane: Making an Alternative (June 2008)
I find the Really: check out the javadocs for this one. There's a lot of research/explanation in there. |
Jars: Building Concise Jars (January 2009)
If I used an ant script or Eclipse's built-in jar-exporting widget: I'd need to specify up front the classes I want to put into a jar. This class uses the |
Layouts: Designing an Inspector (June 2009)
This article examines the notion of a well-designed inspector. It uses this interface to layout the components, and it presents a few implementations
of that interface (with varying degrees of success/hackery). |
Math: Solving Equations with Gaussian Elimination (December 2009)
I've used the But recently I needed something more. I ended up making this class to add a light GUI to interface with the This is a very minimal, no-frills app. But it can solve equations for you that might otherwise make your head hurt. :) |
Math: Studying Performance (May 2009)
The But if you're dealing with graphics: you can probably fudge on some accuracy in exchange for speed. What methods can be improved? |
Mouse Click Events: Adding Wiggle Room (February 2011)
This triggers mouseClicked events even if the mouse moves a few pixels between
click and release. |
Movies: Writing MOV Files Without QuickTime (June 2008)
This article presents a class that can write a .mov file as a series of images and PCM audio. This movie uses a combination of JPG/PNG and WAV encoding, which is very poor compression. But this format is not subject to nasty patent/royalty issues. |
PixelGrabber: Studying Performance (April 2007)
Can we improve on the If you're only working with a |
Preferences: Aqua-Like Preferences (November 2008)
This emulates two types of preferences on Mac: several rows of preferences (like the System Preferences) or one row of preferences (like Mail, Safari, etc.). |
Print Dialogs: Laying Out Tiles (November 2008)
This introduces an object to lay out several graphic objects on a sheet of paper, and a dialog to preview and edit this layout. (Oh: and it prints.) |
Progress: a Spinny Widget (May 2009)
This introduces a new UI for
They're vector-based, so while they're originally designed to be less than 20x20 pixels: they scale well if you need them to. |
QTJ: From QDGraphics to BufferedImage (April 2007)
This iterates over each frame an a QuickTime movie. Each frame is returned as a Note that this uses QuickTime for Java, which is now officially deprecated. |
QTJ: Video Capture in Swing Components (April 2007)
This demonstrates how to interface with QuickTime for Java and grab pixel data from a QuickTime for Java is now deprecated, though, so I don't recommend starting any new projects with this information... |
Runtime Properties: kind of important (May 2008)
This lets your browse your ... and your |
Screen Capture: Recording Java Apps (June 2008)
The Robot class can capture parts of your screen as an image,
but it can be slow to process so many pixels. This article ties into the Also this jar can export this animation as a MOV file (using JPEG moving encoding). All 100% Java. |
Shapes: Bezier Control Points and Data Models (March 2010)
This article explores a GUI that manipulates a shape with bezier shape segments. |
Shapes: Calculating Bounds (May 2007)
How do you get the bounds of a shape? A This article explains (and presents) code to calculate shape bounds yourself. |
Shapes: Clipping to a Rectangle (April 2007)
What's the most common shape we need to clip to? A But if we use (This does not use Sutherland-Hodgman clipping algorithm or the Weiler-Atherton clipping algorithm.) |
Shapes: Creating an Alternative to the Area Class (August 2010)
This project branches off the |
Shapes: Flattening Cubic Curves (June 2007)
This breaks a path with cubic curves into several small quadratic curves. You lose a little precision: but if (for whatever reason) you want quadratic curves: here you go! |
|
If the user drags the mouse over a |
Shapes: Measuring Length (February 2009)
An uninteresting but very useful class that deals with measuring shapes. |
Shapes: Parametric Equations (and Spirals!) (March 2010)
This is a two-fold article:
|
Shapes: an Introduction (March 2010) [ Article ]
This covers some nitty gritty details about There is nothing to download here. Just read the article if you're interested. |
Slideshows: Transitions & SWFs (November 2008)
A fun set of transitions defined with a simple vector-graphics-ish architecture. The demo includes a player and minimal Flash export. |
Strokes: a Bristle Stroke (May 2008)
A stroke based on splattering lots of tiny shapes along a path. |
Strokes: a Brush Stroke (April 2007)
A stroke based on rendering several smaller strokes in parallel along a path. |
Strokes: a Calligraphy Stroke (May 2009)
A stroke that resembles a nib at a fixed angle. |
Strokes: a Charcoal Stroke (December 2008)
A stroke with grooves in the edges that resembles charcoal on pavement. This stroke is actually a filter than can modify any shape, but the only
current suitable examples are |
Text: Effects and Block Shadows (February 2011)
Create some fun text effects using block shadows. |
Text: Prompts and Search Fields (December 2009)
This article has 2 goals:
|
Text: Searching JTextComponents (December 2009)
This discusses different GUIs for the user to search for a string in a This includes the common search dialog, the model Safari uses and the model Firefox uses. |
Text: Swivel Animations (Mar 2012)
This animation idly skims over a series of text boxes by panning and zooming at interesting angles. |
Text: Text Height and GUI Layout (June 2008)
This walks through how to find the preferred height of a block of text, and provides a GUI component to display text with a fixed width. |
TexturePaints and AffineTransforms (June 2008)
This discusses/demos a class that combines these two elements. |
Transitions: Apply Transitions to a JTabbedPane (January 2009)
This applies some basic |
Windows: Adding a Window Menu (November 2008)
This article discusses and emulates the "Window" menu found on Macs. |
Windows: Dragging Made Easy (April 2007)
Sometimes you want to be able to click and drag a window, palette, dialog etc. |