1,678 Posted Topics

Member Avatar for Jordan Sinclair

System.out.println("ERROR! FLAGRANT WINDOWS ERROR!! Dunno what you did, mate, but you sure screwed things up over here! You're lucky I don't throw the Blue Screen of DEATH at you!! Now enter a positive number!!!(Greater Than 0)"); //print error message1 Haha. I have to say you have a great sense of …

Member Avatar for BestJewSinceJC
0
153
Member Avatar for TigerGirl
Member Avatar for ryno365
0
87
Member Avatar for knight604

cgeier already showed you how to get input from the user and how to store that value into a variable. And you'd calculate using the get methods, if anything. That's why it's called "get". You can't calculate anything by using a set method, because set methods by definition are there …

Member Avatar for BestJewSinceJC
0
1K
Member Avatar for YingKang

Well, what is the size of your array when it draws two lines next to each other? Is it one, or two? Do some debugging. If the array's size is two, then no wonder it looks like that. If its one, my theory is kaput, but have you even made …

Member Avatar for YingKang
0
824
Member Avatar for calcucool

We're not going to write it for you so show us some effort and explain why you need help/ what exactly you need help with.

Member Avatar for javaAddict
0
106
Member Avatar for verilu

Is your program actually calling repaint? I see no debugging... anywhere.

Member Avatar for nambro
0
110
Member Avatar for BestJewSinceJC

After compiling the code found [URL="http://beej.us/guide/bgnet/output/html/multipage/clientserver.html#simpleclient"]here[/URL], I immediately got a number of errors. (Unfortunately, Beej is the starting point my instructor suggested to implement our FTP client's "minimal" commands, but that's another story). Anyway, I got rid of a few of them, then ran into this: [CODE]client.c:32 - error: storage …

Member Avatar for BestJewSinceJC
0
188
Member Avatar for sridhar123

[url]http://lmgtfy.com/?q=dead+lock+java[/url] That question has been asked and answered. You don't have to look past page one of google to find a sufficient answer.

Member Avatar for BestJewSinceJC
0
36
Member Avatar for sridhar123

If you start the two threads from within the same class I don't see why they wouldn't be able to both access that variable if the variable is a class variable. You could also pass the variable to both threads through some constructor or method, or you could use a …

Member Avatar for BestJewSinceJC
0
53
Member Avatar for Mareshal

You [I]decompiled[/I] them? Implying the source code wasn't yours, and we don't give help with reverse engineering.

Member Avatar for Mareshal
-1
212
Member Avatar for MasterOctopus

Well. . I'm in the U.S., I've had one internship, haven't graduated yet, and accepted 73k starting for when I graduate . . so I guess it depends on how much a Masters degree is worth. But also keep in mind that benefits can mean a whole lot. So if …

Member Avatar for BestJewSinceJC
0
298
Member Avatar for DazednAngry

Yes, and they answered your question already. The reason it isn't working is because [CODE=Java]Node trailer = new Node("","",null, null);[/CODE] is invalid because "" and "" are Strings. You did not write a constructor method that takes two Strings followed by two Nodes. Your constructor takes a double, an int, …

Member Avatar for BestJewSinceJC
0
131
Member Avatar for Logi.

I'm confused - you said you're creating some sort of "binary tree priority queue" but your code looks like it's just intended to be a sorted list of Objects, which are different. Which is it supposed to be? Also, in your sample run, you added a /4 but it doesn't …

Member Avatar for quuba
0
886
Member Avatar for runee1000

