1,678 Posted Topics

Member Avatar for doha786

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

Member Avatar for BestJewSinceJC
0
101
Member Avatar for PhiberOptik

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 …

Member Avatar for PhiberOptik
0
109
Member Avatar for BestJewSinceJC

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 …

Member Avatar for Ezzaral
0
103
Member Avatar for karan_the

What you just said makes no sense. It looks like 3 sentences jumbled into one. In English, please?

Member Avatar for javaAddict
0
176
Member Avatar for TechnoArt

Please post your code in code tags, following the rules that can be found in the stickies at the top of this forum. :)

Member Avatar for masijade
0
164
Member Avatar for k2k

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.

Member Avatar for k2k
0
114
Member Avatar for sivak

Just curious. . you posted a link to a c++ website. The use of that function is the exact same in c++ and c?

Member Avatar for Aia
0
399
Member Avatar for redmaverick
Member Avatar for cherryduck

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 …

Member Avatar for cherryduck
0
499
Member Avatar for RebeccaAllison
Member Avatar for BestJewSinceJC
0
117
Member Avatar for neutralfox

Couldn't you also use getClass or instanceOf to tell which type of Object it was?

Member Avatar for neutralfox
0
174
Member Avatar for abhi_elementx

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.

Member Avatar for BestJewSinceJC
0
115
Member Avatar for geek-girl

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.

Member Avatar for BestJewSinceJC
0
165
Member Avatar for smsamrc

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. . ?

Member Avatar for smsamrc
0
2K
Member Avatar for redmaverick

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

Member Avatar for BestJewSinceJC
0
2K
Member Avatar for osjak

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 …

Member Avatar for BestJewSinceJC
0
740
Member Avatar for ViLeNT

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 …

Member Avatar for BestJewSinceJC
0
117
Member Avatar for ClimaxBeetle

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.

Member Avatar for BestJewSinceJC
1
136
Member Avatar for abhi_elementx

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.

Member Avatar for BestJewSinceJC
0
837
Member Avatar for hollywoood69

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

Member Avatar for javaAddict
0
389
Member Avatar for rayda

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 …

Member Avatar for verruckt24
0
86
Member Avatar for bobrien314

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 …

Member Avatar for BestJewSinceJC
0
293
Member Avatar for smsamrc

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.

Member Avatar for BestJewSinceJC
0
709
Member Avatar for daffer

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.

Member Avatar for javaAddict
0
128
Member Avatar for king_786

[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. ;)

Member Avatar for BestJewSinceJC
0
110
Member Avatar for Utter_iMADNESS

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

Member Avatar for BestJewSinceJC
0
176
Member Avatar for StevenJava

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.

Member Avatar for BestJewSinceJC
0
84
Member Avatar for BestJewSinceJC

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 …

Member Avatar for BestJewSinceJC
0
199
Member Avatar for venugreddy

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.

Member Avatar for venugreddy
0
97
Member Avatar for cosi
Member Avatar for testing321

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 …

Member Avatar for BestJewSinceJC
0
136
Member Avatar for spec80

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 …

Member Avatar for spec80
0
121
Member Avatar for rockin_rebel

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 …

Member Avatar for rockin_rebel
0
3K
Member Avatar for jacline

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.

Member Avatar for Ezzaral
0
171
Member Avatar for brizwhiz

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.

Member Avatar for BestJewSinceJC
0
1K
Member Avatar for vict0rjr
Member Avatar for vict0rjr
0
140
Member Avatar for petike

This is an interesting read. [url]http://java.sun.com/docs/books/tutorial/extra/fullscreen/doublebuf.html[/url]

Member Avatar for Ezzaral
0
274
Member Avatar for maximilian2006

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 …

Member Avatar for JamesCherrill
0
122
Member Avatar for Mannu123

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!

Member Avatar for BestJewSinceJC
0
54
Member Avatar for abhi_elementx

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]

Member Avatar for abhi_elementx
0
110
Member Avatar for massivefermion

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

Member Avatar for BestJewSinceJC
0
122
Member Avatar for Upsilon

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

Member Avatar for BestJewSinceJC
0
287
Member Avatar for Mel1976

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.

Member Avatar for BestJewSinceJC
0
109
Member Avatar for get2tk

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 …

Member Avatar for BestJewSinceJC
0
91
Member Avatar for neutralfox

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 …

Member Avatar for JamesCherrill
0
123
Member Avatar for dhr

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 …

Member Avatar for BestJewSinceJC
0
825
Member Avatar for mkadiri

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 …

Member Avatar for mkadiri
0
122
Member Avatar for syuk

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 …

Member Avatar for BestJewSinceJC
0
218
Member Avatar for king_786

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 …

Member Avatar for javaAddict
0
187
Member Avatar for custurd12

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 …

Member Avatar for VernonDozier
0
159

The End.