Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Ambesh Kumar Pandey
multiplication
1 Answer(s)      3 years and 10 months ago
Posted in : Java Interview Questions


multiplication of two number numbers entered by user minimum 100digits using GUI


Advertisement
View Answers

February 22, 2011 at 11:12 AM


Java Multiplication of two 100 digits number

import java.awt.*;
import java.math.*;
import javax.swing.*;
import java.awt.event.*;

class SwingMultiplication
{
    public static void main(String[] args) 
    {
        JFrame f=new JFrame();
        f.setLayout(null);
        JLabel l1=new JLabel("Number 1");
        JLabel l2=new JLabel("Number 2");
        JLabel l3=new JLabel("Result");
        final JTextField text1=new JTextField(20);
        final JTextField text2=new JTextField(20);
        final JTextField text3=new JTextField(20);
        JButton b=new JButton("Calculate");
        l1.setBounds(10,10,100,20);
        text1.setBounds(120,10,100,20);

        l2.setBounds(10,40,100,20);
        text2.setBounds(120,40,100,20);

        l3.setBounds(10,70,100,20);
        text3.setBounds(120,70,100,20);

        b.setBounds(120,100,100,20);
        f.add(l1);
        f.add(text1);
        f.add(l2);
        f.add(text2);
        f.add(l3);
        f.add(text3);
        f.add(b);
        f.setVisible(true);
        f.setSize(400,200);
        b.addActionListener(new ActionListener(){
            public void actionPerformed(ActionEvent e){
            String v1=text1.getText();
            String v2=text2.getText();
            BigInteger big1=new BigInteger(v1);
            BigInteger big2=new BigInteger(v2);
            BigInteger res=big1.multiply(big2);
            text3.setText(res.toString());
            }
        });
    }
}


