32,199 Topics
| |
Urgently!! Need help convert number to words using jframe please help me | |
can anybody give me a code on how to put an image in a form. i am using a jreator 4.5. i dont know the code..please help me...tnx a lot.. | |
I would like to check user input value against a declared final variable to make sure it does not exceed the final int variable for the purpose of using in a try-catch-finally. [CODE] final int variable = 20; // Variable declared for max allowable int userInput = 0; // Used … | |
guys! can you help me convert this code to java language.... this is my code in c++....i need to convert in java.... # include <iostream.h> int num1,num2,sum; double add(double sum); int main() { cout<<"Enter first number"; cin>>num1; cout<<"Enter second number"; cin>>num2; sum=add(sum); cout<<"The sum is: "<< sum; return 0; } … | |
Hi Guys, i'm new to java and i need a code like a student form or employee on how to add, search, and delete a data in an array or list.. i'm very confused and i really need your help.. thanks. | |
[CODE]import java.util.Scanner; public class Highest{ public static void main (String [] args){ Scanner kb = new Scanner(System.in); int scores [] = new int[3]; String names [] = new String [3]; int highest = scores [0]; String names1 = names [0]; for (int i = 0; i<3; i++){ System.out.println("enter name and … | |
HI All, I need to submit my feedback form contents to an e-mail id as soon as the user clicks the submit button. How will I implement this in java. I googled and found out that FormToEmail which is a php script does this. But since i Am using netbeans, … | |
I have a problem when I make GUI using SWT. the ptoblem is I want to remove all component except one from the shell at specific event.but I'm not preffered to use setVisible(false) because the big numer of component which will remove . how can I do that? | |
I have a prime number method here which checks if the user input is a prime number, I've done some stuff to try to make it more efficient, but I am wondering if there is anything else that can be done, maybe even make the complexity class constant? Thanks. Below … | |
EDIT: Never mind I figured out what to do to get the results I wanted. It came to me less than a minute after finishing my post. Thanks anyway... Hello all, I wrote the required program that I must turn in tomorrow. However I have one hangup, I am supposed … | |
[code] import java.util.*; import java.text.*; import javax.swing.*; class Lab4Part2{ public static void main (String[] args) { String ex1; Double num, F; final int a=0, b=0; JFrame myWindow=new JFrame(); myWindow.setSize(500,400); myWindow.setTitle("Calculator"); myWindow.setVisible(true); myWindow.setLocation(600,200); ex1=JOptionPane.showInputDialog(myWindow, "Enter an expression"); F=Double.parseDouble(ex1); num=(a+b); JOptionPane.showMessageDialog(myWindow, "The sum is "+num); } } [/code] I need some help … | |
My program requires that the user input values for an array do not exceed a declared final int variable. To control this I wrote this code to catch and throw exceptions in order to prevent computer from crashing the program. There are two conditions to be handled. (1) Exceeding array … | |
Hey! guys, i need help figurering out how to make this program ran. Jack has decided his student organization is going to sell Oktoberfest shirts at Oktoberfest. In order to compete with other clubs, he wants to offer a 10% discount to anyone who buys 5 or more shirts. Also, … | |
Write a program that generates a pyramid of numbers from a users input (kbReader = new Scanner(System.in)) for example the number 5 is inputted and the wats printed is... 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 help? | |
This is the code of my key listener for a game.The keys move a plank upwards and downwards for two players.The problem is when one player keeps a key pressed then the other key event does not execute.what i want to do is that both players should be able to … | |
Ok so to give you a brief summary of whats going on our original assignment was to make a password directory that adds, saves, looks up, and removes a name and password that are connected together in an array. So now we need to alter the code so it works … | |
Hey guys, im getting a null pointer exception... but i dont know what is wrong. Im trying to get data from a hashmap, and place it in a swing tabel. [CODE=java] ArrayList planes_array[] = null; //planes_array[0] = new ArrayList(); for(int i=0; i<planes.size(); i++) { ArrayList tmp_array = new ArrayList(); tmp_array.add("1"); … | |
[CODE]import javax.swing.*; import java.text.*; public class Postage3{ public static void main(String args[]){ double weight, cost, count; int choice, choice2; DecimalFormat df = new DecimalFormat ("0.00"); choice2 = 1; while(choice2 == 1){ weight = Double.parseDouble(JOptionPane.showInputDialog("Enter weight of postage according to ounces")); if(weight <= 1){ cost = weight * 0.30; } else{ … | |
Hi there, I've just switched to Eclipse. I've been using TextPad so Eclipse is pretty cool.. But I've been getting weird error messages that I don't understand/not used to. Here they are: [CODE]JButton btnEnter = new JButton("Enter"); btnEnter.addActionListener(this);[/CODE] Here the Error says: Multiple markers at this line. -Syntax on token … | |
[CODE]import java.util.*; public class DiscountBolts { public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); double bolts, nuts, washers; double total; System.out.println("Enter number of bolts: "); bolts = keyboard.nextDouble(); System.out.println("Enter number of nuts: "); nuts = keyboard.nextDouble(); System.out.println("Enter number of washers: "); washers = keyboard.nextDouble(); total = (bolts … | |
Hello guys, i'm studying the Java programming language. every thins were going very well, but once i have encountered RECURSION i started to feel so bad. there is a recursive method that is blowing my mind. I can't figure out how does it print that the sum of a set … | |
i'm writing a Java program that ask the user to input words using JOptionPane.showInputDialog() Then look at each letter in the word and add up the points for each letter. Vowels (a,e,i,o and u) are valued at zero.The letters "x" and "q' are valued at 5.All other are 1.Anything not … | |
The unfollow button is written in Java does anyone or can anyone programmaticly click the unfollow button? tried everything i know, visual basic, Java, JavaScript,, you name it,, cant do it. | |
good morning i would like to ask about photo gallery codes in java...thank you... | |
An account has the properties account number, balance, annual,interest rate, and date created, and methods to deposit and withdraw.Create two sub classes for checkings and savings account.Checkings account has an overdraft limit, but a savings account cannot be overdrawn. One problem that i'm having is that when I withdraw x … | |
I'm working on a basic "banking" program. The most recent change I've made to it is to use inheritance so that instead of just an Account, you can make either a checking or savings account specifically. Everything is working fine, except that the checking account is supposed to have a … | |
I would like some help to index through an empty array and fill it with 10 entries one at a time. The objective of the task is to create a GUI with two buttons, one (Store) to save the value into array position and second (Quit) to run statistics calculations … | |
i wanna create a small game using java....suggest me the best one and guidelies to make it........ | |
Hi How to know if there is any version of Java installed on the user PC and what revision, using JavaScript thank you Charbel | |
Hey guys, I'm trying to solve a problem I received in school. It states: [I] Write a method named checkFermat that takes four integers as parameters—a, b, c and n—and that checks to see if Fermat’s theorem (a^n + b^n = c^n) holds. If n is greater than 2 and … |
The End.