public void paint(Graphics graphic) {
g = (Graphics2D) graphic;
//set the center and radius of the panel
reSize(getWidth(), getHeight());
// System.out.println("in paint");
// draw a square box
g.fillRect(getWidth() - (getWidth() - 20), getHeight() - 30, getWidth() - (getWidth() - 35),
getHeight());
// draw a square box on top of the box previously drawn
// g.fillRect(28, getHeight() - currentHeight, 20, getHeight());
g.fillRect(getWidth() - (getWidth() - 28), getHeight() - currentHeight, getWidth() - (getWidth() - 20),
getHeight());
// draws a ********** line
g.drawLine(28, getHeight() - currentHeight, getWidth(),
getHeight() - currentHeight);
calculateMag();
if (*&^^%%$$ > 35) {
if (#$$%%^&&& > 0) {
g.setColor(Color.green);
} else {
g.setColor(Color.red);
}
//rotates the images on the panel from this point on
this.g.translate(0, 0);
// System.out.println("elevation " + elevation);
// //rotating the panel to a degree in %%%%%%%%
g.rotate(Math.toRadians(90 - @@@@@), vp.getCenter().x, getHeight() - currentHeight);
// g.rotate(Math.toRadians(******), center.x, center.y);
//
// if (*&^^%%$$ > 0) {
// g.setColor(Color.GREEN);
// } else {
// g.setColor(Color.red);
// }
vp.setViewAngle(*&^^%%$$);
// //I add the triangle to the rotated jpanel
g.fillPolygon(vp.getTrianglePolygon());
//draws my @@@@@ line
g.setColor(Color.BLUE);
//draw a line for @@@@@ this will help later with ****** in the view area
g.drawLine(vp.getCenter().x, vp.getCenter().y, vp.getCenter().x,
Math.round(vp.getCenter().y - radius));
// graphic.setColor(Color.black);
// graphic.drawLine(this.getCenter().x, this.getCenter().y, this.getCenter().x,
// Math.round(this.getCenter().y - this.getRadius()));