Available in the LEADTOOLS Imaging toolkit.
HistoEqualize example for Visual J++
This example equalizes the bitmap's histogram and repaints the image.
LEAD1.HistoEqualize(); LEAD1.ForceRepaint();