Search Results

Showing results 1 to 40 of 66
Search took 0.03 seconds.
Search: Posts Made By: jasimp ; Forum: Java and child forums
Forum: Java 26 Days Ago
Replies: 4
Views: 421
Posted By jasimp
The way your totalCost() method is now makes sense except for double finalCost = stickerPrice - (1 - stickerPrice*discount);//why are you subtracting from 1??

If you are going to be multiplying by...
Forum: Java 26 Days Ago
Replies: 4
Views: 421
Posted By jasimp
A lot of commenting is a good thing, its a great habit to have, because it helps others read your code and makes it more organized when you have very large projects, comment away.

final cost is...
Forum: Java 28 Days Ago
Replies: 7
Views: 383
Posted By jasimp
What errors? I don't see any in the code. However you do declare DISCOUNT_ONE DISCOUNT_TWO and DISCOUNT_THREE in your main method, which you don't need because they are used in declared in...
Forum: Java 29 Days Ago
Replies: 7
Views: 383
Posted By jasimp
Alright, lets go through what you need to output step by step.

You want to output the original price of the item, which works, although I would change public static void calculatePrice(double...
Forum: Java Oct 11th, 2009
Replies: 10
Views: 559
Posted By jasimp
Not really lol. I never had to integrate them with webpages, I just had to make some for a class once. I'm sure someone else around here will know.
Forum: Java Oct 10th, 2009
Replies: 10
Views: 559
Posted By jasimp
Read the Java tutorial on applets, here (http://java.sun.com/docs/books/tutorial/deployment/applet/getStarted.html). You are missing a key method every applet needs.
Forum: Java Sep 23rd, 2009
Replies: 5
Views: 319
Posted By jasimp
The caps are unnecessary, don't use them.

Secondly, there is nothing wrong with the code, it works perfectly, what you have is a logic error. The problem is in your line
System.out.println(a);...
Forum: Java Sep 22nd, 2009
Replies: 4
Views: 434
Posted By jasimp
Your link doesn't work, you have an extra http://

Here (http://java.sun.com/docs/books/tutorial/uiswing/components/combobox.html) is a working version of your link :)
Forum: Java Mar 22nd, 2009
Replies: 19
Views: 868
Posted By jasimp
In addition to what James has said; if you want to be able handle more than one client you will need to create a thread for each client that connects.
Forum: Java Mar 20th, 2009
Replies: 3
Views: 919
Posted By jasimp
When I made a chat application I had the same problem. If you had googled a little harder you could have found this solution.
//incoming is the JTextField that displays the conversation
//doc is a...
Forum: Java Mar 16th, 2009
Replies: 2
Views: 1,575
Posted By jasimp
boolean display = A.B(inputInfo);

The return statement you used is legal. You can return false, true, or a boolean variable when using a boolean method. When you call A.B() that line of code...
Forum: Java Mar 16th, 2009
Replies: 11
Views: 1,258
Posted By jasimp
Why would you do this in your GeometricObject class? Just create a driver class, here's the one I made.
public class Tester {
public static void main(String[] args) {
Triangle tri = new...
Forum: Java Mar 16th, 2009
Replies: 11
Views: 1,258
Posted By jasimp
If all that code is one Java file than that could be the problem. I separated each class GeometricShape, Triangle, Isosceles, Equilateral, into it's own file and had no trouble running a driver class...
Forum: Java Mar 16th, 2009
Replies: 7
Views: 2,328
Posted By jasimp
Easy is relative, what might be easier for some could be really hard for you.
Google StringTokenizer examples, read the API and then start writing some code. When you have shown some effort come...
Forum: Java Mar 15th, 2009
Replies: 11
Views: 1,258
Posted By jasimp
It doesn't help because you just threw code at the OP, didn't offer any explanation to what you changed and didn't even show what you fixed. You should point the OP in the right direction instead of...
Forum: Java Mar 15th, 2009
Replies: 11
Views: 1,258
Posted By jasimp
public Triangle(double s1, double s2, double s3)
{
this.side1=s1;
this.side2=s2;
this.side3=s3;
}



public Isosceles( double EQside, double otherside)
Forum: Java Mar 13th, 2009
Replies: 3
Views: 485
Posted By jasimp
Your code doesn't even attempt to write to a file. It only reads. Try to write to the file and if you're stuck, show us your new code.
Forum: Java Mar 11th, 2009
Replies: 15
Views: 990
Posted By jasimp
I personally recommend Head First Java.
Forum: Java Dec 26th, 2008
Replies: 37
Views: 1,693
Posted By jasimp
It is important, that is why I agree that IDE's should not be used when first learning a language. But my point was certain IDE's can, if you truly want to learn, help you learn common method...
Forum: Java Dec 26th, 2008
Replies: 37
Views: 1,693
Posted By jasimp
While I do agree with your post in its entirety I think using certain IDE's, such as Eclipse, can be very useful in learning the API. In Eclipse, whenever you access a method, it gives you a summary...
Forum: Java Dec 25th, 2008
Replies: 37
Views: 1,693
Posted By jasimp
Uhh... how is this helpful?

I'm sure your book must show you examples of constructors, private methods and their uses. Anyways a private method is a method that can only be used in the containing...
Forum: Java Dec 21st, 2008
Replies: 13
Solved: Sudoku Logic
Views: 1,045
Posted By jasimp
If you're sleeping polyphasically that could be to much sleep :)
Forum: Java Dec 18th, 2008
Replies: 5
Views: 491
Posted By jasimp
"missing return statement" is saying there is a way question() could run without ever coming across a return statement. It's hard to tell where it needs to go in that un-formatted code but seeing as...
Forum: Java Nov 29th, 2008
Replies: 12
Views: 1,018
Posted By jasimp
And I want a billion dollars :-/
Forum: Java Nov 29th, 2008
Replies: 12
Views: 1,018
Posted By jasimp
What have you done on this problem? Show us some effort and maybe you will receive help. Also, try google.
Forum: Java Nov 26th, 2008
Replies: 10
Views: 4,175
Posted By jasimp
If you notice the OP did try to use code tags, just made a little mistake on the second one.
Forum: Java Nov 19th, 2008
Replies: 7
Views: 501
Posted By jasimp
What you need to do is mark the thread as solved, so people don't read the whole thing to realize it has been solved. Just for future (and present) reference. Thanks :)
Forum: Java Nov 17th, 2008
Replies: 22
Views: 1,305
Posted By jasimp
I have never had trouble running a server and client on the same machine before, but I haven't looked through the code here to see if they are doing anything different than I usually do. However in...
Forum: Java Nov 11th, 2008
Replies: 8
Solved: Exceptions
Views: 570
Posted By jasimp
Peter already said what to do. He said do not exit the program, provide a helpful message to the user and then go back "to the point the file name been submitted for new entry".
Forum: Java Nov 11th, 2008
Replies: 3
Solved: methods
Views: 428
Posted By jasimp
You already have a thread dedicated to this same exact question here (http://www.daniweb.com/forums/thread156225.html), with quite a few responses.
Forum: Java Oct 29th, 2008
Replies: 4
Views: 2,207
Posted By jasimp
Just create a new color using your values. I added the line of code into your try statement.

try
{
red = Integer.parseInt(redText.getText());
green =...
Forum: Java Oct 29th, 2008
Replies: 4
Views: 2,207
Posted By jasimp
Do you have to do it that way? I think a much more interesting way would be to use ColorChooser (http://java.sun.com/docs/books/tutorial/uiswing/components/colorchooser.html)
Forum: Java Oct 23rd, 2008
Replies: 9
Views: 717
Posted By jasimp
You never set operationS to value and then you ask if it equals something. You need to set it to a starting value, or a value inputted from the user.
Forum: Java Oct 22nd, 2008
Replies: 12
Views: 1,776
Posted By jasimp
Try saving it to a .png instead of a .gif, that should (hopefully) work.
Forum: Java Oct 21st, 2008
Replies: 2
Views: 1,220
Posted By jasimp
So the part you are having trouble with is the bold section? If it is think about what modulus ( % ) does. It finds the remainder in division. You need the largest whole number that fits, plus the...
Forum: Java Oct 20th, 2008
Replies: 4
Views: 495
Posted By jasimp
Have you done any programs before this one? You need to declare main() as

public static void main(String[] args){

}

You never ended your Inventory class, it needs its corresponding...
Forum: Java Oct 20th, 2008
Replies: 4
Views: 647
Posted By jasimp
It's actually a pretty common question. At the bottom of the thread, where the reply box is, there is a large yellow button "Reply to Thread". Next to that button there is a link that says, "Mark as...
Forum: Java Oct 19th, 2008
Replies: 4
Views: 647
Posted By jasimp
What you could have done is marked the thread as solved, that way everyone would know it was solved and would not read the whole thing. Or, if you really wanted to be helpful you could have put the...
Forum: Java Oct 11th, 2008
Replies: 9
Views: 1,714
Posted By jasimp
When you use an InputDialog the input is received when you click OK, which also closes it, until it is called again. To get out of the while loop you can 'break' it. I wrote an example to show you...
Forum: Java Oct 10th, 2008
Replies: 17
Views: 2,344
Posted By jasimp
If anyone shouldn't be posting it is you. Ezzaral is probably the most helpful person in the Java section and he knows more, or can at least think through problems better than you ever will. He told...
Showing results 1 to 40 of 66

 


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

©2003 - 2009 DaniWeb® LLC