32,199 Topics

Member Avatar for
Member Avatar for lockwater
Member Avatar for mitchneys

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..

Member Avatar for tong1
-1
82
Member Avatar for jems5

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 …

Member Avatar for jems5
0
106
Member Avatar for mitchneys

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; } …

Member Avatar for mitchneys
0
135
Member Avatar for ANDIEniable

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.

Member Avatar for kvass
0
419
Member Avatar for plasticfood

[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 …

Member Avatar for NormR1
0
118
Member Avatar for ambikanair

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, …

Member Avatar for ambikanair
0
108
Member Avatar for eman 22

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?

0
51
Member Avatar for flyingcurry

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 …

0
108
Member Avatar for xterradaniel

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 …

0
82
Member Avatar for andyluvskrissy

[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 …

Member Avatar for NormR1
0
178
Member Avatar for jems5

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 …

Member Avatar for dangari
0
143
Member Avatar for tonyfingures

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, …

Member Avatar for JamesCherrill
0
162
Member Avatar for dorotalp91

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?

Member Avatar for cazio_)15
0
141
Member Avatar for gauravk_bhanot

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 …

Member Avatar for NormR1
0
192
Member Avatar for nwalser

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 …

Member Avatar for NormR1
0
289
Member Avatar for nickoooname

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"); …

Member Avatar for JamesCherrill
0
139
Member Avatar for noydoy

[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{ …

Member Avatar for noydoy
0
2K
Member Avatar for Dean_Grobler

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 …

Member Avatar for Dean_Grobler
0
198
Member Avatar for ncstplaya1234

[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 …

Member Avatar for dangari
0
148
Member Avatar for islam-morad

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 …

Member Avatar for islam-morad
0
129
Member Avatar for shinnie

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 …

Member Avatar for JamesCherrill
0
217
Member Avatar for marketingmaniac

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.

Member Avatar for peter_budo
0
63
Member Avatar for Polvos Elvira G

good morning i would like to ask about photo gallery codes in java...thank you...

Member Avatar for peter_budo
0
50
Member Avatar for GooeyG

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 …

Member Avatar for JamesCherrill
0
12K
Member Avatar for terzenta

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 …

Member Avatar for terzenta
0
119
Member Avatar for jems5

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 …

Member Avatar for jems5
0
154
Member Avatar for santoshkosgi

i wanna create a small game using java....suggest me the best one and guidelies to make it........

Member Avatar for coil
-1
213
Member Avatar for CharbelKahi1

Hi How to know if there is any version of Java installed on the user PC and what revision, using JavaScript thank you Charbel

Member Avatar for scriptWolf
1
288
Member Avatar for Yutxz

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 …

Member Avatar for NormR1
0
303

The End.