• Create a class by inheriting the class JFrame and name it as SierpinskiTriangle.
• Create and add a label and a text field to read the minimum size of the triangle.
• Register the text field to perform the action.
• Define an inner class SierpinskiTrianglePanel which inherits the features of the class JPanel.
• Implement paintComponent method in the class SierpinskiTrianglePanel to draw a triangle when program starts execution.
• Implement a recursive method displayTriangles to draw the inner triangles recursively to produce the Sierpinski fractal.
• Create an object for the class SierpinskiTriangle to create and invoke a window to produce the Sierpinski fractal.