ColorRes example for Visual J++

This example checks to see if the bitmap is 8 bits per pixel and converts it if it is not.

if( LEAD1.getBitmapBits() != 8 )
{
   setCursor( Cursor.WAIT );  // hourglass
   LEAD1.ColorRes( (short) 8, (short) LTOCXU.ColorResPaletteConstants.CRP_OPTIMIZEDPALETTE, (short) LTOCXU.ColorResDitherConstants.CRD_FLOYDSTEINDITHERING, (short) 0 );
   LEAD1.ForceRepaint();
   setCursor( Cursor.ARROW );  // default
}