The following text was written to the standard output stream when the RedCross.java program was executed from IntelliJ.
/*
*Program to paint a RedCross in the context of the Nonrepresentational Painting World, NPW.
*/
package npw;
import painter.SPainter;
import shapes.SRectangle;
import javax.swing.*;
import java.awt.*;
public class RedCross {
private void paintTheImage() {
SPainter red = new SPainter("Red Cross", 600, 600);
SRectangle cross = new SRectangle(500 , 100);
red.setColor(Color.RED);
red.paint(cross);
// create second rectangle to form cross.
red.setColor(Color.RED);
cross.resetHeight(100);
cross.resetWidth(500);
red.paint(cross);
}
//REQUIRED INFRASTRUCTURE
public RedCross() {
paintTheImage();
}
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new RedCross();
}
});
}
}