Check out example codes for "Java.awt graphics tutorial". It will help you in understanding the concepts better.

Code Example 1

//For Drawing Text
g.drawString("Hello", 10, 10);
// For Drawing Images
g.drawImage(img, 
            0, 0, width, height,
            0, 0, imageWidth, imageHeight,
            null);                    

// For Drawing Shapes
g2.draw(new Line2D.Double(0, 0, 30, 40));

Learn ReactJs, React Native from akashmittal.com