Results 1 to 11 of 11
 07072011, 01:48 AM #1Member
 Join Date
 Jul 2011
 Posts
 6
 Rep Power
 0
Write a program to compute tan (a+b) tan (ab)
/*
* To change this template, choose Tools  Templates
* and open the template in the editor.
*/
package excerise;
/**
*
* @author HARRISON
*
*/
import java.util.Scanner;
import java.lang.Math;
public class Excercise {
// Display Excercise in the output window
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
// create Scanner for input from command
double a, b;
double x;
double x2;
System.out.println("tangent in sides of tan a + b");
a=5;
b=10;
x= Math.tan((a + b) /(1a * b));
System.out.println("tangent x = " + x);
//mathtan(x) Tangent of x
// x2 is a double value
Scanner input = new Scanner (System.in);
// Obtain user input
//using tangent b
System.out.println("tangent in sides of tan a  b");
b=2;
x= Math.tan((a  b) / (1 + a * b));
System.out.println("tangent x = " + x);
System.out.print("The value for tan(a+b) =(tan(a)+tan(b))/(1tan(a)*tan(b))");
x=input.nextDouble();
System.out.println("The value for tan(ab)= (tan(a) + tan(b))/(1 + tan(a)*tan(b))");
x2= input.nextDouble();
//end of method main
// end of class tan (a + b) and tan (ab)
}
}
( KINDLY USE THE ABOVE CODE AND RUN IT ON GUI MODE) THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!Last edited by bestlita; 07072011 at 01:51 AM.
 07072011, 02:05 AM #2Moderator
 Join Date
 Jul 2010
 Location
 California
 Posts
 1,642
 Rep Power
 6
And what is your question/problem?

A good rule of thumb is to put as much effort into writing your question here as you wish someone to put into trying to answer it. Just dumping code into the forum doesn't really help us to know how to help you does it?
 07072011, 05:48 AM #4Member
 Join Date
 Jul 2011
 Posts
 5
 Rep Power
 0
There is no such thing as "GUI mode" It is a lot of work to develop a GUI for an application. That said, there are lots of programs to help you, such as NetBeans IDE. Look up java swing on google, and you may find some help.
 07072011, 08:19 AM #5( KINDLY USE THE ABOVE CODE AND RUN IT ON GUI MODE) THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!
Recommended reading: How to ask questions the smart way
db
 07072011, 09:15 AM #6
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 13,000
 Blog Entries
 7
 Rep Power
 20
Is this a continuation from this thread? Check this question
kind regards,
Joscenosillicaphobia: the fear for an empty beer glass
 07082011, 06:17 AM #7Member
 Join Date
 Jul 2011
 Posts
 6
 Rep Power
 0
Display the below code into a gui form or user friendly in java
A program to compute tan (a +b) (tan (ab)
/*
* To change this template, choose Tools  Templates
* and open the template in the editor.
*/
package excerise;
/**
*
* @author ITALIAN
*
*/
import java.util.Scanner;
import java.lang.Math;
public class Excercise {
// Display Excercise in the output window
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
// create Scanner for input from command
double a, b;
double x;
double x2;
System.out.println("tangent in sides of tan a + b");
a=5;
b=10;
x= Math.tan((a + b) /(1a * b));
System.out.println("tangent x = " + x);
//mathtan(x) Tangent of x
// x2 is a double value
Scanner input = new Scanner (System.in);
// Obtain user input
//using tangent b
System.out.println("tangent in sides of tan a  b");
b=2;
x= Math.tan((a  b) / (1 + a * b));
System.out.println("tangent x = " + x);
System.out.print("The value for tan(a+b) =(tan(a)+tan(b))/(1tan(a)*tan(b))");
x=input.nextDouble();
System.out.println("The value for tan(ab)= (tan(a) + tan(b))/(1 + tan(a)*tan(b))");
x2= input.nextDouble();
//end of method main
// end of class tan (a + b) and tan (ab)
}
}
 07082011, 06:18 AM #8Member
 Join Date
 Jul 2011
 Posts
 6
 Rep Power
 0
Kindly write code below in java swing; joptionpane
Please run the program using Swing command in java. Thanks
A program to compute tan (a +b) (tan (ab)
/*
* To change this template, choose Tools  Templates
* and open the template in the editor.
*/
package excerise;
/**
*
* @author ITALIAN
*
*/
import java.util.Scanner;
import java.lang.Math;
public class Excercise {
// Display Excercise in the output window
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
// create Scanner for input from command
double a, b;
double x;
double x2;
System.out.println("tangent in sides of tan a + b");
a=5;
b=10;
x= Math.tan((a + b) /(1a * b));
System.out.println("tangent x = " + x);
//mathtan(x) Tangent of x
// x2 is a double value
Scanner input = new Scanner (System.in);
// Obtain user input
//using tangent b
System.out.println("tangent in sides of tan a  b");
b=2;
x= Math.tan((a  b) / (1 + a * b));
System.out.println("tangent x = " + x);
System.out.print("The value for tan(a+b) =(tan(a)+tan(b))/(1tan(a)*tan(b))");
x=input.nextDouble();
System.out.println("The value for tan(ab)= (tan(a) + tan(b))/(1 + tan(a)*tan(b))");
x2= input.nextDouble();
//end of method main
// end of class tan (a + b) and tan (ab)
}
}Last edited by bestlita; 07082011 at 06:22 AM.
 07082011, 06:38 AM #9
 07082011, 06:49 AM #10
 Join Date
 Jan 2011
 Location
 Richmond, Virginia
 Posts
 3,069
 Blog Entries
 3
 Rep Power
 8
Use code tags. It's really not that difficult and it makes your code much more readable.
Why should we have to compile and run your code to find out your problem? You are here looking for help, don't expect people to bend over backwards for you. You will do the majority of the work here.

Locking this thread. It's obviously going nowhere.
Similar Threads

how can write program for gui
By pothireddy in forum Advanced JavaReplies: 9Last Post: 11042010, 06:17 AM 
How to compute or know the correct value for Xmx and xms?
By icesnake in forum New To JavaReplies: 5Last Post: 06082010, 04:22 PM 
Using Scanner to compute an average of the values
By Java Tip in forum java.langReplies: 0Last Post: 04172008, 07:36 PM
Bookmarks