32,204 Topics
| |
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 … | |
| 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); … |
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 … | |
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 … | |
[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 … | |
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 … |
The End.