Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

mainly what i have is teh buttons only but the functions i can work with so how

ID: 3857502 • Letter: M

Question

mainly what i have is teh buttons only but the functions i can work with

so how can i add the radio buttons to my calculator?

here is code for my calculator:

import java.awt.*;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import javax.swing.*;

public class CalculatorBuild extends JFrame implements ActionListener

{

public CalculatorBuild(){

JFrame.setDefaultLookAndFeelDecorated(true);

JFrame frame = new JFrame("GridLayout Test");

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

frame.setLayout(new GridLayout(6, 4));

frame.add(new JButton("A"));

frame.add(new JButton(""));

frame.add(new JButton(""));

frame.add(new JButton(""));

frame.add(new JButton(""));

frame.add(new JButton("B"));

frame.add(new JButton("<-"));

frame.add(new JButton("CE"));

frame.add(new JButton("c"));

frame.add(new JButton("%"));

frame.add(new JButton("C"));

frame.add(new JButton("7"));

frame.add(new JButton("8"));

frame.add(new JButton("9"));

frame.add(new JButton("+"));

frame.add(new JButton("D"));

frame.add(new JButton("4"));

frame.add(new JButton("5"));

frame.add(new JButton("6"));

frame.add(new JButton("-"));

frame.add(new JButton("E"));

frame.add(new JButton("1"));

frame.add(new JButton("2"));

frame.add(new JButton("3"));

frame.add(new JButton("*"));

frame.add(new JButton("F"));

frame.add(new JButton("."));

frame.add(new JButton("0"));

frame.add(new JButton("+/-"));

frame.add(new JButton("="));

frame.pack();

frame.setVisible(true);

}

@Override

public void actionPerformed(ActionEvent e) {

}

}

Calculator View Edit Help 63 0000 0000 0000 0000 0000 0000 0000 e000 31 47 32 15 Quot Mod A Hex O Dec Oct Bin D 456 1/2x Qword Dword Word Byte 0 0 2 0 0 0 ABCDEF

Explanation / Answer

import java.awt.*;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import javax.swing.*;

public class CalculatorBuild extends JFrame implements ActionListener

{

public CalculatorBuild(){

JFrame.setDefaultLookAndFeelDecorated(true);

JFrame frame = new JFrame("GridLayout Test");

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

frame.setLayout(new GridLayout(6, 4));

frame.add(new JButton("A"));

frame.add(new JButton(""));

frame.add(new JButton(""));

frame.add(new JButton(""));

frame.add(new JButton(""));

frame.add(new JButton("B"));

frame.add(new JButton("<-"));

frame.add(new JButton("CE"));

frame.add(new JButton("c"));

frame.add(new JButton("%"));

frame.add(new JButton("C"));

frame.add(new JButton("7"));

frame.add(new JButton("8"));

frame.add(new JButton("9"));

frame.add(new JButton("+"));

frame.add(new JButton("D"));

frame.add(new JButton("4"));

frame.add(new JButton("5"));

frame.add(new JButton("6"));

frame.add(new JButton("-"));

frame.add(new JButton("E"));

frame.add(new JButton("1"));

frame.add(new JButton("2"));

frame.add(new JButton("3"));

frame.add(new JButton("*"));

frame.add(new JButton("F"));

frame.add(new JButton("."));

frame.add(new JButton("0"));

frame.add(new JButton("+/-"));

frame.add(new JButton("="));

frame.pack();

frame.setVisible(true);

}

@Override

public void actionPerformed(ActionEvent e) {

}

}