This method of the DirectDrawSurface Class retrieves the DirectDrawPalette structure associated with this surface.
public DirectDrawPalette getPalette();
Returns the DirectDrawPalette object if successful; null otherwise. This is null if no DirectDrawPalette object is associated with this surface. If the surface is the primary surface, or a back buffer to the primary surface, and the primary surface is in 8-bpp mode, this method returns the system palette.