1,678 Posted Topics
Re: I'm torn between liking you and hating you. Hmpf! | |
Re: You're attempting to use the variable 'i' but you never declared that variable. And you also didn't follow any of this site's rules. | |
Re: Adding an action listener to something just means that when some action occurs on it (such as clicking a button), the actionPerformed method will be called. So whatever code is in the actionperformed method will be executed if you, for example, add an action listener to a JButton then click … | |
Re: You can do a lot of cool things in swing but its best to try out some examples rather than wading through pages of explanations. [url]http://java.sun.com/docs/books/tutorial/uiswing/components/button.html[/url] | |
Re: Dell has quality products. I don't know what you mean by a poor build rep, but they don't have a poor reputation in any area that I know of. I have an Inspiron right now and it has worked well for me. I got it for $800, 4 GB RAM, … | |
Re: So, let me guess, an IP check will show that you're the same exact user as "help_please"? Since what you just asked is the same question he has asked (and I have answered) in two different threads. | |
Re: [url]http://www.daniweb.com/forums/thread274782.html[/url] What is it about the help I gave you in that thread that is insufficient? I gave you code examples, detailed explanations, etc. It seems like you want someone to do your project for you. To do your project, you need to know the following: Classes, methods, a very … | |
Re: As masijade said, a newline is almost always "\n" so you'd just add "\n" into the String. Or you can say System.out.println() more than once since it automatically adds a newline at the end of your String. | |
Re: [QUOTE=jtodd;1185271]I believe the set and get methods are used for code reusability...? [/QUOTE] Not particularly. They're more useful for encapsulation - hiding your data and only making their use available through methods that you (the programmer) implement. For example, you might want to encapsulate a data member "hours" and provide … | |
Re: Reflection is used for a class to examine its own (or another class's) behavior at runtime. For example, while the program was running, you could determine what methods the class has and invoke those methods. You can find the source code file by figuring out the class name and locating … | |
Re: Write out the project description and tell us, step by step, what [I]you[/I] think you will need to do for each part. If we think you're wrong we can help but show effort or you'll get no help. | |
Re: [QUOTE=javaAddict;1182446]Well apparently the last part is not correct. I just checked the API and it doesn't say such thing. It simply returns true or false if the next token is int BUT the the next token is not a new line. It is when you enter value. The new line, … | |
Re: Your description is of a one dimensional array where the goal is to find the minimum number in blocks such that the number is greater than or equal to the current job. But your code creates a two dimensional array. Why? | |
Re: Yeah, seriously. How could you be nearing graduation and never have typed "ls" on the command line. That depresses me. | |
Re: You could get rid of the spam problem almost completely by requiring that anyone posting in a thread which 'died' more than 3 months ago has at least X amount of posts. Even if X was a fairly small amount it would help. This would also eliminate the need to … | |
Re: No, that wouldn't work. How would it work for a set of numbers of arbitrary size (in other words how would it work when you don't know how many numbers you'll have, since in your example, it only works if you have 3 numbers)? Hard coding it like that would … | |
Re: Your explanation is over my head since I have no experience in those areas, but out of curiosity, is meeting with some companies and getting estimates out of the question for some reason? But what I do know is that you're unlikely to get an accurate estimate of how much … | |
Re: [url]http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html[/url] The resource can be placed in one of many directories, I think one of these is in the same directory as the .class file. Read the article for more accurate information. Also see loading resources using getResource [url]http://java.sun.com/docs/books/tutorial/uiswing/components/icon.html[/url] | |
Re: [url]http://userpages.umbc.edu/~dhood2/courses/cmsc433/spring2010/?section=Notes&topic=Ruby¬es=07[/url] The above is a good resource. As far as your code, it looks ok, except you should be passing the file name to the File.file? method. Like File.file?(aFile) then if it is actually a regular file, rename it. | |
Re: What is the error message. | |
Re: Doable, but a bad idea unless you're trying to create some sort of library of common functions that you use. If that is what you're going for create some static methods in a different class where you can call those methods from your paint method. Pass in your Graphics object … | |
Re: I don't know - what [I]are[/I] you missing? Did you do any debugging? You listed some steps: 1. input 10 integer numbers, 2. display the numbers, 3. modify a specific number I have already entered, 4. display the updated numbers again. Which of those steps isn't working? | |
Re: [QUOTE=Krstevski;1178698] Learn about [URL="http://www.regular-expressions.info/reference.html"]Regular Expression Syntax[/URL] and then you can implement into all programming langugaes... :)[/QUOTE] Regular expression syntax isn't standardized, different languages may have their own regex syntax, a subset of another language's syntax, or a regex package that mostly implements another language's syntax but adds features or has … | |
| |
Re: What you [I]want[/I] to do is draw two rectangles onto a window. What you're [I]doing[/I] is creating two JPanels (which is essentially two different windows, not one), both of which have rectangles drawn inside of them, but you're putting the second JPanel on top of the first one - which … | |
Re: Just use Scanner to read in the file. [CODE] Scanner input = new Scanner(System.in); System.out.println("Course to match"); String course = input.next(); Scanner file = new Scanner(yourFilename); while (file.hasNext()){ String courseID = file.next(); if ( // check if the course ID matches the course the user is looking for){ System.out.println( // … | |
Re: You see the code button at the top of the reply box? Click it, then insert your code in the middle of it. | |
Re: That explanation makes it more confusing, if anything. What we need in order to help you: 1. Explain what problem you are having. 2. A [I]minimal[/I] code sample demonstrating the problem. 3. An explanation of what the code sample is supposed to be doing. 4. An explanation of what the … | |
Re: Define a class (I'll call it YourThread) that extends Runnable and takes one argument to its constructor: the name of the file you want it to run on. Then in another class, the main/driver class, you can use a for loop and make a new instance of YourThread for each … | |
Re: [QUOTE=jackthechemist;1173431]Greetings, 1) Do sockets implement TCP? When I uses a socket to send data to another computer, are the computers using TCP or is it my responsibility to implement it (ie write the program such that the methods of the sockets mimic the rules dictated by TCP) I am confused. … | |
Re: [QUOTE=jwenting;1179638]get a degree indeed, and also don't be afraid of taking on jobs that don't fit your "ideal" job description. [/QUOTE] Agreed, but also the OP should learn the skills necessary to qualify for a large quantity of jobs, to maximize his chances of getting one. And that means learning … | |
Re: [url]http://forums.sun.com/thread.jspa?threadID=5355953[/url] check out the second post there. | |
Re: It's because you posted a ton of code and it doesn't look like you tried very hard at solving this yourself, so none of us really care enough to help you. Read about ArrayList on google and you'll see what Masijade means. Read about ActionListener and you'll figure out how … | |
Re: Nice fake signature. Also, for the second time in the last few days, surely you realize that your sentence is missing a preposition? I'll help you out: next time say "Please give me some suggestions". Or you could use a relevant topic title instead of telling us what we already … | |
Re: Why do you want to make it into a 2d char array, and how? As far as I know StringBuffer is represented by an underlying char array. How do you want to make it into a 2d one? | |
Re: What do you expect to happen as a result of the input you showed above? What is going wrong? Where in your code are you getting an error - and is it a logical error, or is the code throwing an exception? And what are you trying to do that … | |
Re: Figure it out. I noticed you have a tendency to not mark threads solved or to follow up on your old threads. Anyway, zetlin just gave you the exact method you need from the looks of things. Now you want him to edit it into your code for you? | |
Re: There is no such thing as an "int... ints" construct. Besides which, your friends coding is poor. ArrayList shouldn't be used as a raw type like that, specify the type (an example:) [CODE]ArrayList<Integer> list = new ArrayList<Integer>();[/CODE] | |
Re: Use wikipedia. Being 32 bit means the CPU has 32 bit integer and address registers. Go look up the x86 specific stuff. I found it on wikipedia in seconds. | |
Re: A few thousand dollars? To set up a website with a few sections and the ability to register? Lol ok. | |
Re: When do you want to do this. . when the user clicks something or does something, or when the program first runs? If when the user clicks/does something, then add the JTabbedPane to the GUI, add the tabs to the tabbed pane, then call revalidate (or validate) on the frame … | |
Re: The number of lines doesn't matter except that it increases the complexity. So basically you have bugs in your code. You'll need to do some testing to figure out which sequence of events causes errors. Write down any sequences of events that you find that cause errors. Then trace through … | |
Re: Your interface isn't very intuitive. I just ran it to try to help you out but I really have no idea what I'm supposed to be doing and what isn't working. It already said "You are incorrect" before I'd even answered, and it asked me to "name the test" but … | |
Re: Implement the Comparable interface. [url]http://onjava.com/pub/a/onjava/2003/03/12/java_comp.html[/url] [url]http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Comparable.html[/url] Then use the Collections.sort(yourArrayList) method [url]http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collections.html#sort%28java.util.List%29[/url] In fact the first link shows the whole process. If you are good at reading method documentation all you need to do is look at the second link, implement that interface (it only has one method), then call … | |
Re: [url]http://www.cs.umbc.edu/courses/undergraduate/201/spring07/projects/[/url] You can get a ton more projects by changing the 'spring07' to variations of spring and fall. Example: spring08, fall06, etc. The course has recently switched to teaching Python so anything past 08-09 won't give you any C projects. The C projects are in a reasonable order, so if … | |
Re: It shows error "Cannot resolve symbol class [B]FormattedTextField[/B]" Why would it say that unless you tried to use FormattedTextField instead of JFormattedTextField by mistake? | |
Re: [url]http://java.sun.com/docs/books/tutorial/essential/exceptions/throwing.html[/url] Look at the pop() method example they have there. Since the substring() method throws a StringIndexOutOfBoundsException, which you did not catch, it was passed down to wherever you called MyNumber(). Additionally you would need to say throw new TryCatchException1() to actually throw an Exception. The throws clause in your … | |
I'm trying to write my own system calls. I have a .c file where I'm putting the system calls. My system calls use a struct, so I have declared a global variable that is an array of my struct. Lets just call it [CODE] //Stuff is the name of the … | |
Re: 1. I don't know, the network has reached capacity and decides that it isn't going to allow any more users on? I guess this could happen in any sort of crappy TDM/FDM system, but it probably isn't the answer you wanted. The other thing I can think of is that … |
The End.