32,199 Topics
| |
example if (...){ return 0; } else (...){ return 1; } that do they mean? thnaks in advance | |
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 … | |
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 … | |
| 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. |
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 … | |
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 … | |
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. | |
'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 … | |
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 … | |
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 … | |
Hi, i want to open a htm file ,with an application in java.how can i do that? | |
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 … | |
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 … | |
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; … | |
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 … | |
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 … | |
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 … | |
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. | |
**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 … | |
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 | |
[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 … | |
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 … | |
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? | |
[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 … | |
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 … | |
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 … | |
hi guys, how can i insert image in a doc file ?? using java... is fileoutputstream can write image? thankz... | |
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 = … | |
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: … | |
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 … |
The End.