32,204 Topics

Member Avatar for
Member Avatar for xshinichix

Can someone help me with my homework? my teacher asked us to create a program that lets the user to input 5 integers and sort it using bubblesort. i have already write the code but its not the output that i expected. heres the code: [CODE] import java.util.Scanner; public class …

Member Avatar for xshinichix
0
200
Member Avatar for Gsterminator

The objective of this program is to create images or shapes by using 2day arrays. I've created the the maximum size in my constructor but my error is in the the rectangle method.This is my error: Hw11.java:60: cannot find symbol symbol : constructor Picture(char[][]) location: class Picture return new Picture(result); …

Member Avatar for JamesCherrill
0
116
Member Avatar for Nahiyan

Hello everyone, I am new to Java but know lot about other programming languages and experienced game developer. As Java is platform independent, we cannot compile it to .exe format and that's where my problem is. Suppose I have created a .java file and compiled it to .class file, then …

Member Avatar for Nahiyan
-1
150
Member Avatar for Sidd_

hi I want to know that i there any leave function in java like the one in c#. what i am trying to do that there is 2 combobox and the list of second combobox depends on the data selected in first combobox. so as soon as the user select …

Member Avatar for masijade
0
137
Member Avatar for churva_churva

[ICODE] import javax.swing.*; import java.awt.*; import java.awt.event.*; public class MainFrame extends JFrame{ JMenuBar main=new JMenuBar(); JMenu menu1=new JMenu("File"); JMenu menu2=new JMenu("Search"); JMenu menu3=new JMenu("Display"); JMenu menu4=new JMenu("About"); JMenuItem exit=new JMenuItem("Exit"); JMenuItem pw=new JMenuItem("Piece Worker"); JMenuItem hw=new JMenuItem("Hourly Employee"); JMenuItem pcw=new JMenuItem("Piece Worker"); JMenuItem hrly=new JMenuItem("Hourly Worker"); JMenuItem author=new JMenuItem("Author"); JLabel …

Member Avatar for churva_churva
0
156
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
967
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
91
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
127
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
612
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
344
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

The End.