Question about Computers & Internet

1 Answer

How to create owr own calculater - Computers & Internet

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

    Hot-Shot:

    An expert who has answered 20 questions.

    Corporal:

    An expert that hasĀ over 10 points.

    Mayor:

    An expert whose answer gotĀ voted for 2 times.

  • Contributor
  • 20 Answers

For all os ? you must use java language! this is the code:

//<applet code="calmayank"height=300 width=300></applet>
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;

public class calmayank extends JApplet
implements ActionListener
{
JTextField t1;

JButton b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,
b11,b12,b13,b14,b15,b16,b17,b18,b19,b20;

GridLayout gl;
JPanel p1,p2,p3;

public void init()
{
gl=new GridLayout(5,4);
p1=new JPanel();
p2=new JPanel();
p3=new JPanel();
p1.setLayout(gl);
t1=new JTextField(17);
b1=new JButton("1");
b2=new JButton("2");
b3=new JButton("3");
b4=new JButton("4");
b5=new JButton("5");
b6=new JButton("6");
b7=new JButton("7");
b8=new JButton("8");
b9=new JButton("9");
b10=new JButton("0");
b11=new JButton("+");
b12=new JButton("-");
b13=new JButton("*");
b14=new JButton("/");
b15=new JButton("@");
b16=new JButton("$");
b17=new JButton("%");
b18=new JButton(".");
b19=new JButton("?");
b20=new JButton("=");


p2.add(t1);

p1.add(b1);
p1.add(b2);
p1.add(b3);
p1.add(b4);
p1.add(b5);
p1.add(b6);
p1.add(b7);
p1.add(b8);
p1.add(b9);
p1.add(b10);
p1.add(b11);
p1.add(b12);
p1.add(b13);
p1.add(b14);
p1.add(b15);
p1.add(b16);
p1.add(b17);
p1.add(b18);
p1.add(b19);
p1.add(b20);
p3.add(p2);
p3.add(p1);
getContentPane().add(p3);

b1.addActionListener(this);
b2.addActionListener(this);
b3.addActionListener(this);
b4.addActionListener(this);
b5.addActionListener(this);
b6.addActionListener(this);
b7.addActionListener(this);
b8.addActionListener(this);
b9.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==b1)
{
t1.setText("1");
}
else if(e.getSource()==b2)
{
t1.setText("2");
}
else if(e.getSource()==b3)
{
t1.setText("3");
}
else if(e.getSource()==b4)
{
t1.setText("4");
}
else if(e.getSource()==b5)
{
t1.setText("5");
}
else if(e.getSource()==b6)
{
t1.setText("6");
}
else if(e.getSource()==b7)
{
t1.setText("7");
}
else if(e.getSource()==b8)
{
t1.setText("8");
}
else if(e.getSource()==b9)
{
t1.setText("9");
}
}
}

Posted on Dec 15, 2008

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Coffee overflows when brewing


make sure carafe is pushed in all the way.We had to tape owrs every morning

Mar 15, 2015 | Mr. Coffee OptimalBrew 10-Cup Thermal...

1 Answer

I have a qustion about the casio fx-300es calculater. I am taking a state exam and calculaters that are programable, have alphbets and make sound are not allowed. Does this calculater have any of these...


The Fx-300ES does not have any of the nifty features you are not allowed to have. You cannot program it=non programmable. It does not have a QWERTY keyboard and it is totally mute.
It does have a few variables that can be used to store values (A, B,C,D,E, X,Y but I believe that does not disqualify it.
You may want to check your state's exam website for a list of allowed calculators.

Apr 04, 2012 | Casio Office Equipment & Supplies

1 Answer

Casio fx-9860G graphics calculater, vertical line segment


I am not sure how you can create such function (the range limitation do not work for x=c) but you can draw a vertical segment, just do not call it a function.

Draw a graph Y1=0
Then press SKETCH function key and use the F6 key to cycle through the TABS at the bottom of the screen. Look for the TAB named PEN. and click the function key below it.

Use the arrows to move the cursor to a spot on the screen (near the bottom), Press EXE to fix the starting point of the segment. Then use the Up arrow to draw a vertical segment from bottom to top.

May 01, 2010 | Casio FX-9860G Graphic Calculator

1 Answer

How to create a simple calculater and requeired code


Hello,
pgrm:
Loop
Create a few registers
ClrSC
Prompt : enter a or a letter to exit
Read string1
If string1 NOT numeric exit
Move a to reg1
Prompt: enter b or a letter to exit
Read string2
If string2 NOT a number exit
Move b to reg2
Prompt : enter operation sign
Read opsign
If
opsign(0) Display a opsign b
else if
print:
I have not been programmed to carry out illegal operations. Try gain
end if
pool (end loop)
end

Can you implement that in the language of your choice.

Sep 14, 2009 | Texas Instruments TI-30XA Calculator

1 Answer

I hve 4gt my paswrd


Go to
www.unlockme.co.uk
Click on the forum link to the left
Create an account (its free)
Go to the forum listed GSM unlocking
Create a post asking to have your Nokia 1600 unlocked
List your IMEI number
The country that it was made for
The provider it is locked to
list if the phone was purchased new or second hand. Also if you have tried any unlock codes, if you have, list the code that you have tried.
The guys on this website will post back your unlock code.
Again, DO NOT try any of the free calculaters listed, let them give you the code. They will give you the CORRECT unlock code normally within a couple of hours of you making the post so your phone will be sim free.

Aug 30, 2009 | Nokia 1600 Cellular Phone

1 Answer

What batteries go in a TI-35 Plus calculater


I went to Office Max and they told me for FREE what batteries go in my old calculater.

Jun 20, 2009 | Texas Instruments TI-34II Explorer Plus...

2 Answers

Steps to refresh my nokia3110c


MY NOKIA 3110C HAVE SOME PROB. LIKE CALCULATER VANISHED, DEFAULT THEMS, TONES, WALPAPERS ARE VANISHED AND I HAVE ONE ANOTHER PROB. WHEN I OPEN THE MSGS THEN PHONE RESTART

May 17, 2009 | Nokia 3110 Cellular Phone

2 Answers

Userguide for sigmatel s98


plg tell me now how to connect my mobile in owr pc sigmatel s 98

Feb 23, 2009 | Handmark Software MobileLists (950142) for...

1 Answer

Calculater application


you will have to take the phone and ahve the firmware reflash to get back the calculator application.

Jul 06, 2008 | Nokia 6233 Cellular Phone

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

210 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

kakima

Level 3 Expert

100140 Answers

David Payne
David Payne

Level 3 Expert

14160 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...