Java awt event. ActionEvent



Yüklə 2,97 Kb.
tarix14.05.2023
ölçüsü2,97 Kb.
#113596
calculator


import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.SwingConstants;

public class Calculator implements ActionListener {

boolean opr = false;
String
old;
int x = 0, i = 0;
float[] a = new float[2];
JFrame
jf;
JLabel
displayLabel;
JButton
zeroB, oneB, twoB, threeB, fourB, fiveB, sixB, sevenB, eightB, nineB, dotB, divB, mulB, minB, plusB, equalB,
clearB, sqrtB , percentB , sinB , cosB;

public Calculator() {
jf = new JFrame("Ahrorbek");
jf.getContentPane().setBackground(Color.BLACK);

jf.setLayout(null);
jf.setSize(650, 600);
jf.setLocation(500, 150);

displayLabel = new JLabel();
displayLabel.setBackground(Color.gray);
displayLabel.setOpaque(true);
displayLabel.setBounds(30, 50, 540, 50);
Yüklə 2,97 Kb.

Dostları ilə paylaş:




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin