32,199 Topics

Member Avatar for
Member Avatar for ASIWYFA

Hi, I have recently started Java in my course and I have been asked to write a program that finds the sum and average of 5 numbers. Its very close to working correctly but I cannot see where I am going wrong. Code: [CODE]import java.util.Scanner; public class average { static …

Member Avatar for ASIWYFA
0
421
Member Avatar for sirlink99

I have an error when I add in another ball. The colors are the same how would it be possible to change the colors of the balls seperately when they are on the same screen. When I added the other ball in when one hit the edge the second one …

Member Avatar for Ezzaral
0
208
Member Avatar for hatux

Hello there I am new to my coding career :) and have been facing a slight problem over here I want to read a folder\s files and have tried countless ways of accessing the directory but keep getting my code's error message. Please have a look and guide me if …

Member Avatar for hatux
0
147
Member Avatar for jemimaloh

Hey. I've got a programme that processes the files in a given directory. However, it can only run those files if the programme itself is saved in the same directory. The error i am experiencing now is that once my programme runs, it also generates a class file which also …

Member Avatar for jemimaloh
0
115
Member Avatar for TahoeSands

I love to play Poker and Blackjack online and I would like to duplicate how one of these casinos displays chips on the screen. We have all see this type of button before... An image of a $1 chip is shown at the bottom of the screen. As we mouse …

Member Avatar for kramerd
0
90
Member Avatar for noneta

