자바를 이용한 계산기프로그램(swing)
- 최초 등록일
- 2011.11.05
- 최종 저작일
- 2011.09
- 5페이지/ 한컴오피스
- 가격 1,000원
소개글
swing을 이용한 계산기 프로그램입니다.
목차
없음
본문내용
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.border.TitledBorder;
public class Calculator extends JFrame implements ActionListener {
private JButton b0, b1, b2, b3, b4, b5, b6, b7, b8, b9;
private JButton bpm, bdot, bp, bm, bmulti, bd, bsqrt, bpercent, bx, bequal;
private JButton bback, bc;
private JTextField jtf;
private String operand, operator;
public Calculator() {
b0 = new JButton("0");
b1 = new JButton("1");
b2 = new JButton("2");
b3 = new JButton("3");
b4 = new JButton("4");
b5 = new JButton("5");
참고 자료
없음