32,199 Topics

Member Avatar for
Member Avatar for Danii

example if (...){ return 0; } else (...){ return 1; } that do they mean? thnaks in advance

Member Avatar for masijade
0
671
Member Avatar for btsuper

Hi everybody, I've been working with gui recently, and I need help with my JButtons. I need to figure out how to set a button on the keyboard to click that JBUtton. I.e. When i hit the enter key it picks say the third button on the list or something …

Member Avatar for btsuper
0
1K
Member Avatar for cassyjack

I need a little help. Here are the specs: Create a method called findLargest, which takes an array of integers as an input parameter and returns the array index of the largest integer in the array. If there are positions that are tied for largest, the method should return the …

Member Avatar for rosellejane
1
712
Member Avatar for soUPERMan

Hello, I wanna write a method that recieves an argument of type String which is a mathematical expression in infix mode, then change it to postfix and store in a queue and return the queue...how do i go about that?? I have created so far a Queue class, Node class.

Member Avatar for lucky_Username
0
958
Member Avatar for garu525

Hello, I'm starting to learn Java and this one of my homework but for some reason it won't run. My algorithm is to just add all 1-1000. I highlighted the part that's causing a problem in red. Please help, thanks! [CODE] import java.util.*; public class thousand { static final Scanner …

Member Avatar for garu525
0
157
Member Avatar for Translucentbill

Okay so I almost have my entire game of Yahtzee finished I just have one question that I need help with. What would be the most efficient way to figure out if the user has a 3 of a kind, yahtzee, full house etc? Basically just the bottom section of …

Member Avatar for ztini
0
170
Member Avatar for priyanka24

I am using junit in eclipse for testing.While creating test suite I want to upload the data or the class name from excel file.Like in the given example I want to upload TrialTest.class and DivisionTest.class from an excel file. @Suite.SuiteClasses( { TrialTest.class,DivisionTest.class }) Please suggest me a code for this.

Member Avatar for priyanka24
0
90
Member Avatar for Geowil

'Lo everyone, I am having some pretty frustrating issues that I can not seem to get rid of. The main goal of my program is to make a GUI with buttons that trigger custom events. [quote] C:\Java Tests>javac JGUITest.java JGUITest.java:13: cannot find symbol symbol : class ButtonHandler location: class LabelFrame …

Member Avatar for Geowil
0
277
Member Avatar for FireBlah

