4,084 Posted Topics
Re: "it won't run" .... can you be a bit more specific about that? EDIT: a few hints: your constructor is wrong: it's inside the main method, which goes against Java syntax (actually, you try to write your entire class inside your main method, which is all kinds of wrong). it's … | |
Re: step one: set that String outside of your loop. there's no reason why you should create a new one each iteration. two: create a method that takes a String and returns the same String, either with a random generated char added in some place, or a char removed from a … | |
Re: that is because you wrote your code like that. you have to check for '5' the moment you input it, unless you want to re-write more code. but also: why do you initialize your Scanner object each iteration? why don't you just create one and re-use that? | |
Re: well, you just need some minor changes in your code. your first for loop, go from 1 to x (in your case 9) and add up to k. (instead of backwards) in your second, reverse in the same way, from upgoing to down. with minor adjustments, I've made your code … | |
Re: just saw a little glitch while reading this thread: on the right, we have the 'Related Articles' section, with above that the 'Tweet, Google+, FaceBook, and in' share/like links. the first time I noticed it, I was already on the same page for several minutes (so at that point not … | |
Re: what if you have to use that List as a parameter that 'll accept only arrays? | |
Re: heh ... somjit, that does happen from time to time. if you look at my stats on down-votes: Total Down-Votes Received 218 Unique Posts Receiving Down-Votes 209 Members Who've Down-Voted 43 most of which 'appeared' overnight, just like yours. well, even though all claim to come here to learn, there … | |
Re: ehm .... if it is to have roles in your personal application, it has nothing to do with tomcat-users or the tomcat config. you have to define roles in your db and application, not in your server. | |
Re: you're overlooking the obvious. you won't have to calculate them all yourself, Java has built in ways to do that. check [this link](http://stackoverflow.com/questions/8833399/changing-java-date-one-hour-back) for an example. | |
Re: lately I've been into a discussion about just this topic with a few developers from India. According to them, a lot (if not most) of the degrees handed after college are obtained by cheating, plagiarism and bribing the professor. so .... yes, they might have a lot of graduates each … | |
Re: which basically means: > if i use "==",it will only compare 1 time no. that is not so. you are just getting only once two reference objects that point to the same object. | |
Re: if you do want to use a font (for titles or such) that doesn't go well with certain browsers, create an image for that title and place that. | |
Re: it throws 'an error' .... what error? what's in the stack trace? my recommendation: even though JMF can be an asset, it's an unmaintained legacy library, which hasn't been updated for years (and there are also no plans to do so). it might be a good idea to see whether … | |
Re: seems to me like your check isn't the way it should be. try with: if ( lines.contains(l)) break; instead. my suggestion: break up your code. method a: read the file into an arraylist method b: iterate over the arraylist to check which ones to add. or, just use a type … | |
Re: my guess: most people here can write that code easily, if we know a bit better what and how it's supposed to work, but we're not here to do your homework for you. what have you got so far? what is it you are having trouble with? | |
Re: if i is the value you print: if ( i < 10 ) System.out.print(" " + i); else System.out.prit("" + i); | |
| |
Re: where are the days ... when life was easy and bills magically "paid themselves" ;) :D | |
Re: did you set this as solved because it is 'solved', or did you set this as solved because you realised this isn't Java and you posted it in the right forum? | |
Re: I'm not entirely clear what your question is here. | |
Re: either that, or use a collection, which later on you transform to an array. since you have no idea how many of the houses are lower than that price, you don't know the size you should set for it, all you know is the maximum possible amount. | |
Re: a data layer, models, a gui layer, a business layer | |
Re: if this kind of threads is what they need to 'advertize' their product, .... , might tell us something about the quality of said product. | |
Re: http://www.google.com the portal site of your institution might also help. but wouldn't you rather create your own? | |
Re: [QUOTE=gregsci;755278]This is more efficient way: [code] //deletes ALL the rows DefaultTableModel.getDataVector().removeAllElements(); //repaints the table and notify all listeners (only once!) DefaultTableModel.fireTableDataChanged(); [/code] If you do this [code] while (mortgageTable.getRowCount() > 0) { ((DefaultTableModel) mortgageTable.getModel()).removeRow(0); } [/code] This will fire notificantions to all the listeners everytime you delete one row, so, … | |
Re: the true question should be: if you want a .exe executable, why are you programming in Java? | |
Re: and next time, be more careful about what you allow your users to post. make sure you put up a disclaimer and user-agreed conditions on your site, stating they're responsible for everything they add. but whether it'll be a "bulletproof" fix for futher infringements? doubt it. for the current problem: … | |
Re: better question: IS there an Exception thrown that should be caught? finally { JOptionPane.showMessageDialog(null,"blablabla", "Error",JOptionPane.INFORMATION_MESSAGE); } the finally block will run, whether there was an exception or not, so just by default printing error there will make it seem like there was an exception, but that doesn't automatically make it … | |
Re: tell Doc Brown to lay low for a while ... people are taking notice of his experiments ;) | |
Re: what do you mean 'in'? you can use internalFrames. you can also open them in JPanels, and open them in one single JFrame. I can't help you with much more, since I don't completely understand what it is you're trying to do. | |
Re: am I missing something? I don't see any constructor in here ... | |
Re: help you with what? cheat on your school assignment? I'll give you the best help anybody can give you here: pick up your textbook or class notes, study them and do the work. also: if you want to copy paste assignments, make sure you understand them, or you know how … | |
Re: you could try using the scanner class. does it prompt you for input? | |
Re: I've heard of this hotmail and gmail too, from time to time. or facebook. take your pick, there are millions "out there" EDIT: any forum, even this one, is communication. but the most used is talking to each other or sending SMS. | |
Re: well ... duh. do you see any reason why this: `name[i]=null;` followed by this: `if(name[i].equals(groupname[j]))` might throw a NullPointerException? | |
Re: not to mention that playing audio/video is not related to Swing. you have the audio part, and you have the gui part, that 'll work together, but that's about it. | |
Re: most likely, they wrote it that way in order for someone trying to "borrow" or "steal" their code wouldn't be able to just implement it in their website. have you contacted the author? | |
Re: ... write unit tests for them and run them. since I don't know what your expected outcome should be, can't really help you much. but, for adding: 1. test if the nr of elements is increased by one 2. verify your new element is in your list for deleting: 1. … | |
Re: don't go trying to program Swing GUI's (or any GUI's for that matter) until you understand the basic concepts of Java. Java is an OO language. you are working with Objects. you don't check the equality of values of Objects using the '==' operator. (Well, actually, you do, hence this … | |
Re: by re-writing the code. hopefully, you've used layers to seperate your code, so you can re-use a lot of it, otherwise.. happy coding. if you would get stuck while coding it in JSP/Servlet, [this forum](http://www.daniweb.com/web-development/jsp/24) might get you a lot of help. | |
Re: well ... you could create your own class and implement your own comparing rules. | |
Re: you think there's a "center" for that? there are way too much reasons for us not to 'hand out' a topic for a project. I'll just sum a few up: 1. we don't know your knowledge 2. we don't know your strengths 3. we don't know your assignments/projects minimal requirements … | |
Re: well ... first it's good thing to know that jmf is pretty out of date, and hasn't been updated for years. the "how to do that" is most likely a lot more to explain than you want to read in a simple post. what have you got so far? have … | |
Re: honestly, I 'm not sure that the drop of views is proof of an unexpected drop in users. might just as well be less new users. nowadays, there are so many other platforms where questions can be asked. I'm personally (a bit) active on a Java page on Facebook. sure … | |
Re: how not to get depressed? first of all: get realistic. 3 rejections are about equal to nothing. most sollicitants these days get dozens, or some even hundreds of rejections before actually finding a job, welcome to modern day economics, I'm afraid. AMZON (I assume you mean Amazon? ) and Facebook … | |
Re: heh ... might use it to p--- of my parents neighbours chickens :) (and I could use it as an excuse to buy an iPad :D ) | |
Re: > Now and then. When it starts acting "funny". ddanbe: so, if you're running Windows, you re-boot every ten minutes? :) | |
Re: ehm ... what do you mean with "mess up"? the description is pretty vague, and without seeing any of the code, it's pretty hard to know what you're doing. | |
The End.