Source Code Kalkulator Sciencetific Java
Source Code Kalkulator Sciencetific Java
Source Code Kalkulator Sciencetific Java
skala = 6;
break;
}
case %:{
skala = 6;
break;
}
case +:{
skala = 5;
break;
}
case -:{
skala = 5;
break;
}
case <:{
skala = 4;
break;
}
case >:{
skala = 4;
break;
}
case &:{
skala = 3;
break;
}
case #:{
skala = 2;
break;
}
case |:{
skala = 1;
break;
}
default:{
skala = 0;
break;
}
}
return skala;
}
public String convertToPostfix(String infixExp) throws Exception, PrioritasException {
StringTokenizer st = new StringTokenizer(infixExp);
String curToken = , postfixExp = ;
int nKurungBuka = 0, nKurungTutup = 0;
while(st.hasMoreTokens()) {
//mengambil token
curToken = st.nextToken();
if(isOperand(curToken)) {
//jika currentToken adalah operand, maka kembalikan sebagai ekspresi postfix
postfixExp = postfixExp + + (Double.parseDouble(curToken));
} else if(curToken.equals(()) {
//jika currentToken adalah kurung buka, maka push tanda kurung buka ke stack operator
Character tanda = new Character(();
stackOfOperator.push(tanda);
nKurungBuka++;
} else if(curToken.equals())) {
//jika currentToken adalah kurung tutup, maka pop stack operator sampai ketemu kurung
buka
while(((Character)stackOfOperator.peek()).charValue() != () {
postfixExp = postfixExp + + stackOfOperator.pop();
}
if (((Character)stackOfOperator.peek()).charValue() == ()
stackOfOperator.pop();
nKurungTutup++;
} else if(isOperator(curToken)) {
//jika currentToken adalah operator
if(stackOfOperator.isEmpty()) {
//stack operator masih kosong, maka push currentToken ke stack operator
Character tanda = new Character(curToken.charAt(0));
stackOfOperator.push(tanda);
} else {
/*
stack operator sudah ada isinya
ambil puncak stack, lalu bandingkan presedensinya dengan currentToken
jika precendence(puncak) > precedence(currentToken) maka pop stack
*/
Character tanda = new Character(curToken.charAt(0));
if (skala_prioritas(((Character)stackOfOperator.peek()).charValue()) > skala_prioritas(tanda))
{
postfixExp = postfixExp + + stackOfOperator.pop();
}
//push currentToken
stackOfOperator.push(tanda);
}
} else {
//ekspresi tidak valid
throw new PrioritasException(Syntax Error);
}
//System.out.println(bla + +postfixExp );
//bla++;
}
//ekspresi tidak valid
if(nKurungBuka != nKurungTutup)
throw new PrioritasException(Syntax Error);
skala = ((Double)stackOfOperand.pop()).doubleValue();
return skala;
}
class PrioritasException extends Exception {
/**
*
*/
private static final long serialVersionUID = 1L;
private String message;
public PrioritasException(String _message) {
super(_message);
message = _message;
}
public String getMessage() {
return message;
}
public String toString() {
return PrioritasException: + getMessage();
}
public void printStackTrace() {
System.out.println(this);
super.fillInStackTrace();
}
}
}
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::
//membuat kelas konversi bilangan
public class Konversi_Bilangan {
public double dec ;
private String bin ;
private String oct ;
private String hex ;
public Konversi_Bilangan (){
dec = 0;
bin = ;
oct = ;
hex = ;
}
return temp;
}
public static double todec (int base, String input){
double a = 0;
for (int x =0; x<input.length(); x++){
String z;
if (base<10)
z = +input.charAt(x);
else
if (input.charAt(x)==A)
z = 10;
else if (input.charAt(x)==B)
z = 11;
else if (input.charAt(x)==C)
z = 12;
else if (input.charAt(x)==D)
z = 13;
else if (input.charAt(x)==E)
z = 14;
else if (input.charAt(x)==F)
z = 15;
else
z = +input.charAt(x);
a = a + Double.parseDouble(z) * Math.pow(base, input.length()-x-1);
}
return a;
}
}
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::
//membuat kelas kalkulator
public class Calculator extends javax.swing.JFrame {
String angka=;
Double total,angka1,konvert,tampung;
int pilih,b1,b2,kurung;
String Memory=;
double Mem;
char cek;
boolean TKpress,btotal;
/** Creates new form Calculator */
public Calculator() {
super(Kalkulator Scientific);
initComponents();
angka=;
}
cmddeg.setRequestFocusEnabled(false);
cmddeg.setRolloverEnabled(false);
cmddeg.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmddegActionPerformed(evt);
}
});
buttonGroup2.add(cmdrad);
cmdrad.setText(Radians);
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(35, 35, 35)
.addComponent(cmddeg, javax.swing.GroupLayout.PREFERRED_SIZE, 78,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(29, 29, 29)
.addComponent(cmdrad)
.addContainerGap(33, Short.MAX_VALUE))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASEL
INE)
.addComponent(cmddeg)
.addComponent(cmdrad))
);
jPanel1.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
buttonGroup1.add(cmdhex);
cmdhex.setText(Hex);
cmdhex.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdhexActionPerformed(evt);
}
});
buttonGroup1.add(cmddec);
cmddec.setSelected(true);
cmddec.setText(Dec);
cmddec.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmddecActionPerformed(evt);
}
});
buttonGroup1.add(cmdoct);
cmdoct.setText(Oct);
cmdoct.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdoctActionPerformed(evt);
}
});
buttonGroup1.add(cmdbin);
cmdbin.setText(Bin);
cmdbin.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdbinActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(cmdhex, javax.swing.GroupLayout.PREFERRED_SIZE, 47,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cmddec)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cmdoct)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(cmdbin)
.addGap(43, 43, 43))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASEL
INE)
.addComponent(cmdhex)
.addComponent(cmddec)
.addComponent(cmdbin)
.addComponent(cmdoct))
);
jPanel3.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
cmdinv.setText(Inv);
cmdhyp.setText(Hyp);
cmd7.setBorder(null);
cmd7.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmd7.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmd7ActionPerformed(evt);
}
});
cmd8.setForeground(new java.awt.Color(0, 0, 255));
cmd8.setText(8);
cmd8.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmd8.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmd8ActionPerformed(evt);
}
});
cmd9.setForeground(new java.awt.Color(0, 0, 255));
cmd9.setText(9);
cmd9.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmd9.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmd9ActionPerformed(evt);
}
});
cmdbagi.setForeground(new java.awt.Color(255, 0, 0));
cmdbagi.setText(/);
cmdbagi.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmdbagi.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdbagiActionPerformed(evt);
}
});
cmdmod.setForeground(new java.awt.Color(255, 0, 0));
cmdmod.setText(Mod);
cmdmod.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmdmod.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdmodActionPerformed(evt);
}
});
cmdand.setForeground(new java.awt.Color(255, 0, 0));
cmdand.setText(And);
cmdand.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmdand.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdandActionPerformed(evt);
}
});
cmd4.setForeground(new java.awt.Color(0, 0, 255));
cmd4.setText(4);
cmd4.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmd4.setRequestFocusEnabled(false);
cmd4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmd4ActionPerformed(evt);
}
});
cmd5.setForeground(new java.awt.Color(0, 0, 255));
cmd5.setText(5);
cmd5.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmd5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmd5ActionPerformed(evt);
}
});
cmd6.setForeground(new java.awt.Color(0, 0, 255));
cmd6.setText(6);
cmd6.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmd6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmd6ActionPerformed(evt);
}
});
cmdkali.setForeground(new java.awt.Color(255, 0, 0));
cmdkali.setText(x);
cmdkali.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmdkali.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdkaliActionPerformed(evt);
}
});
cmdor.setForeground(new java.awt.Color(255, 0, 0));
cmdor.setText(Or);
cmdor.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmdor.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdorActionPerformed(evt);
}
});
cmdlshActionPerformed(evt);
}
});
cmdnot.setForeground(new java.awt.Color(255, 0, 0));
cmdnot.setText(Not);
cmdnot.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmdnot.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdnotActionPerformed(evt);
}
});
cmd0.setForeground(new java.awt.Color(0, 0, 255));
cmd0.setText(0);
cmd0.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmd0.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmd0ActionPerformed(evt);
}
});
cmdplus_minus.setForeground(new java.awt.Color(0, 0, 255));
cmdplus_minus.setText(+/-);
cmdplus_minus.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmdplus_minus.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdplus_minusActionPerformed(evt);
}
});
cmdcomma.setForeground(new java.awt.Color(0, 0, 255));
cmdcomma.setText(,);
cmdcomma.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmdcomma.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdcommaActionPerformed(evt);
}
});
cmdtambah.setForeground(new java.awt.Color(255, 0, 0));
cmdtambah.setText(+);
cmdtambah.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmdtambah.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdtambahActionPerformed(evt);
}
});
cmdms.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
cmdmsMouseClicked(evt);
}
});
cmdms.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdmsActionPerformed(evt);
}
});
cmdphi.setForeground(new java.awt.Color(0, 0, 255));
cmdphi.setText(phi);
cmdphi.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmdphi.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdphiActionPerformed(evt);
}
});
cmdlen.setForeground(new java.awt.Color(153, 0, 153));
cmdlen.setText(ln);
cmdlen.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmdlen.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdlenActionPerformed(evt);
}
});
cmdlog.setForeground(new java.awt.Color(153, 0, 153));
cmdlog.setText(log);
cmdlog.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmdlog.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdlogActionPerformed(evt);
}
});
cmdfaktorial.setForeground(new java.awt.Color(153, 0, 153));
cmdfaktorial.setText(n!);
cmdfaktorial.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmdfaktorial.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdfaktorialActionPerformed(evt);
}
});
cmdper.setForeground(new java.awt.Color(153, 0, 153));
cmdper.setText(1/x);
cmdper.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmdper.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdperActionPerformed(evt);
}
});
cmdexp.setForeground(new java.awt.Color(153, 0, 153));
cmdexp.setText(Exp);
cmdexp.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmdexp.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdexpActionPerformed(evt);
}
});
cmdpow_y.setForeground(new java.awt.Color(153, 0, 153));
cmdpow_y.setText(x^y);
cmdpow_y.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmdpow_y.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdpow_yActionPerformed(evt);
}
});
cmdpow3.setForeground(new java.awt.Color(153, 0, 153));
cmdpow3.setText(x^3);
cmdpow3.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmdpow3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdpow3ActionPerformed(evt);
}
});
cmdpow2.setForeground(new java.awt.Color(153, 0, 153));
cmdpow2.setText(x^2);
cmdpow2.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmdpow2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdpow2ActionPerformed(evt);
}
});
cmdsin.setForeground(new java.awt.Color(153, 0, 153));
cmdsin.setText(sin);
cmdsin.setMargin(new java.awt.Insets(2, 2, 2, 2));
cmdsin.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdsinActionPerformed(evt);
}
});
MenuKeluar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
MenuKeluarActionPerformed(evt);
}
});
jMenu1.add(MenuKeluar);
jMenuBar1.add(jMenu1);
jMenu2.setText(View);
jCheckBoxMenuItem1.setSelected(true);
jCheckBoxMenuItem1.setText(Scientific);
jCheckBoxMenuItem1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jCheckBoxMenuItem1ActionPerformed(evt);
}
});
jMenu2.add(jCheckBoxMenuItem1);
jCheckBoxMenuItem2.setText(Standar);
jCheckBoxMenuItem2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jCheckBoxMenuItem2ActionPerformed(evt);
}
});
jMenu2.add(jCheckBoxMenuItem2);
jMenuBar1.add(jMenu2);
setJMenuBar(jMenuBar1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(tampil, javax.swing.GroupLayout.DEFAULT_SIZE, 449,
Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(cmdtan, javax.swing.GroupLayout.PREFERRED_SIZE, 35,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(cmdhasil, javax.swing.GroupLayout.PREFERRED_SIZE, 35,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cmdint, javax.swing.GroupLayout.PREFERRED_SIZE, 35,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(cmdor, javax.swing.GroupLayout.PREFERRED_SIZE, 35,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cmdxor, javax.swing.GroupLayout.PREFERRED_SIZE, 35,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(cmdlsh, javax.swing.GroupLayout.PREFERRED_SIZE, 35,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cmdnot, javax.swing.GroupLayout.PREFERRED_SIZE, 35,
javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGroup(layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cmd8, javax.swing.GroupLayout.PREFERRED_SIZE, 35,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cmd9, javax.swing.GroupLayout.PREFERRED_SIZE, 35,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cmdbagi, javax.swing.GroupLayout.PREFERRED_SIZE, 35,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cmdmod, javax.swing.GroupLayout.PREFERRED_SIZE, 35,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cmdand, javax.swing.GroupLayout.PREFERRED_SIZE, 35,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(4, 4, 4))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING,
false)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(tampil_M, javax.swing.GroupLayout.PREFERRED_SIZE, 40,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.PREFERRED_SIZE, 199,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel2, 0, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(54, 54, 54)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(70, 70, 70)
.addComponent(cmdCE, javax.swing.GroupLayout.PREFERRED_SIZE, 60,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cmdclear, javax.swing.GroupLayout.PREFERRED_SIZE, 60,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(Cmdbackspace, javax.swing.GroupLayout.PREFERRED_SIZE, 60,
javax.swing.GroupLayout.PREFERRED_SIZE))))))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(tampil, javax.swing.GroupLayout.PREFERRED_SIZE, 29,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(cmdCE, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(cmdclear, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Cmdbackspace, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(tampil_M, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(cmd8, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(cmd9, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(cmdbagi, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(cmdmod, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(cmdand, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(cmd7, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(cmd4, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(cmd6, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(cmdkali, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(cmd5, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(cmdor, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(cmdxor, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(cmd2, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(cmd3, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(cmd1, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(cmdlsh, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(cmdkurang, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(cmdplus_minus, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(cmdcomma, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE)
angka +=2;
tampil.setText(angka);
}
private void cmd3ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
angka +=3;
tampil.setText(angka);
}
private void cmd4ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
angka +=4;
tampil.setText(angka);
}
private void cmd6ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
angka +=6;
tampil.setText(angka);
}
private void cmd7ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
angka +=7;
tampil.setText(angka);
}
private void cmd9ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
angka +=9;
tampil.setText(angka);
}
private void cmdtambahActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
if(TKpress==true){
infixExp+= + ;
}
else{
angka1=Double.parseDouble(tampil.getText());
infixExp+=angka1+ + ;
}
angka = ;
}
private void cmdkurangActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
if(TKpress==true){
infixExp+= ;
}
else{
angka1=Double.parseDouble(tampil.getText());
infixExp+=angka1+ ;
}
angka = ;
}
private void cmdkaliActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
if(TKpress==true){
infixExp+= * ;
}
else{
angka1=Double.parseDouble(tampil.getText());
infixExp+=angka1+ * ;
}
angka = ;
}
private void cmdbagiActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
if(TKpress==true){
infixExp+= / ;
}
else{
angka1=Double.parseDouble(tampil.getText());
infixExp+=angka1+ / ;
}
angka = ;
}
private void cmdmodActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
if(TKpress==true){
infixExp+= % ;
}
else{
angka1=Double.parseDouble(tampil.getText());
infixExp+=angka1+ % ;
}
angka = ;
}
public double proses(double input,String operator,String cOP,double total)
{
double jum=0;
if(operator.equals(+)){
jum=total+input;
tampung=input;
}
else if(operator.equals(*)){
if(cOP.equals(+)){
jum=(tampung*input)+(total-tampung);
tampung=tampung*input;
}
else if(cOP.equals(-)){
jum=(total+tampung)-(tampung*input);
tampung=tampung*input;
}
else{
jum=total*input;
}
}
else if(operator.equals(/)){
if(cOP.equals(+)){
jum=(tampung/input)+(total-tampung);
tampung=tampung/input;
}
else if(cOP.equals(-)){
jum=(total+tampung)-(tampung/input);
tampung=tampung/input;
}
else{
jum=total/input;
}
}
else if(operator.equals(-)){
jum=total-input;
tampung=input;
}
System.out.println(tampung);
return jum;
}
private void cmdhasilActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
if((kurung==0)&&(!tampil.getText().equals()))){
angka1=Double.parseDouble(tampil.getText());
infixExp+=angka1;
}
try{
postfixExp = priority.convertToPostfix(infixExp);
total=priority.evaluate(postfixExp);
}
catch(Exception e){
e.printStackTrace();
}
tampil.setText(+(total));
btotal=true;
infixExp=;
System.out.println(+infixExp);
TKpress=false;
angka=;
}
private void cmdCEActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
tampil.setText();
}
private void cmdclearActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
angka1 = 0.0;
total = 0.0;
angka = ;
tampil.setText();
}
private void cmdsinActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String sin = tampil.getText();
double derajat = Double.parseDouble(sin);
double pi = Math.PI;
//dalam bentuk degrees//
double hasil = Math.sin(derajat * pi/180);
tampil.setText(Double.toString(hasil));
if(derajat%180==0){
tampil.setText(0.0);
}
if(cmdhyp.isSelected()==true&&cmdinv.isSelected()==false){
hasil = Math.sinh(derajat);
tampil.setText(Double.toString(hasil));
cmdhyp.setSelected(false);
}
if(cmdinv.isSelected()==true&&cmdhyp.isSelected()==false){
hasil = Math.asin(derajat)*180/pi;
tampil.setText(Double.toString(hasil));
if(derajat==1){
tampil.setText(90);
}
cmdinv.setSelected(false);
}
if(cmdinv.isSelected()==true && cmdhyp.isSelected()==true){
double proseshasil =Math.pow(derajat, 2)+1.0;
double proseshasil2 = Math.sqrt(proseshasil);
hasil = Math.log(derajat+proseshasil2);
tampil.setText(Double.toString(hasil));
cmdhyp.setSelected(false);
cmdinv.setSelected(false);
}
//dalam bentuk radian//
if(cmdrad.isSelected()==true){
hasil = Math.sin(derajat);
tampil.setText(Double.toString(hasil));
}
if(cmdrad.isSelected()==true && cmdhyp.isSelected()==true &&
cmdinv.isSelected()==false){
hasil = Math.sinh(derajat);
tampil.setText(Double.toString(hasil));
cmdhyp.setSelected(false);
}
if(cmdrad.isSelected()==true && cmdinv.isSelected()==true &&
cmdhyp.isSelected()==false){
hasil = Math.asin(derajat);
tampil.setText(Double.toString(hasil));
cmdinv.setSelected(false);
}
if(cmdrad.isSelected()==true && cmdinv.isSelected()==true && cmdhyp.isSelected()==true)
{
double proseshasil =Math.pow(derajat, 2)+1.0;
double proseshasil2 = Math.sqrt(proseshasil);
hasil = Math.log(derajat+proseshasil2);
tampil.setText(Double.toString(hasil));
cmdinv.setSelected(false);
cmdhyp.setSelected(false);
}
}
private void CmdbackspaceActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
angka = angka.substring(0, angka.length()-1);
tampil.setText(angka);
}
private void cmdplus_minusActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
if(!angka.contains(-))
angka = -+angka;
else
angka = angka.substring(1, angka.length());
tampil.setText(angka);
}
private void cmdcosActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String cos = tampil.getText();
double derajat = Double.parseDouble(cos);
double pi = Math.PI;
//dalam bentuk degrees//
double hasil = Math.cos(derajat * pi/180);
tampil.setText(Double.toString(hasil));
if(derajat ==90 ){
tampil.setText(0);
}
if(derajat%270==0){
tampil.setText(0);
}
if(cmdhyp.isSelected()==true && cmdinv.isSelected()==false){
hasil = Math.cosh(derajat);
tampil.setText(Double.toString(hasil));
cmdhyp.setSelected(false);
}
if(cmdinv.isSelected()==true && cmdhyp.isSelected()==false){
hasil = Math.acos(derajat)*180/pi;
tampil.setText(Double.toString(hasil));
cmdinv.setSelected(false);
}
if(cmdinv.isSelected()==true && cmdhyp.isSelected()==true){
double proseshasil =Math.pow(derajat, 2)-1.0;
double proseshasil2 = Math.sqrt(proseshasil);
hasil = Math.log(derajat+proseshasil2);
tampil.setText(Double.toString(hasil));
cmdhyp.setSelected(false);
cmdinv.setSelected(false);
}
//dalam bentuk radian//
if(cmdrad.isSelected()==true){
hasil = Math.cos(derajat);
tampil.setText(Double.toString(hasil));
}
if(cmdrad.isSelected()==true && cmdhyp.isSelected()==true &&
cmdinv.isSelected()==false){
hasil = Math.cosh(derajat);
tampil.setText(Double.toString(hasil));
cmdhyp.setSelected(false);
}
hasil = Math.atan(derajat)*180/pi;
tampil.setText(Double.toString(hasil));
cmdinv.setSelected(false);
}
//dalam bentuk radian//
if(cmdrad.isSelected()==true){
hasil = Math.tan(derajat);
tampil.setText(Double.toString(hasil));
}
if(cmdrad.isSelected()==true && cmdhyp.isSelected()==true &&
cmdinv.isSelected()==false){
hasil = Math.tanh(derajat);
tampil.setText(Double.toString(hasil));
cmdhyp.setSelected(false);
}
if(cmdrad.isSelected()==true && cmdinv.isSelected()==true &&
cmdhyp.isSelected()==false){
hasil = Math.atan(derajat);
tampil.setText(Double.toString(hasil));
cmdinv.setSelected(false);
}
}
private void cmdperActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String per = tampil.getText();
double perperan = Double.parseDouble(per);
double hasil = 1/perperan;
tampil.setText(Double.toString(hasil));
}
private void cmdpow2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String pow_2 = tampil.getText();
double pw = Double.parseDouble(pow_2);
double hasil = Math.pow(pw,2);
tampil.setText(Double.toString(hasil));
if(cmdinv.isSelected()==true){
hasil = Math.pow(pw, 0.5);
tampil.setText(Double.toString(hasil));
cmdinv.setSelected(false);
}
}
private void cmdpow3ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String pow_3 = tampil.getText();
double pw = Double.parseDouble(pow_3);
}
private void cmdpow_yActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
if(TKpress==true){
infixExp+= ^ ;
if(cmdinv.isSelected()==true){
infixExp+= ^ 1 / ;
}
}
else{
angka1=Double.parseDouble(tampil.getText());
infixExp+=angka1+ ^ ;
if(cmdinv.isSelected()==true){
angka1=Double.parseDouble(tampil.getText());
infixExp+=angka1+ ^ 1 / ;
}
}
angka = ;
}
private void cmdexpActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
angka1 = Double.parseDouble(angka);
tampil.setText(angka);
angka = ;
pilih = 7;
}
private void cmdAActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
angka+=A;
tampil.setText(angka);
}
private void cmdBActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
angka+=B;
tampil.setText(angka);
}
private void cmdCActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
angka+=C;
tampil.setText(angka);
}
tampil.setText(bil.getHex());
}
else if (cek == b){
bil.setbin(hexa);
tampil.setText(bil.getHex());
}
else if (cek == d){
bil = new Konversi_Bilangan (konverti);
tampil.setText(+bil.getHex());
}
cek = h;
}
private void cmddecActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
cmdA.setEnabled(false);
cmdB.setEnabled(false);
cmdC.setEnabled(false);
cmdD.setEnabled(false);
cmdE.setEnabled(false);
cmdF.setEnabled(false);
cmdphi.setEnabled(true);
cmdsin.setEnabled(true);
cmdcos.setEnabled(true);
cmdtan.setEnabled(true);
cmdexp.setEnabled(true);
cmd0.setEnabled(true);
cmd1.setEnabled(true);
cmd2.setEnabled(true);
cmd3.setEnabled(true);
cmd4.setEnabled(true);
cmd5.setEnabled(true);
cmd6.setEnabled(true);
cmd7.setEnabled(true);
cmd8.setEnabled(true);
cmd9.setEnabled(true);
Konversi_Bilangan bil = new Konversi_Bilangan();
String desi = tampil.getText();
double konverti = Double.parseDouble(desi);
bil.set(konverti);
tampil.setText(+bil.get());
if(cek == h){
bil.sethex(desi);
tampil.setText(+bil.get());
}
else if (cek == o){
bil.setoct(desi);
tampil.setText(+bil.get());
}
else if (cek == b){
bil.setbin(desi);
tampil.setText(+bil.get());
}
cek =d;
}
private void cmdoctActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
cmdA.setEnabled(false);
cmdB.setEnabled(false);
cmdC.setEnabled(false);
cmdD.setEnabled(false);
cmdE.setEnabled(false);
cmdF.setEnabled(false);
cmdphi.setEnabled(false);
cmdsin.setEnabled(false);
cmdcos.setEnabled(false);
cmdtan.setEnabled(false);
cmdexp.setEnabled(false);
cmd0.setEnabled(true);
cmd1.setEnabled(true);
cmd2.setEnabled(true);
cmd3.setEnabled(true);
cmd4.setEnabled(true);
cmd5.setEnabled(true);
cmd6.setEnabled(true);
cmd7.setEnabled(true);
cmd8.setEnabled(false);
cmd9.setEnabled(false);
Konversi_Bilangan bil = new Konversi_Bilangan();
String octal = tampil.getText();
double konverti = Double.parseDouble(octal);
bil.set(konverti);
tampil.setText(bil.getOct());
if(cek == h){
bil.sethex(octal);
tampil.setText(bil.getOct());
}
else if (cek == b){
bil.setbin(octal);
tampil.setText(bil.getOct());
}
else if (cek == d){
bil = new Konversi_Bilangan (konverti);
tampil.setText(+bil.getOct());
}
cek =o;
}
private void cmdbinActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
cmdA.setEnabled(false);
cmdB.setEnabled(false);
cmdC.setEnabled(false);
cmdD.setEnabled(false);
cmdE.setEnabled(false);
cmdF.setEnabled(false);
cmdphi.setEnabled(false);
cmdsin.setEnabled(false);
cmdcos.setEnabled(false);
cmdtan.setEnabled(false);
cmdexp.setEnabled(false);
cmd0.setEnabled(true);
cmd1.setEnabled(true);
cmd2.setEnabled(false);
cmd3.setEnabled(false);
cmd4.setEnabled(false);
cmd5.setEnabled(false);
cmd6.setEnabled(false);
cmd7.setEnabled(false);
cmd8.setEnabled(false);
cmd9.setEnabled(false);
Konversi_Bilangan bil = new Konversi_Bilangan();
String biner = tampil.getText();
double konverti = Double.parseDouble(biner);
bil.set(konverti);
tampil.setText(bil.getBin());
if(cek == h){
bil.sethex(biner);
tampil.setText(bil.getBin());
}
else if (cek == o){
bil.setoct(biner);
tampil.setText(bil.getBin());
}
else if (cek == d){
bil = new Konversi_Bilangan (konverti);
tampil.setText(+bil.getBin());
}
cek =b;
}
double input1=Double.parseDouble(tampil.getText());
int bulat = (int)input1;
infixExp+=input1+ ^ ;
angka=;
}
}
private void cmdintActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String compress_2int = tampil.getText();
double desimal = Double.parseDouble(compress_2int);
int hasil = ~(int)desimal;
tampil.setText(Integer.toString(hasil));
}
private void cmdmrActionPerformed(java.awt.event.ActionEvent evt) {
tampil.setText(Double.toString(Mem));
}
private void cmdmcActionPerformed(java.awt.event.ActionEvent evt) {
Mem = 0.0;
tampil_M.setText();
}
private void tampil_MActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void cmdmsMouseClicked(java.awt.event.MouseEvent evt) {
Mem = Double.parseDouble(angka);
tampil_M.setText(M);// TODO add your handling code here:
}
private void cmdfaktorialActionPerformed(java.awt.event.ActionEvent evt) {
double fak=1;
double x = Double.parseDouble(angka);
for(double i=x; i>=1; i){
fak *= i;
}
tampil.setText(Double.toString(fak));
// TODO add your handling code here:
}
private void cmddegActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
new Calculator().setVisible(true);
}
});
}
// Variables declaration do not modify
private javax.swing.JButton Cmdbackspace;
private javax.swing.JCheckBoxMenuItem MenuKeluar;
private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.ButtonGroup buttonGroup2;
private javax.swing.JButton cmd0;
private javax.swing.JButton cmd1;
private javax.swing.JButton cmd2;
private javax.swing.JButton cmd3;
private javax.swing.JButton cmd4;
private javax.swing.JButton cmd5;
private javax.swing.JButton cmd6;
private javax.swing.JButton cmd7;
private javax.swing.JButton cmd8;
private javax.swing.JButton cmd9;
private javax.swing.JButton cmdA;
private javax.swing.JButton cmdB;
private javax.swing.JButton cmdC;
private javax.swing.JButton cmdCE;
private javax.swing.JButton cmdD;
private javax.swing.JButton cmdE;
private javax.swing.JButton cmdF;
private javax.swing.JButton cmdand;
private javax.swing.JButton cmdbagi;
private javax.swing.JRadioButton cmdbin;
private javax.swing.JButton cmdclear;
private javax.swing.JButton cmdcomma;
private javax.swing.JButton cmdcos;
private javax.swing.JRadioButton cmddec;
private javax.swing.JRadioButton cmddeg;
private javax.swing.JButton cmdexp;
private javax.swing.JButton cmdfaktorial;
private javax.swing.JButton cmdhasil;
private javax.swing.JRadioButton cmdhex;
private javax.swing.JCheckBox cmdhyp;
private javax.swing.JButton cmdint;
private javax.swing.JCheckBox cmdinv;
private javax.swing.JButton cmdkali;
private javax.swing.JButton cmdkurang;
private javax.swing.JButton cmdlen;
private javax.swing.JButton cmdlog;
private javax.swing.JButton cmdlsh;
private javax.swing.JButton cmdmc;
private javax.swing.JButton cmdmod;
private javax.swing.JButton cmdmplus;