Available in the LEADTOOLS Imaging toolkit.
Median example for Visual J++
This example applies a median filter with a 3x3 neighborhood and redisplays the bitmap.
LEAD1.Median( (short) 3 ); LEAD1.ForceRepaint();