Related Tutorials/Questions & Answers:
multiplication
multiplication  multiplication of two number numbers entered by user minimum 100digits using GUI   Java Multiplication of two 100 digits number import java.awt.*; import java.math.*; import javax.swing.*; import
multiplication
multiplication  multiplication of two number numbers entered by user minimum 100digits using GUI   Java Multiplication of two 100 digits number import java.awt.*; import java.math.*; import javax.swing.*; import
Advertisements
Multiplication table
Design and develop Multiplication table in Net beans  Design and develop a program that will print a multiplication table. The program should: Ask the user for ending number than it must Display that particular multiplication
Matrix multiplication
Matrix multiplication  program to read the elements of the given two matrices of order n*n and to perform the matrix multiplication
Multiplication table
Multiplication table Net Beans  Using Net beans Design and develop... for ending number than Display that particular multiplication table   import java.util.Scanner; class Multiplication { public static void main
Multiplication table
Multiplication table  Using Net beans Design and develop a program... number than Display that particular multiplication table   import java.util.Scanner; class Multiplication { public static void main(String args
Multiplication problem - Java Beginners
Multiplication problem  I am facing a peculiar problem in java regarding a multiplication. Please see below: 19300 * 0.001 = 19.3 19400 * 0.001 = 19.400000000000002 (why is this ??) 19500 * 0.001 = 19.5 Can anybody help
Parallel multiplication matrix in java
Parallel multiplication matrix in java  hello dear I need parallel multiply matrix in java algorithm to account speed up and efficiency great wishes
parallel dense matrix multiplication
using dense parallel matrix multiplication. I request you to kindly provide me a code for Parallel Matrix multiplication on distributed systems using Java
java string multiplication
java string multiplication  Is there any simple method of string multiplication in java ..?   public class StringMultiplication { public static void main(String[] args) { String number1 = "17"; String number2
multiplication algorithms in java divide and conquer
multiplication algorithms in java divide and conquer  I need multiplication algorithms in java divide and conquer ask from user input two numbers in binary then the program multiply two number use multiplication algorithm in java
multiplication algorithms in java divide and conquer
multiplication algorithms in java divide and conquer  I need multiplication algorithms in java divide and conquer ask from user input two numbers in binary then the program multiply two number use multiplication algorithm in java
multiplication algorithms in java divide and conquer
multiplication algorithms in java divide and conquer  I need multiplication algorithms in java divide and conquer ask from user input two numbers in binary then the program multiply two number use multiplication algorithm in java
java program_big digits multiplication..
java program_big digits multiplication..  i want program about big digits multiplication program using java..plz tel me answer
Preprocessor directive case for multiplication and addition
Preprocessor directive case for multiplication and addition  Preprocessor directive case for multiplication and addition include<stdio.h> define m 2+10 include<conio.h> int main() { int i; clrscr
print the multiplication table up to one
print the multiplication table up to one  My problem is that I have... Multiplication { public static void main(String args[]) { int n, c; System.out.println("Enter an integer to print it's multiplication table
code for multiplication of matrix in java using methods
code for multiplication of matrix in java using methods  code for multiplication of matrix in java using methods
Preprocessor directive case for multiplication and addition
Preprocessor directive case for multiplication and addition  #include<stdio.h> #define m 2+10 #include<conio.h> int main() { int i; clrscr(); i=m*m; printf("i=%d\n",i); return 0
Preprocessor directive case for multiplication and addition
Preprocessor directive case for multiplication and addition  #include<stdio.h> #define m 2+10 #include<conio.h> int main() { int i; clrscr(); i=m*m; printf("i=%d\n",i); return 0
nsstring get value - algebra multiplication problems
nsstring get value - algebra multiplication problems  NSString Algebra multiplication problems How can i get value of X using algebra multiplication problems in nsstring? if i have two values.. 3 + 8 + X = ? Thanks
Mysql Multiplication Columns
Mysql Multiplication Columns       Mysql Multiplication Columns is used to provide the column... Multiplication Columns'. To understand the example we simply create a table
Mysql Multiplication Columns
Mysql Multiplication Columns       Mysql Multiplication Columns is used to provide... 'Mysql Multiplication Columns'.To understand the example we simply create
How to Create Multiplication Table from 1 to 10?
How to Create Multiplication Table from 1 to 10?  Hi, I want to develop an small application store products. So, i how to create multiplication table 1 to 10. Please suggest online example related to creating multiplication
Matrix Multiplication in Java
Matrix Multiplication in Java In this Java tutorial we will demonstrate you 'Matrix Multiplication in Java' with the help of a simple example from which you can easily learn how to write a matrix multiplication program in Java
Multiplication of two polynomials using linked list in java
Multiplication of two polynomials using linked list in java  I am doing a program "Multiplication of two polynomials using linked list in java...; Node q = front; //insert in front if exponent is higher
multiplication function in jsp using scriptlet function
multiplication function in jsp using scriptlet function   how to display data on text filed at total amount??? FlashTemplatesDesign.com Free Css Templates <!-- <form
Matrix multiplication in java
Matrix multiplication in java In this section we will learn about multiplication of two matrices. In java this is a simple program to multiply two matrices... multiplication, while multiplying two matrices the number of column in first
Create Multiplication Table from 1 to 10
Create Multiplication Table in Java In this section, you will learn how to create multiplication table from 1 to 10. For this purpose, we have created 2-dimensional Array 'array[][]' and using the for loop, we have stored the product
code for a simple java program which performs basic arithmetic operation addition,subtraction,multiplication,division........
code for a simple java program which performs basic arithmetic operation addition,subtraction,multiplication,division........  code for a simple java...,multiplication,division
I want to Do Addtion ,Substraction,Division,Multiplication in C Without using Any Arithmetic Operators - Development process
I want to Do Addtion ,Substraction,Division,Multiplication in C Without using Any Arithmetic Operators  I want to Do Addtion ,Substraction,Division,Multiplication in C Without using Any Arithmetic Operators. plz Help Me
 

 

 

DMCA.com