32,204 Topics

Member Avatar for
Member Avatar for P00dle

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 …

Member Avatar for P00dle
0
74
Member Avatar for _dragonwolf_

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 …

Member Avatar for parry_kulk
0
703
Member Avatar for samarudge

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 …

Member Avatar for samarudge
0
81
Member Avatar for Samyx

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); …

Member Avatar for javaAddict
0
84
Member Avatar for vtsmokey88

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 …

Member Avatar for vtsmokey88
0
99
Member Avatar for ramjeev

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?

0
50
Member Avatar for ramjeev

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

Member Avatar for ramjeev
0
149
Member Avatar for paperbard

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, …

Member Avatar for ithelp
-1
173
Member Avatar for karthik bhaskar

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

Member Avatar for ithelp
-1
93
Member Avatar for kujta1

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 …

Member Avatar for kujta1
0
84
Member Avatar for gunjannigam

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 …

0
62
Member Avatar for leoeroy

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){ …

Member Avatar for leoeroy
0
645
Member Avatar for Perveance

Hello. Can someone tell me please how can I find out monitor resolution from my Java code? Thanks in advance

Member Avatar for Ezzaral
0
51
Member Avatar for denni2727

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 …

Member Avatar for Ezzaral
0
142
Member Avatar for jko2326

[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 …

Member Avatar for Ezzaral
0
98
Member Avatar for Web_Sailor

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 …

Member Avatar for Ezzaral
0
896
Member Avatar for RichardCrickets

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 …

Member Avatar for RichardCrickets
0
101
Member Avatar for asadc

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 …

Member Avatar for javaAddict
0
709
Member Avatar for TheDLSyrnyk

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 …

Member Avatar for javaAddict
0
128
Member Avatar for Shotty

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 …

Member Avatar for javaAddict
0
77
Member Avatar for cwarn23

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) …

0
92
Member Avatar for jko2326

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 …

Member Avatar for BestJewSinceJC
0
81
Member Avatar for P00dle

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 …

Member Avatar for jbennet
0
376
Member Avatar for gasou

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, …

Member Avatar for gasou
0
634
Member Avatar for asadc

[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 …

Member Avatar for asadc
0
114
Member Avatar for Hanyouslayer

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 …

Member Avatar for Hanyouslayer
-1
998
Member Avatar for sciwizeh

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 …

Member Avatar for llemes4011
0
157
Member Avatar for rinoel

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 …

0
44
Member Avatar for Xav123

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] …

Member Avatar for Xav123
0
112
Member Avatar for mimsc

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

Member Avatar for mimsc
0
258

The End.