1,678 Posted Topics
Re: [url]http://java.sun.com/docs/books/tutorial/deployment/jar/index.html[/url] Or you could always use google. There are tons of quick tutorials giving you the same information we can offer. | |
Re: Huh? Are you saying you want to compare the images to see if they are duplicates? If so, you can do that by comparing pixel by pixel, since a blown up image converts every 1 pixel to 4 pixels or something like that. I don't know much about it, but … | |
I'm using the same file menu with the same menu items in multiple places. As such, they should have the same actionListeners etc since the same windows should open when they are clicked. How do I get netbeans to automatically do this (make them all use the same events and … | |
Re: What you just said makes no sense. It looks like 3 sentences jumbled into one. In English, please? | |
Re: Please post your code in code tags, following the rules that can be found in the stickies at the top of this forum. :) | |
Re: That explanation doesn't make sense to me. Try to work on one issue at a time. And tell us what the overall task you're trying to accomplish is so we can help you by telling you what the best way to accomplish that goal is. | |
Re: Just curious. . you posted a link to a c++ website. The use of that function is the exact same in c++ and c? | |
Re: Yeah, looks like it's just a syntax error, not a logic problem. | |
Re: The for loop with only 20 iterations is not going to cause you trouble. One of the methods called from inside the for loop might, however, or calling the method that contains the for loop repeatedly. Have you actually checked to see how much your .exe is using? And where … | |
Re: If it will boot up in safe mode then remove and uninstall the harmful file or program. . ? | |
Re: Couldn't you also use getClass or instanceOf to tell which type of Object it was? | |
Re: It might help if you pasted us the entire error message, which would probably include the line number at which this happened, and perhaps other relevant information. | |
Re: The most important advice you can remember when you're learning is not to get overwhelmed, and break your task into smaller parts, like James has suggested. That way, you can look up how to do each individual part, if necessary, and you can make progress on the problem. | |
Re: To multiply two polynomials, you need to multiple each part of the first polynomial with each part of the second polynomial. This requires a for loop. And when you multiple polynomials, you need to add their exponents. I don't see you doing either of those things. . ? | |
Re: There is your problem. You can't execute all three because testcircle is the only one with a main method. On top of that, I don't think you can execute more than one class at once with the java command. Just change it to java testcircle | |
Re: If you want to do this Generically, consider this code as an example: [CODE=Java] public class GenericNumbers<T>{ private T number; private ArrayList<T> numbers = new ArrayList<T>(); public GenericNumbers(){ } }[/CODE] If that does not make sense to you, read the two lectures on Generics found here (they are easy to … | |
Re: I took a look at your problem yesterday, but I can't say I remember enough about the data structure to be very helpful as far as the logic. But if it is the syntax you are struggling with, ask a specific question about what you are trying to accomplish (as … | |
Re: Why are you throwing an exception, specifically, an UnsupportedOperationException, for your Animals' move and eat methods? You should be using print statements: System.out.println("A fish eats other fish"); or using the JOptionPane.showMessageDialog method. | |
Re: Also, the "Working as it is supposed to" is just a figment of your imagination. If it doesn't work the first time, it is just tricking you the third time. Hehe. | |
Re: Your class is named Video. The Video class has a String and an int as data members. Your other class is VideoStore. It has an array of videos as its only data member. If you know how to create an array, then you should have no problems. Video[] theVideos = … | |
Re: You can use an Object of the class Scanner to read in the names from the text file. Store them into an array. Then you can write a search method to search for a name based on what the user inputs. This method could be as simple as checking to … | |
Re: I got this off of another forum, from what I remember of Data Structures, it is the correct information on how to do a breadth first search of a tree. Their directions indicate that the tree is Binary (only has two nodes), but you can use the same algorithm on … | |
Re: Try not to make duplicate threads: [url]http://www.daniweb.com/forums/thread185363.html[/url] And I honestly cannot follow the code you wrote at all. I provided a solution for you that should work nicely in the other thread, though. | |
Re: How are we supposed to know what the class Plane is? If it's a standard library class, at least link us to the documentation or something. | |
Re: [QUOTE=Ezzaral;842595]This is not a homework completion service.[/QUOTE] It depends. If he posts it in the 'paid projects' section it will quickly become one. ;) | |
Re: I'm not sure I understand your problem. You're trying to count the number of times each number was rolled? And find the percentage of the time that each number was rolled? If that is the case, keep an integer array to count the number of times each number was rolled. … | |
Re: Get the x and y coordinates of the button and the line/rectangle or whatever it cannot pass. Compare these x and y coordinates; do not move the button any further if it is at or past these coordinates. | |
I have a JTabbedPane inside a JFrame. I've been having a lot of problems with resizing and things like that. . how do I get the JTabbledPane to resize with the JFrame? So when the user drags the window open to a larger size, the JTabbedPane should be dragged to … | |
Re: Your problem sounds extremely application specific. From my understanding, persistence layer is where the data is stored, so your question doesn't make sense anyway -- why would you be doing transaction management in your database? Maybe I don't know what I'm talking about here. | |
Re: Yes. . just update threads from 5 years ago | |
Re: Use the String class's toCharArray method, then loop through the character array using a for loop, only printing out every even position or odd position. You can print out even positions or odd positions by using modulus. What modulus does is it returns the remainder of a division. So an … | |
Re: A recursive method calls itself in order to come up with the final answer. Your method is returning count, which does not do what I just said. Your method should have the following parameters: currentIndex (the index the array just checked), count, array (your array). A recursive method also needs … | |
Re: You could also use the String's toUpperCase as long as you converted the char to a String first. Since charArray[i] is a char, if you did charArray[i] + "", that is now a String in Java. Pass that to the toUpperCase method and it will return an uppercase String version … | |
Re: You can make earlier Circles disappear by removing this code: for (Circle a : pointList) { a.draw(page); } It seems like that code draws every single circle that you added to pointList. | |
Re: Tizzie: what are you doing? Make your own thread and post code in code tags and read the rules first. brizwhiz's only problem appears to be what ezzaral pointed out, the semi-colon should not be there. | |
Re: Post your full code, in code tags. [CODE=Java] I feel like I say this 100x per day. | |
Re: This is an interesting read. [url]http://java.sun.com/docs/books/tutorial/extra/fullscreen/doublebuf.html[/url] | |
Re: I don't like to speculate on what I "would" do (since I've never tried anything like this, so the advice could be totally off - try at own risk of wasting your time :) ), but I would try to make a custom class that extends JButton and modify the … | |
Re: I can't help much since I use Windows, which is the forum you are in (Vista) btw, but I had a similar problem and I removed my current driver, installed the new one, and it worked ok after that. Good luck! | |
Re: You'll also need to implement ActionListener for your JButton. Then you can get the selected index from in the actionPerformed method. Here's an example [url]http://java.sun.com/docs/books/tutorial/uiswing/examples/components/TableSelectionDemoProject/src/components/TableSelectionDemo.java[/url] | |
Re: [QUOTE=pywriter;837940]Hi I have 4 questions 1-Is it right that when you learn assembly you learn machine language,too?How? 2-What makes a programming language feature OS dependent? 3-Does Assembly have OS dependent feature?what about HLA? 4-How can i write an OS independent program(bootable programs)? thanks alot[/QUOTE] In response to the poster above … | |
Re: [url]http://java.sun.com/developer/onlineTraining/java3d/index.html[/url] I started reading it myself, but gave up a while back due to not enough time. | |
Re: Yeah. You have your brackets in the wrong place. public class PayrollProgram3 { public static void main(String[] args) { } } That's two open brackets and two closed brackets. Since the brackets match, you have no code in your main method, and no code in your class. | |
Re: Do what JavaAddict suggested, I would suggest one minor modification though: use an integer array of size 12 (one for each value) to keep track of the number of times each has occurred. Simply increment the index- increment index 0 if you see a 1, index 1 if you see … | |
Re: NeutralFox - I'm glad you solved your problem - James is correct in saying "If you have a single processor the two (or more) threads will share it according to some process that you don't get involved with". As an example of that, consider the fact that you can use … | |
Re: You can use a while loop to implement the solution James suggested. Be careful not to try to indexes that are not actually in the array. And mark your threads as solved when you are satisfied with the help you've been given, or when you've found a solution, as you … | |
Re: 1. make sure it is clear to the user how to exit your program. So change your print statement to something like "Enter the composer's name or 'q' to quit." 2. You declared your arrays as having 999 elements, not 1000. If that was your intent, that is fine, just … | |
Re: What do you need help with? Ask specific questions to get help, don't just post your project description and your code. Just let me know what part of the code you're having trouble with and what you aren't understanding and I will be glad to help. If you have any … | |
Re: And your teacher is trying to tell you that the String's length method will tell you how long their name is. So what everyone else here has said applies, let me put it all together for you: 1. Prompt the user, asking them what their name is 2. Use a … | |
Re: Post your code in code tags. When you click on the code tag icon, Change it from [CODE] to [CODE=Java]. Also, your code seems to have numerous errors, so I will get to that. [CODE=Java]class Factor{ public int calculateFactor(int n1, int n2){ public Factor newFactor() int factor; factor=n2%n1; if(factor==0) return … |
The End.