All pastes #575682 Raw Edit

Untitled

public text v1 · immutable
·published 2007-06-19 04:37 UTC
rendered paste body
	public void paint(Graphics g) {
		g.setColor(Color.GREEN);
		g.drawString((new StringBuilder("Status : ")).append(status).toString(), 10, 55);
		g.setColor(Color.GREEN);
		g.drawString("Total Trips to the Bank: " + statTrips, 10, 70);
		g.setColor(Color.GREEN);
		g.drawString("Total Time Running: " + statStartTimer.timePassed(), 10, 85);
                g.drawString("Add text here " + constant1, 10, 100);
	}



Above is the complete code that should be generated, ill brake it into lines.

public void paint(Graphics g) {                This line will go with all of the reports generated    

g.setColor(Color.GREEN);                       This is the color that they chose, and goes above each line after public void    

g.drawString((new StringBuilder("Status : ")).append(status).toString(), 10, 55);    This is added if Status = Yes

g.drawString("Total Trips to the Bank: " + statTrips, 10, 70);                       This is added if Bank Trips = Yes

g.drawString("Total Time Running: " + statStartTimer.timePassed(), 10, 85);          This is added if Timer = Yes



g.drawString("Add text here " + constant1, 10, 100);          

For above line: Every time they add a custom constant, a line like this needs to   be added. The "Add text here " Stays the same, but the constant1 changes to the name they have given. Also, 15 is added to "100" every time a new one is added. So if they have 3 custom constants. It should be 100, 115, 130.