If you want to implement the hangman images, you should actually use different images, and simply redraw the appropriate image every turn. (i.e. we did hangman for the iphone in my iphone programming class. You can take the images from [url]http://cs491f09.wordpress.com/2009/10/14/assignment-5/[/url] if you want). Based on how many guesses the …

Member Avatar for BestJewSinceJC
0
134
Member Avatar for superborg

I'd start by booting into safe mode and restoring to before you deleted something you obviously shouldn't have. Then get proper virus removal software and use it.

Member Avatar for Adamsappleone
0
149
Member Avatar for emmybuuz

Haha funny. Read our stickies and go away. Also, while you're wasting our time, shameless plug for anyone to level this -vote out: [url]http://www.daniweb.com/forums/search542099.html[/url] edit: Thanks :)

Member Avatar for peter_budo
-2
58
Member Avatar for jman8877

You can't add slots to an array. It's impossible. You can create a new array with 5 more slots however, and copy in the contents. Although I hope an instructor didn't tell you to do this because it is a bad idea - instead, double the size of the array.

Member Avatar for masijade
-1
97
Member Avatar for theStruggler

[CODE=Java]stringCensor theCensor = new stringCensor(); // a new stringCensor is constructed String censored = ""; // censored is initialized to a null string System.out.print("Enter your string: "); // user prompted to enter the string String whatTheUserPut = input.nextLine(); theCensor.userString(whatTheUserPut); [/CODE] You need to put that entire section of your code …

Member Avatar for theStruggler
0
117
Member Avatar for gibson.nathan

[CODE=Java] CarV5 car1 = new CarV5(String carType1, double endMiles1, double startMiles1, double gallonsUsed1, double pricePerGallon1); { cT1 = carType1; eM1 = endMiles1; sM1 = startMiles11; g1 = gallonsUsed1; ppg1 = pricePerGallon1; }[/CODE] It's because the above code does not have valid syntax. Are you trying to create a method? If …

Member Avatar for BestJewSinceJC
0
218
Member Avatar for jennaNalpak

What is a "website major"? ... Never heard of that one. Anyway, I'll be more specific since I'm feeling nice today, even though Ezzaral gave you more than enough to figure it out. 1. Create two variables - if the user has to be able to enter integers, then use …

Member Avatar for BestJewSinceJC
0
166
Member Avatar for samira1993

Alright, when is the due date though? I need to know if I have enough time to do this as well as my own less important assignments.

Member Avatar for BestJewSinceJC
-1
72
Member Avatar for youngfitz

What does creating an algorithm have to do with C#? I was unaware that algorithms were language specific.

Member Avatar for BestJewSinceJC
0
27
Member Avatar for treyd

Paste us the error with the line number it's occurring on. Once you do so it'll make it easier for us to help you. :)

Member Avatar for BestJewSinceJC
0
164
Member Avatar for StarZ

No, we can't code for you. If you want help ask a detailed question. And if you have no idea at all where to start, start by reading about 2D arrays and think about how they can aid you in creating your "world".

Member Avatar for BestJewSinceJC
0
98
Member Avatar for KirkPatrick

[url]http://java.sun.com/docs/books/tutorial/uiswing/components/combobox.html#renderer[/url] You said javadocs.. have you looked at the swing tutorials though? Using a custom renderer for a JList is done the same way as using one for a combo box, according to those tutorials. I haven't personally attempted it though, and I never will. If you can get the …

Member Avatar for Ezzaral
0
201
Member Avatar for Ravenous Wolf

If you want to create a jar very easily, one way you can do it is by using the Eclipse IDE. To create a jar in eclipse, file-> export -> Jar File (this might be listed under 'java' -> next, and under manifest class you would select the main class …

Member Avatar for shruti123
0
243
Member Avatar for jrosh

Your question has been asked and answered around a thousand times online. If you want the exact code, find it on google. Otherwise read this, it explains the answer. [url]http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html[/url]

Member Avatar for BestJewSinceJC
0
120
Member Avatar for BenOwns

In addition to what raven said, computer graphics is an obvious one. Might want to take GUI programming as well.

Member Avatar for monjes
0
127
Member Avatar for yeungn

So what do you need help with? Have you tried it yet? Try it and post what you've got and we'll help.

Member Avatar for yeungn
0
113
Member Avatar for AnonSurf

nextInt returns an int, you need to store it at some index in your temp array. You didn't specify an index to store it into. temp[0][1] is an index, temp[][] is not.

Member Avatar for BestJewSinceJC
0
119
Member Avatar for tsfaridi

This belongs in a normal thread, not in a code snippet. And I've experienced the same problem in the past, but I did a lot more debugging than you did. For example, when the window is resized, is your paintComponent method called?

Member Avatar for tsfaridi
0
89
Member Avatar for aalice

Nobody is going to do your homework for you. You will only receive help here if you show effort on your assignment.

Member Avatar for BestJewSinceJC
0
94
Member Avatar for shroomiin

Your statement on line 21 does nothing because 'gallons' is 0. Saying gallonsused++ adds one to gallonsused. Inside your while loop, what you want to be doing is saying gallonsused = gallonsused + gallons. (Or, equivalently, gallonsused+=gallons). You also only need to prompt the user for the gallons used once …

Member Avatar for BestJewSinceJC
0
107
Member Avatar for vtsmokey88

You can 'wrap' the array by creating a new Float[] array and then in a for loop, add each float primitive type to the Float array.

Member Avatar for BestJewSinceJC
0
123
Member Avatar for axn

Yes, it works, but like firstPerson said just try it next time. You could also use public static float afp = (float)2.34; //or any decimal value

Member Avatar for BestJewSinceJC
0
303
Member Avatar for ericssionz

Nobody is going to write anything for you. Especially when that description made no sense to begin with. But read the rules and go away.

Member Avatar for BestJewSinceJC
-2
35
Member Avatar for cgeier

[CODE=Java]Character ch = new Character('\u00C3'); char prim = ch.charValue(); System.out.println(prim);[/CODE] Something I just learned how to do after a quick look up in the Character class documentation. I'm sure if you read some stuff yourself and try some things out, you'll find many more useful methods. [url]http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Character.html[/url]

Member Avatar for cgeier
0
2K
Member Avatar for shakunni

I already provided an answer in the thread you made in the Java forum. But logically n! < n^n and log(n^n) = n log n.

Member Avatar for SebKom
0
99
Member Avatar for RejectKid

They're being removed because you said [CODE=Java]if(Balls.get(X).intersects(Balls.get(Y)) == false) { Balls.remove(X); }[/CODE] That doesn't make logical sense to me. It should be if that == true, then remove one. It's going to be false almost all the time. Your statement removes X every time X and Y [I]don't[/I] intersect, whereas …

Member Avatar for quuba
0
235
Member Avatar for lllllIllIlllI

No, I've never played. I prefer simple games like connect four :) And apples to apples is a very fun "relaxed" drinking game

Member Avatar for ddanbe
0
46
Member Avatar for ki72

In addition to what Peter said, you might find some of the responses here helpful: [url]http://www.daniweb.com/forums/thread232056.html[/url]

Member Avatar for peter_budo
0
155
Member Avatar for rjay_lolerzz

For continuously doing [I]anything[/I] you can use a while loop. Look into the Scanner class for reading in user input. Use System.out.println to provide them with a prompt where they can say whether or not they want to continue. And for insuring that values are Integers, you can look at …

Member Avatar for peter_budo
0
245
Member Avatar for Tenchi

Tenchi, your problem with the nextLine() not working is the same problem I recently explained to another user on Daniweb. I'll paste my response to him here since the problem you have is exactly identical. "The reason it gives you trouble is because when the user enters an integer then …

Member Avatar for ithelp
0
316
Member Avatar for Hiroshe
Member Avatar for SVR
0
185
Member Avatar for why1991

Because q+3 is longer than the total length of your rS array. You cannot access an array at an index longer than it's largest index. This is probably because your 'max' variable isn't a good indicator of rS's length (you are using 'max' as a bound on how large q+3 …

Member Avatar for BestJewSinceJC
0
194
Member Avatar for jen140
Member Avatar for jen140
0
406
Member Avatar for Alex_is

You need a for loop, not an if statement. [url]http://java.sun.com/docs/books/tutorial/java/nutsandbolts/for.html[/url] You need to declare two integer variables outside of your for loop. One to keep track of the total amount of money earned, and one to keep track of the amount you need to add next time. For example, the …

Member Avatar for BestJewSinceJC
0
94
Member Avatar for senthil12345

What is your question? You didn't specify any portion of the code that you want us to look at. Do you just want us to give you random number generating techniques in general, because for that, you can use google.

Member Avatar for BestJewSinceJC
0
128
Member Avatar for kekkaishi

In actionPerformed, you create a new "Login", [I]not[/I] a new "Log". Why didn't you post your Login class? (Post it :) ) PS: It seems to me from the way that you created a new "Login" and then called a method identical to one I see in the Log class, …

Member Avatar for kekkaishi
0
1K
Member Avatar for ylchen

No guarantees, but I read through this thread and it might shed some light. Of course, it is a C++ thread, but it is on the same exact topic (the OP there also claims the clock is always returning 0). One of the suggestions there is to try to increase …

Member Avatar for ylchen
0
91

The End.