It's quite easy: you should inherit your class from Component and then reimplement paint method from Component.
Something like this:
class MyComponent : public Component
// do some stuff
// To specify how your class should draw itself, reimplement this method
void paint (Graphics& g)
// Here you have access to Graphics object, which allows you to draw anything you want.
// set colour for brush and fill background
// Set colour for brush and colour specific pixel
g.setPixel (0, 3); // fill pixel (0, 3)
g.setPixel (5, 8); // fill pixel (5, 8)
// But anyway you also have a capability to draw any rectangle, ellipse, etc.
// draws the rectangle with topleft corner at (10, 20), 50px width, 30px height.
g.fillRect (10, 20, 50, 30);
So you have a huge capabilities. To learn it more, you should open http://learn.juce.com/doc/classGraphics.php or take a look at some JUCE examples (e.g. JUCE/examples/Demo )