32,204 Topics
| |
I get a ArrayIndexOutOfBoundsException. The cause is this snippet: [CODE]public static void main(String[] args) { //command line param try { [B]if (args[0] != null) {[/B] if (args[0].equals("printer")) { printToFile = false; } } } catch (Exception oob) { oob.printStackTrace(); }[/CODE] I don't give the program any parameters when I start … | |
The section of my code that is commented out is what I need help with. I am wanting to check the user input of binary for anything other than a 1 or 0. Also, it will only accept an input of 10 numerical characters or less. I am wondering if … | |
Hi, I'm trying to find a suitable language for developing an RIA to be able to tune an instrument via a website. I.E. what I need is: 1) Live input from a microphone 2) Get the volume level of different frequencies 3) Find the average or loudest frequency 4) Output … | |
I am trying to implement an interface so that the main program would work. Any light? I am having a difficult time trying to understand interface :/ [code] interface ArithmeticOperator { // Returns the result of applying the operator to operands a and b. double operate (double a, double b); … | |
The fact thats it an AVL tree probably doesn't matter. I have a printTree method in my tree class and I'm trying to print the nodes in the form of the tree. I've successfully printed the nodes the correct way but now I'm trying to label the nodes by their … | |
Friends, I hav an application running in system tray.As of now, when I click it,the dialog displays.I want to make this happen by pressing any shortcuts,say,ctrl+Alt+a. Can anyone help on this? | |
Difference between Runnable interface & Thread class?Which one to use, though both seems to be same? As per my knowledge,runnable can be implemented in such a case that already it has some hierarchy -Thanks in advance | |
Write a program that computes the mean and standard deviation for a sample of 1,000 values. Your program will generate the 1,000 values using the Die class and your program must print the computed mean and standard deviation. We shall use the definition for the standard deviation, given in wikipedia, … | |
i am doing MCA ..i have to do my final semester project and i had chosed my language as java with Ajax .. so suggest me project with ur idea regards Karthik | |
this is a problem for electrical circuit. we have a input x and i/o file <number><type> <input1><input2> also a input can be a number of port and the last line is<Y><input> were input is the number of which port we want the result. example of io <1><AND><X><X> <2><OR><X><1> <Y><2> if … | |
My problem statement is to draw a map from the given images whose Latitude and Longitude information is stored in database. Initial point Latitude and Longitude is given and then they will change in every 200 ms. I have to plot a map once and on top of the map … | |
I'm trying make a 2 dimensional array. An array of object. I'm trying to make a 126 by 94 array of green SpotInField objects. [CODE]import javax.swing.*; class FarmField { public static void main(String[] args) { int width = 126; int length = 94; } public void FarmField(SpotInField myField[][], int dwell){ … | |
Hello. Can someone tell me please how can I find out monitor resolution from my Java code? Thanks in advance | |
Well, I would like to know how can i print invoices in java. the page that my printer is using is like a type of template which has already written the fields(like name, address, id and so on). So, what i want to do is to print the data in … | |
[CODE] // imports import java.io.*; // Input stream import java.util.*; // Date //import java.text.*; // SimpleDateFormat class FinalPrep { //** arrays for saving static String firstNameArray[] = new String[0]; static String lastNameArray[] = new String[0]; static float gradeArray[] = {}; public static void main(String args[]){ readInFile(); System.out.println(" Sorted By last … | |
Hi, I want to change the color of a selected jradiobutton in a button group to RED when clicked on it. I am not able to do it make it happen till now. The problem is actually that when I select any jradiobutton the selection spot should stay and get … | |
Hello daniweb, I am new to Java and to this forum! I am trying to put some objects into an array like this.. [code] MovingPlatform[] platforms; platforms = new MovingPlatform[1]; [/code] The problem is that I want to be able to access variables of objects within my array. I have … | |
This is my program [CODE]/////////////////////////////////////////////////////////////////////////////////// // ICS 3U1 - Mrs. Shanks // Asad Choudhry // November 28, 2009 // Family Feud // // This program takes as input the question numbers, the questions, the answers, // and the points. the question number is saved to the questionNumArray, the // the … | |
I have an exam coming up on this unit found in the guide to programming with Java textbook. I was just wondering if someone can provide an algorithm to the following question. 13. a.) Write an algorithm to count the number of words in a sentence. b.) Write an algorithm … | |
can someone please tell me what im doing wrong this code works: [CODE] String r = ""; for(int i =1; i <= rows; i++) { for(int j = 1; j <=columns; j++) { r = r + " _"; r = r + "\n"; } return r; }[/CODE] This code … | |
Hi and I found a script at the below website but appears not to work for me. I'm using the Netbeans IDE and Java Version 6 and the link where I found how to use cookies in Java applets is at [URL="http://www.rgagnon.com/javadetails/java-0180.html"]http://www.rgagnon.com/javadetails/java-0180.html[/URL] However my partial script below (snipped chunky code) … | |
I have a file that goes with a java program, and when the program executes its prints out whats in the data file. But when i try to view the file itself It shows some of the names in the file, and all these weird symbols. How can I view … | |
Hi all, I've been google'ing my backside off in search of a good example/tutorial for java gui's. Could anyone supply me with a link to a website that could supply a tutorial and/or some examples? Would be great, thanks. P.S. I use Eclipse, with no GUI editors, so I need … | |
I need help on my project. This is what I have so far: [CODE]import javax.swing.JOptionPane; public class Convert{ public static void main(String[] args){ String choice = ""; do { choice = JOptionPane.showInputDialog(null, "Would you like to enter a temperature?"); } while(choice.equals("No") | choice.equals("no") | choice.equals("N") | choice.equals("n"));{ choice = JOptionPane.showInputDialog(null, … | |
[CODE]/////////////////////////////////////////////////////////////////////////////////// // ICS 3U1 - Mrs. Shanks // Asad Choudhry // November 28, 2009 // Family Feud // // This program takes as input the question numbers, the questions, the answers, // and the points. the question number is saved to the questionNumArray, the // the question is saved to … | |
I searched for this topic first, because it is pretty popular, but I didn't find much to help. What I was instructed to do was convert a prefix expression to a postfix expression. I have to use a stack and a queue, which is different than many other threads about … | |
Hello all, I have the bluej source code in eclipse, and it compiles fine, but when I try to run it BlueJ starts fine, and then pops up an error window that says that bluej couldn't create a VM. My installed BlueJ has never given me this error before, so … | |
Hi there, this is my first topic to daniweb eventhough I read this forum everyday, well I have a question: I have a task to do, I need to simulate seconds (phone calls), for example if i have 5$ telephone credit, it should do smthing like (credit - talkingSeconds), but … | |
Hey guys im back again with a problem, i am trying to add circles to my board but i cannot do it, i am getting one error. cannot find symbol symbol : variable Col location: class SimpleDrafts g.fillOval(4 + Col*20, 4 + Row*20, 15, 15);? Anyone know the prob?? [CODE] … | |
Database records are returning strings as follows: "Washington%20Report%3A%20Good%20Faith%20Estimate%20Mortgage%20Disclosures" Is there a method that automatically translates those characters...or do I need to set it up? Apparently the %20 is equal to a space and the %3A is equal to ":" thanx in advance |
The End.