hi all,, i really don`t know what its wrong in my code ,,, what i want its the user print the sentence and the program count eash sentence and devide it here is my code,,hope u help me :) [code]import javax.swing.*; public class tracing { public static void main(String args[]) …

Member Avatar for Ezzaral
0
127
Member Avatar for jliao20

For the parser class, I need to use parseProgram() to take a filename as a parameter, opens and read the contents of the file, and returns an ArrayList of Statement objects. Since I am new to Java, I do not know where to start from. I also like to know …

Member Avatar for jon.kiparsky
0
156
Member Avatar for indrasmission

can any one please tell how to write a text editor program in java for running and compiling of any given program

Member Avatar for indrasmission
0
103
Member Avatar for Simes

This is an assignment I am working on for uni and I have done quite alot by myself and with some hints along the way from others who know Java better than I do. So I am working on a GUI Traffic Simulator (creating the GUI and drawing it is …

Member Avatar for Simes
0
179
Member Avatar for lilsmurf

No matter what I enter in for my amounts, it always tells me that the total is 13. Here is my code: [CODE] String input = ""; int month = 1; int year = 0; int total = 0; double average = 0.00; int inches = 0; int rainfall = …

Member Avatar for stultuske
0
81
Member Avatar for samehere

is there any surce code to display an image in a dialog box in java pls solve this.........

Member Avatar for masijade
0
148
Member Avatar for bonett09

Hey guys, I'm working on an assignment which requires me to have one of my constructors to have parameters though I get an error in "Car c2 = new Car();" that it cannot find symbol. Also I am required to enter the necessary get and set methods to be able …

Member Avatar for kramerd
0
144
Member Avatar for incubus9x9

Ok so this code works great with an if else statement but i dont why when i change the showMenu to a switch statement you cannot see my print out statement as a menu!? Iv tried different ways of writing the print outs and they havent worked at all. Also …

Member Avatar for incubus9x9
0
140
Member Avatar for anshulbatla

hi i m the beiggner of java i wanna to learn the jdbc with sql ,suggest me the popular sites for it

Member Avatar for Ezzaral
0
30
Member Avatar for blknmld69

Good Morning, Having a problem with my program not calculating. I have wrote a program CashRegisterA Class that should be used with the RetailItem Class. The CashRegisterA Class should stimulate the sale of the retail item. It should have a constructor that accepts a RetailItem object as an argument. The …

Member Avatar for blknmld69
0
1K
Member Avatar for FallenPaladin

Hi there, I am having some syntax and logical implementation problems with a really very simple requirment and I am hopeing someone can help point me in the right direction. The problem I am having concrens trignometric functions in 3d space and what I am trying to do is find …

Member Avatar for FallenPaladin
0
187
Member Avatar for pareshverma91

my apologies for putting up this thread here, but couldn't find an apt section. I am beginner in java and would like to use netbeans as ide. I hava a few doubts regarding the ide. ---is it possible to write a single file of code, i mean, normally a whole …

Member Avatar for PatrixCR
0
112
Member Avatar for LianaN

Hi! I have a problem with the array of JTextField components. So, the code is shown below and it can be successfully compiled: [CODE] txtAdminTextFields = new JTextField[nrOfCols]; ... tableAttributes.getColumnModel().addColumnModelListener(new TableColumnModelListener() { public void columnMarginChanged(ChangeEvent e) { for (int i=0; i < nrOfColsFin; i++) { txtAdminTextFields[i] = new JTextField(); txtAdminTextFields[i].setPreferredSize(new …

Member Avatar for JamesCherrill
0
322
Member Avatar for praneil2050

hello, this is my 1st post.. i have created free sms service using html for my website. And now i want to make its java app for mobile phones. Following r the screens when app is started 1st screen: when app is launched, it should compulsory send message to certain …

Member Avatar for cale.macdonald
0
214
Member Avatar for sirlink99

[code] // The "ChoseYourOwnStory" class. import java.awt.*; import hsa.Console; public class ChoseYourOwnStory { static Console c; // The output console public static void main (String[] args) { c = new Console (); String start = ("yes"); // assignment 1 while (start.equals ("yes")) { c.println ("A high ranking thug comes walking …

Member Avatar for kramerd
0
108
Member Avatar for lilsmurf

When I try to run my program, it lets me enter in the beginning balance, interest rate, and number of months. However, when it hits the for loop, it completely skips over everything inside of it and prints out the amount that was entered for the starting balance. Can someone …

Member Avatar for cale.macdonald
0
85
Member Avatar for AaronLLF

I get an error in the Eclipse console when trying to run a first person camera using LWJGL & Java. "Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path" I did include the jar's for libraries and I did add the VM argument -Djava.library.path=C:\lwjgl-2.5\native\windows\ Please help.

Member Avatar for FallenPaladin
0
330
Member Avatar for joshianurag18

hi all i need urgent help.Thanks in advance. i have java code on windows and some files in unix server. I just want to read that file from unix server and apply my business logic. I have approch for that like first using FTP i will take a copy of …

Member Avatar for kramerd
0
134
Member Avatar for XxPKMNxX

Being a noob, such a simple question i answered as soon as i posted :| - delete thread please.

Member Avatar for XxPKMNxX
0
96
Member Avatar for Christ90

Hi, i want to try to make a program that reads from file and shows the frequency of the words in that file. I want to sort the frequency of the words acsending. But this i want done after it has been read from the file using a Comparator. Anyone …

Member Avatar for kramerd
0
130
Member Avatar for miraj0072004

hello friends, I am making a GUI for a certain fill up form using netbeans..here I need disable a "next" button until all the text fields are filled up...I have tried writing a method that which is called during every keypress event in a text box that checks whether the …

Member Avatar for javaAddict
0
253
Member Avatar for joshianurag18

Hi, I am getting this error. "org.apache.commons.net.MalformedServerReplyException: Could not parse response code." after this line...ftp.connect(ftpHost.getHostName(), 22); Please help me. Thanks, Anurag

0
73
Member Avatar for sixdegreesunder

Hi everyone, I'm new to java. I'm getting an error cannot find symbol m_weapon when i compare char which i assigned from math.random. Thank you, [CODE]public class RPS { public static void main (String[ ] args) { Scanner console = new Scanner(System.in); //used to gather user input System.out.println("WELCOME \n\n"+ "This …

Member Avatar for kramerd
0
215
Member Avatar for jaymozart

[CODE] import java.io.*; import java.util.*; import javax.swing.JOptionPane; public class A15 { public static void main(String[] args) { if(args.length != 1) { JOptionPane.showMessageDialog(null, "Error: Enter one command line argument."); } else { try { String[] array = LeeJungBum15.readFileReturnWords(args[0]); // read file sortAndPrintArray(array, args[0]); // sort alphabetically and print the arrays } …

Member Avatar for jaymozart
0
165
Member Avatar for guru_tech

Well i can see lot of career related questions are posted here So i thought i could contribute something for youth. with more than 5 years of Experience in above subjects I have decided to take classes. Location : Mumbai . Subjects: C Java: Java Basic. Advance Java. C#. VB …

Member Avatar for masijade
0
189

The End.