I have to write a very simple code (GUI code) and my last buttons are supposed to be in the middle at the bottom of the frame. Well, they are not in the middle. They are at the bottom but on the left side of the frame. /* I called …

Member Avatar for Katana24
0
126
Member Avatar for kim.beaul

Please help, I have only been using Java 2 weeks. I am to ask the user how many columns he wants and then print an ascii table in that many columns. So far I can get the program to print the ascii table in one column. How do I specify …

Member Avatar for gazzatav
0
168
Member Avatar for libathos
Member Avatar for ztini
0
163
Member Avatar for ttchiwandire

Hie guys, I've been missing in action for quite some time. Today am back with a problem to do with the creation of an HL7 message in java. I'm using Eclipse and Java, and I've been researching about sending HL7 messages from my java application but dont seem to be …

Member Avatar for ztini
0
449
Member Avatar for 20pav08

Hi, guys. I am all new to java. Wondered if someone could help me please. Basically what I am trying to achieve is: when the button is pressed then content of textfield1 in class1 is copied to textfield2 in class2. I would know how to do this in vb but …

Member Avatar for Akill10
0
98
Member Avatar for JavaHelpNeed

Below Is The Love Program Written in c++, I tried it writing with Java But, didnt understood to Do. WIll Anyone Help me Please [CODE=c++]#include<iostream.h> #include<conio.h> #include<string.h> #include<ctype.h> int FindPER(char [],int); void main() { int len,i,PER; char n[100],sen[200]; clrscr(); cout<<"\n Your Name>"; cin>>n; strcpy(sen,n); strcat(sen,"LOVES"); cout<<"\n Your Partners Name>"; cin>>n; …

Member Avatar for javaAddict
0
303
Member Avatar for spencer.kindt

I feel like I'm really close... I'm supposed to have some other things configured and use JOptionPane... but I can't get the numbers to output correctly... [CODE]import javax.swing.JOptionPane; public class M3_2E5 { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub //declare variables …

Member Avatar for spencer.kindt
0
280
Member Avatar for banks2140

I keep getting errors saying that the scanner statement is not a statement. I am also getting more errors such as, expecting ";" on the scanner line and that my celsius statement which does the math to convert Celsius into Fahrenheit. I need help correcting these errors [CODE]import java.util.*; import …

Member Avatar for jon.kiparsky
0
610
Member Avatar for shiv0013

i have written a file transfer program through multicast. i will send the file size and start transferring by dividing the file into packets. i will calculate the bytes received and compare it with the file size. in this case it works fine. but if there is any packet loss …

Member Avatar for shiv0013
0
60
Member Avatar for pavan146

I am using junit in eclipse for testing.While creating test suite I want to upload the data or the class name from excel file.Like in the given example I want to upload TrialTest.class and DivisionTest.class from an excel file. @Suite.SuiteClasses( { TrialTest.class,DivisionTest.class }) Please suggest me a code for this.

0
43
Member Avatar for nallasivam25

**i'm having the problem of capturing all the coordinate value of pixels while dragging with the mouse using mousedragged event in java** while i'm dragging slowly i'm able to get all the coordinate value of pixels but when i'm doing it fast i'm getting only one third of the pixel …

Member Avatar for JamesCherrill
0
342
Member Avatar for sj5536

hi, i created project in java using eclipseIDE now the project is completed i have to create executable of that project that means i have to install that project on client side how should i do thanx

Member Avatar for stultuske
0
93
Member Avatar for tracydo

[I]Hi, I'm just 2 weeks into computer science 1. New to the world of java. I'm working on the Monthly Mortgage Payment program and having some problems that I don't know how to fix. Any help greatly appreciated! I'm using JEdit & Terminal on imac. Thanx.[/I] [code]import java.text.*; //for Decimal …

Member Avatar for FireBlah
1
159
Member Avatar for Taimoor Rana

Hello guys, I'm currently working on a project that simulates a projectile motion. So far I'm preparing the flowchart of the program. I'm stuck when it comes to designing the path([B]2D Line[/B]) of the projectile Motion. So my question is, what fields,methods my class need in order to draw (in …

0
175
Member Avatar for kangkan_14

How to read only integers from a file in java? Suppose the file has something like this: (14,2,3),(2,3,4) (2,6,78) Now I want to read only the integers not the brackets and commas.How do I do it?

Member Avatar for ztini
0
3K
Member Avatar for Darren76

[LIST=1] [*]import java.util.Scanner; [*]public class retailPrice { [*]public static void main (String[]args) { [*]Scanner input = new Scanner(System.in); [*]double wholesale, markup, retail=0; [*]System.out.println("Enter the wholesale price! "); [*]wholesale = input.nextDouble(); [*] [*]System.out.println("Enter the markup percentage! "); [*]markup = input.nextDouble(); [*] [*]calculateRetail(wholesale, markup, retail); [*]System.out.printf("The retail price of the item is …

Member Avatar for ztini
0
159
Member Avatar for robbio87

Hi, I've recently started learning java in college. Hoping someone can throw me a bone. I was give an assignment to make a method to reverse a sentence. I can only use loops, if statements and other methods(no arrays). For example "Hello there how are you" would be output as …

Member Avatar for ztini
0
217
Member Avatar for kxpatel29

Requirement 1) Modify the code to find and print sum of the same series from 1/2 through 1/n multiple times, where each n is read from data file. Requires nested loop with the inner loop summing up series and outer loop allow inner code to repeat once for each n …

Member Avatar for kxpatel29
0
177
Member Avatar for agent7

hi guys, how can i insert image in a doc file ?? using java... is fileoutputstream can write image? thankz...

Member Avatar for agent7
0
75
Member Avatar for kukuruku

Hi I need help with bubble sort ,Why doesnt work Thanks [CODE] public void printList(){ System.out.print(patientsList.get(0).getFirstName()); for(int i=0;i<patientsList.size();i++){ for(int j = 0; j < patientsList.size(); j++){ for (int b=(j+1);b< patientsList.size(); b++){ int first=patientsList.get(j).getPriority(); int second=patientsList.get(b).getPriority(); if(first>=second){ int temp=first; first=second; second=temp; } } } String fname = patientsList.get(i).getFirstName(); String lname = …

Member Avatar for BestJewSinceJC
0
102
Member Avatar for tracydo

Hi there! So I did this yesterday in class using Grasg, every thing is good. But when i go home and re-do again using JEdit & Terminal cause I'm using Mac. And keep having 1 error that I can't fix, please help! Thx //Lab 2- Find Monthly morgage Payment //File: …

Member Avatar for BestJewSinceJC
0
115
Member Avatar for Torm7311

I am in the process of taking my first java programming class, and this question may be simple for some of you. Here is the question.. Write an application that reads five numbers between 1 and 30. For each number that is read, your program should display the same number …

Member Avatar for Torm7311
0
167

The End.