Search Results

Showing results 1 to 40 of 1000
Search took 0.07 seconds.
Search: Posts Made By: BestJewSinceJC ; Forum: Java and child forums
Forum: Java 1 Day Ago
Replies: 1
Views: 86
Posted By BestJewSinceJC
This is going to sound stupid but did you try to open it as plain text... like in wordpad? (Or you can do so in other editors). And what is the file extension? Like .txt for example or .java
Forum: Java 1 Day Ago
Replies: 3
Views: 110
Posted By BestJewSinceJC
Read the rules pertaining to "we only give homework help to those who show effort", then come back and post something that shows effort. And no, it does not matter whether this is homework or not....
Forum: Java 1 Day Ago
Replies: 4
Views: 119
Posted By BestJewSinceJC
Your program isn't going to work. In your method celciusToFarenheit, you tried to compare with "if degree == c". However, if you look at this link...
Forum: Java 1 Day Ago
Replies: 2
Views: 80
Posted By BestJewSinceJC
Your error indicates that you attempted to parse an integer at line 128 of your program (which is correct: it says Integer.parseInt(input)). However, the program was unable to parse an int, because...
Forum: Java 1 Day Ago
Replies: 5
Views: 151
Posted By BestJewSinceJC
For specific components see here: http://java.sun.com/docs/books/tutorial/uiswing/components/index.html

