class PBar extends Canvas{ int timer; public void setTimer(int t){ timer = t; } public void paint(Graphics g){ g.setColor(Color.white); g.fillRect(0,0,400,20); g.setColor(Color.blue); g.fillRect(0,0,timer,20); } }
3: www:07/11/28 11:45
import java.awt.*; import java.awt.event.*;
public class JavaCalc extends Frame implements ActionListener{ ExTextField disp; Panel cons,dispbase; Button n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,o0,o1,o2,o3,o4,dot,c,ac,off;
double stack,temp; int left; double right; boolean decimal; int oper;
public static void main(String args[]){ JavaCalc calc = new JavaCalc(); calc.init(); calc.setTitle("Java Calc"); calc.pack(); calc.show(); }
public void init(){ left = 10; right = 1; decimal = false; stack = 0; oper = 0; disp = new ExTextField(); disp.setColumns(30); disp.rsetText("0"); cons = new Panel(); dispbase = new Panel();
n0 = new Button("0"); n1 = new Button("1"); n2 = new Button("2"); n3 = new Button("3"); n4 = new Button("4"); n5 = new Button("5"); n6 = new Button("6"); n7 = new Button("7"); n8 = new Button("8"); n9 = new Button("9"); o0 = new Button("="); o1 = new Button("+"); o2 = new Button("-"); o3 = new Button("*"); o4 = new Button("/"); dot = new Button("."); c = new Button("C"); ac = new Button("AC"); off = new Button("OFF");
It is pivotal to inform your physician about any allergies you may have and also your medical history, before getting your Lipitor prescription. The drug Lipitor also has a bioequivalent generic which is identical to the brand in strength as well as safety and is sold at a slightly lower cost.