2,443 Posted Topics
Re: might help to know what this getOccurredDate method looks like, or what Class it's from if it's not yours. | |
Re: Try using trim on the Strings before you add them to the sets. | |
Re: toBinaryString only produces as many bits as is necessary to show the value. With negative numbers this should always be the complete amount as the leftmost digit is the "negative" indicator, but for positive numbers it is less. For example the number 10 will produce 1010 instead of 0000000000000000000000000000001010. You … | |
Re: See your other thread on this. [url]http://www.daniweb.com/forums/thread234032.html[/url] | |
Re: Some code might help. We have no idea how you are doing what, and so have no idea how to help you along. | |
Re: Have you actually [i]tried[/i] doing [i]exactly[/i] that? | |
Re: A bare number that starts with zero is an octal number. And octal numbers cannot include either an 8 or a 9. Remove those zeros. | |
Re: Two duplicate threads: [url]http://www.daniweb.com/forums/thread234039.html[/url] [url]http://www.daniweb.com/forums/thread234032.html[/url] | |
Re: Well, I know how [i]I[/i] would do it. The real question is how [i]you[/i] think it should be done. We are [i]not[/i] a homework service. Post your attempt at it here and we will help you correct it. We are [i]not[/i], however, going to do it for you. | |
Re: Use a bean, as it is suppossed to be done. You shouldn't have any scriptlets in your code anyway, so having to duplicate the code over and over again shouldn't be a problem in the first place. | |
Re: As in JMenu? [url]http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html[/url] | |
Re: Does it have a "package" statement? Probably not. You need to do more than simply copy the "class" file around. You have to actually [i]declare[/i] the package in the source file and compile it as such. | |
Re: call validate and then repaint (on the entire JApplet, i.e. just like you're calling getContentPane), rather than that content.paint call. | |
Re: It's because you're not using generics. Also, if you look at the compiler message it is a [i]warning[/i], and, in this case, I believe you could ignore it. However, since you are doing all your work with Strings, then, currently, every where in your code where you currently have [inlinecode]List[/inlinecode] … | |
Re: If you "need codes", then you'd beter write some "codes", as we are [i]not[/i] going to give them to you. I for one would [i]not[/i] appreciate, one day, ending up being a coworker of yours and continuing to do your work for you after you cheated your way through your … | |
Re: Yeah, ask at a site that pertains to this JLex and/or CUP thing you're using. I, myself, have never heard of them. Truth be told, this problem doesn't seem to apply to Java, at all, but rather to these tools that you're using. | |
Re: Yeah, let the plugins do their own work. In other words, the"main" app should [i]not[/i] be attemtping to "build" the GUIs for the plugins. The plugins should be building their own own GUIs. Define an interface with a "getPanel" method. The "plugins" then need to construct a panel (with everything … | |
Re: Well, of course it can't if you don't have [i]any[/i] code for it. At least make an attempt. As a hint, save the total amount made today in a variable, then triple that amount into another variable, then add that back into the original variable and repeat the process. A … | |
Re: And your code? And your question? Just so you know, we are not going to do it for you. | |
Re: Because you are assigning "pl" to all the elements and your "FamousPainting" object is "f". What good does it do to have a FamousPainting object and then not use it? Instead of creating that at the beginning, create it at the same place as you are now creating your Painting … | |
Re: Because setDataVector sets the data for the entire table. | |
Re: Yeah write Class(es) that access the DB, then write Class(es) that display data in a Gui, then write Class(es) that act as listeners (and such) as a go between between the two and performs its actions in a separate thread. This is called (and is only a simple explanation of) … | |
Re: Well, no one here is going to do it for you. Take it one small step at a time. Take a piece of paper and draw out the way you wish it to look. Break that into parts (such as the view window, the scientific buttons, and the normal calculator … | |
Re: Aargh multi-post [url]http://www.daniweb.com/forums/thread231257.html[/url] | |
Re: Just see the standard networking tutorial. Regardless of whether it is twisted pair, token ring, usb, whatever, whatever, you can [i]and most definately should[/i] set up an IP network on it, then you can use the normal network classes. | |
Re: I am quite sure [i]someone[/i] has done this homework project before, but that doesn't mean anyone here is going to [i]give[/i] it to you. For one, it violates the Terms and Conditions of use for this site (which [i]you[/i], and everyone else here, [i]agreed[/i] to when signing up here). For … | |
Re: [url]http://java.sun.com/docs/books/tutorial/jdbc/index.html[/url] | |
Re: You need to add a save and a search button, which means, also, additional actionListener options. | |
Re: The browser is not "resolving" anything. The site is "redirecting". So, are you using URLConnection or HttpURLConnection? HttpURLConnection will "follow" redirects, by default, URLConnection, won't. | |
Re: Of course you will be using an import (excpet for those classes in the same package of course. Either include the directory which contains the "root" of those classes packages on the classpath or create a jar and include that jar on the classpath. [url]http://java.sun.com/docs/books/tutorial/deployment/jar/index.html[/url] | |
Re: I have no idea what you mean. | |
Re: Write a method that reads the user input (I am assuming your getting input at various stages) and checks whether it is "quit" or not and otherwise returns the input as a String. Then, every place where you are currently reading input call this method instead. | |
Re: You are calling the ethod without any arguments, but the method is designed to take an int and a double, so give it an int and a double. | |
Re: What are you trying to [i]do[/i] with the component. "Access a component" means literally nothing. | |
Re: Each package has it's own directory (in the normal state of affairs, there [i]are[/i] other ways of doing it, but we won't get into [i]those[/i]). I.E. Hypothetical, your source code is under [B]/my/source[/B] and your compiled code is under [B]/my/classes[/B] then for the package [B]thisIs.myPackage[/B] and the class [B]DontYouLikeIt[/B] the … | |
Re: MS Access is file based (i.e. no remote connections, local file access needed) and Applets do not have access to the local file system. A complete redesign is in order. | |
Re: With a compare(obj, obj) or compareTo(obj) method, a loop, a toString() method, and the println(string) method. | |
Re: You forgot the '{' after the for statement on the block before this point. | |
Re: [code]cmd /c <command>[/code] See [url]http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html[/url] And read it completely and thoroughly, although I can't imagine why you would [i]really[/i] want to do all this. | |
Re: With a prepared statement and multiple executes. | |
Re: [i]What[/i] exception, [i]and[/i] your problem could [i]possibly[/i] be solved by using the "short-circuit" or "||" instead of "|", because that way the second half of that if statement won't even be evaluated if the first half is false. Currently, they are both being evaluated regardless of whether the first is … | |
Re: Break all those scriptlets out into a Bean or three. Do not use scriptlets in a JSP any more than absolutely necessary (which they never really are). They are nothing but a maintenance nightmare (as you are now experiencing). | |
Re: That depends. What exceptions or compiler messages are you getting? | |
Re: [code]Integer.toBinaryString((int) 'J')[/code] See the API docs. And don't forget to left pad it with zeroes, as it will only produce a String as long as it [i]needs[/i] to be, rather than the full 8 bits. I.E. if the "full" bit string should be "0000101" this will only produce "101". Or, … | |
Re: Well, let's see what you have. | |
Re: [code]String pic = rs.getString("pincode");[/code] not [code]String pic = rs.getString(pincode);[/code] Also, use a preparedStatement, cobbling a statement together using String concatenation like you've done is just [i]begging[/i] for trouble. Maybe only as innocent as a mistyped user input string that causes the SQL to fail with a syxntax error, or as … | |
The End.