(for example, if you want to use a button in your app, look there to see how, or if you want...
Forum: Java 1 Day Ago
Replies: 3
Views: 125
Posted By BestJewSinceJC
Both pieces of code say they work above the code. Which one doesn't work? The second one? And can you please fix your bracketing, I can't tell which brackets go with what. The brackets should be...
Forum: Java 2 Days Ago
Replies: 7
Views: 152
Posted By BestJewSinceJC
"I am no longer able to parse the string for input into text..."

Huh? The JTextField class has a getText method. If you call myJTextField.getText() it will return a String. "Text" and "a String"...
Forum: Java 2 Days Ago
Replies: 2
Views: 181
Posted By BestJewSinceJC
Did you even look at his code? The problem is obviously with the way he is reading in the text file.

@OP:

Scanner's next() method reads in input between the delimiter pattern, which by default...
Forum: Java 2 Days Ago
Replies: 5
Views: 139
Posted By BestJewSinceJC
As for S.o.S's reply, you would expect it to infinitely loop, since you want to continuously check the file for updates. In other words it is supposed to infinitely loop so I don't see why you have...
Forum: Java 2 Days Ago
Replies: 11
Views: 223
Posted By BestJewSinceJC
You should only extend a class if you need to add functionality to the class (or modify the class's functionality so that it does something different). I doubt that you need to do either of those...
Forum: Java 2 Days Ago
Replies: 7
Views: 152
Posted By BestJewSinceJC
Post your best shot at doing this and I'll help. P.S. your code you already posted doesn't make sense; why would you say do... while(false)? That's only going to do something once, and if you want to...
Forum: Java 2 Days Ago
Replies: 2
Views: 119
Posted By BestJewSinceJC
Are you trying to manually do a character by character search to match words? That is a mistake. Technically it could work but the amount of effort would be enormous and fruitless. I see that your...
Forum: Java 4 Days Ago
Replies: 7
Views: 238
Posted By BestJewSinceJC
And also make sure to read about Classes in Java and Objects in Java. int, double, float, boolean, long, short, etc can not use method invocations ( like someInt.someMethod() ) because they are not...
Forum: Java 7 Days Ago
Replies: 6
Views: 251
Posted By BestJewSinceJC
SWT was created for faster native widgets - it is faster because it uses the OS's native tools to draw the widgets, essentially. However, Swing should be plenty fast for most any purposes, and I...
Forum: Java 7 Days Ago
Replies: 2
Views: 165
Posted By BestJewSinceJC
So. . are you simulating this process by creating threads on your local machine? Or are you actually using multiple machines and communicating with some master-server that acts to combine the results...
Forum: Java 9 Days Ago
Replies: 5
Views: 261
Posted By BestJewSinceJC
No, I don't think there are non-trivial ways to do it with a standard grading system, other than the obvious ways which have been listed in this thread already. I don't understand the system you...
Forum: Java 9 Days Ago
Replies: 2
Views: 194
Posted By BestJewSinceJC
It sounds more logical the way you have it - for example, to have the game class keep a list of what Objects are currently showing on screen, then when the player wants to attack, you can call...
Forum: Java 14 Days Ago
Replies: 2
Views: 373
Posted By BestJewSinceJC
www.eclipse.org
www.netbeans.org (or is it com?)
google
Forum: Java 16 Days Ago
Replies: 5
Views: 199
Posted By BestJewSinceJC
The StringTokenizer class documentation says its use is discouraged in new code and to use String class's split method instead.

And you cannot cause a String to be evaluated as if it was a piece...
Forum: Java 16 Days Ago
Replies: 1
Views: 188
Posted By BestJewSinceJC
If you have a file full of ints then you would just use

while(scanner.hasNextInt())

You would not use scanner.hasNext() and then the if statement, that is an extra unnecessary step. You could...
Forum: Java 16 Days Ago
Replies: 7
Views: 337
Posted By BestJewSinceJC
Your LoadStudents method doesn't make sense to me. You said while(s.hasNextLine()) but you never read anything in, so I'd think that would be an infinite loop. Additionally, you kept adding a new...
Forum: Java 16 Days Ago
Replies: 2
Views: 191
Posted By BestJewSinceJC
There is no reason you'd ever pass "this" as an argument. "this" just refers to the Object of the classtype that you are currently in. So if your class name is Car, and you say "this." anywhere...
Forum: Java 19 Days Ago
Replies: 7
Views: 480
Posted By BestJewSinceJC
If you use Java's built in Stack class and Queue class, you can simply call the appropriate methods to add the items on and take them off. For both of them, to add an item on, you probably just use...
Forum: Java 20 Days Ago
Replies: 7
Views: 480
Posted By BestJewSinceJC
abccba

if you add each letter in order to the stack and the queue, here is the final stack and queue (in the order they would be popped off)

1. abccba
2. abccba

But looking at something...
Forum: Java 20 Days Ago
Replies: 1
Views: 228
Posted By BestJewSinceJC
I haven't worked with Applets, but I think they work the same way as Swing basically? (Edit: confirmed - one whole point of JApplet is that it works with Swing). Use a JPanel or whatever the standard...
Forum: Java 22 Days Ago
Replies: 2
Views: 144
Posted By BestJewSinceJC
Post your relevant code and tell us what part you're having trouble with. If your problem is not knowing enough about Timer and Threads, then read google. We'll be happy to help you with specific...
Forum: Java 22 Days Ago
Replies: 2
Views: 257
Posted By BestJewSinceJC
In your PM, you asked "where should I implement the check condition". Typically do not PM daniweb members, keep questions to the threads. But I will answer anyway.

After each turn, you will need...
Forum: Java 22 Days Ago
Replies: 2
Views: 410
Posted By BestJewSinceJC
http://www.csee.umbc.edu/courses/undergraduate/341/fall08/projects/proj5/HuffmanExplanation.html

That article explains the entire process, in detail, and it is the only resource needed to...
Forum: Java 23 Days Ago
Replies: 2
Views: 257
Posted By BestJewSinceJC
Check is extremely simple actually. If any piece can currently move to the king's position, then the king is in check. Since you already have to implement the ability to allow players to move any...
Forum: Java 23 Days Ago
Replies: 7
Views: 183
Posted By BestJewSinceJC
Yes but what is the close method supposed to do?
Forum: Java 23 Days Ago
Replies: 9
Views: 246
Posted By BestJewSinceJC
Sorry, I just edited my post. Confirm the last part for me?
Forum: Java 23 Days Ago
Replies: 9
Views: 246
Posted By BestJewSinceJC
A binary search should eliminate half of the items each time a search is done. You can think of it similar to a dictionary. The way a binary search program would look up a word in the dictionary is...
Forum: Java 23 Days Ago
Replies: 8
Solved: ComboBox
Views: 237
Posted By BestJewSinceJC
Cool. Mark the thread as solved please.
Forum: Java 23 Days Ago
Replies: 9
Views: 246
Posted By BestJewSinceJC
I think bucket sort or radix sort is supposed to be the best for that, but I don't remember the argument there, so look into it those topics.
Forum: Java 23 Days Ago
Replies: 1
Views: 173
Posted By BestJewSinceJC
The last part is definitely wrong. digit % 10, if digit = 245, will be 5. But digit never gets modified there, so your program will run forever. What you should be doing is using a combination of %...
Forum: Java 23 Days Ago
Replies: 8
Solved: ComboBox
Views: 237
Posted By BestJewSinceJC
Did you add the helpMenu to your JPanel? You didn't provide enough code to see what's going on. The method you posted looks fine but I'm not sure if you ever added the helpMenu (that was returned) to...
Forum: Java 23 Days Ago
Replies: 7
Views: 183
Posted By BestJewSinceJC
Again, that depends on what you mean by 'closing an account'. Typically you'd close an account by removing all the money from it, i.e. withdrawing all money from your bank account, then just deleting...
Forum: Java 23 Days Ago
Replies: 8
Solved: ComboBox
Views: 237
Posted By BestJewSinceJC
if e.isSelected makes no sense because you already know which item is selected, and you already know that it's selected because otherwise the actionPerformed method wouldn't have been called. And if...
Forum: Java 23 Days Ago
Replies: 7
Views: 183
Posted By BestJewSinceJC
What is a consolidated account? Just an account under both names? What do you have to do to 'make an account consolidated'?
Forum: Java 23 Days Ago
Replies: 8
Solved: ComboBox
Views: 237
Posted By BestJewSinceJC
What is subpanel? Up till line 9 your code seems ok to me, after that I have no idea what you are trying to do.
Showing results 1 to 40 of 1000

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC