4,084 Posted Topics
Re: beginsWith and endsWith. or, you can use the split method, with space as separator and keep all the elements of the returning array, but discard the first and the last one | |
Re: that 'll depend on what parts (modules) of Spring you intend to use, and what version of Hibernate. check these sites: [Spring](http://http://spring.io/), [Hibernate](http://www.hibernate.org/) | |
Re: why an actionListener? seems to me like you have to 'drag' the piece to the next place. | |
Re: not to mention you should start with the basics before going to logical issues.. ` if (nouvellePartie == "O")` see why that might give you problems? | |
Re: you get an error on 11 digits, because an int can not store that big a value. please choose another data type. in your above code, there is no restriction whatsoever on the field, and saying "I got an error" is of very little use if you don't say what … | |
Re: parsifal: this question was posted 5 years ago. no use of trying to solve it now. either it has been solved quite a while ago, or the OP stopped looking. | |
Re: `"totali "` will print exactly that. you'll need to print the value of the primitive int i, not the letter i. `"total" + i ` should do the trick. | |
Re: the UN, US and all others should, for the time being, stay out of it. last articles I read: they suspect chemical weapons to be used, yet didn't have any proof (so far) (might be out of date, haven't followed the news the last week or so) Obama said: > … | |
Re: what exactly do you mean? you want to be able to control the '+' '-' and digits buttons by the keyboard instead of clicking on them? | |
Re: no offence, but your code doesn't make much sense. for instance: if (min < max) { min = min; lowestGame = currentGame; } min = min; ? talking about a redundant line of code here. next basic problem: if (points > min) { min = points; this should be: `if … | |
Re: remark 1: don't use StringTokenizer, it has been legacy for quite a while, and has been replaced by the much easier to work with 'split' method in the String class. remark 2: you are not using the array variable, so why it gives you any problems. I have no idea. … | |
Re: `Scanner in = new Scanner(System.in);` this line doesn't read a file. what exactly are you saying? just pass the right url to your application, and it'll work like a charm. | |
Re: import a jar file inside a java file? you can't. you have to put the jar file on the path (either your system path, or the path of the project) and then you can simply use import myJar.myPackage.MyClass; | |
Re: your 'Please help' looks to me like a plea of 'provide me with an analysis for my project and teach me how to program'. that goes a bit out of scope for posts here. please provide more specific questions. also, there is a jsp forum on DaniWeb, you may want … | |
Re: afaik, admin privilige is handled by your OS, not your Java application. | |
Re: first remark: change the next lines: `if(this.isEmpty()==true){` `while(this.isEmpty()==false)` to `if(this.isEmpty()){` `while(!this.isEmpty())` less code means less chances to code something wrong. have you debugged your code, or at least added some print statements to verify the code you expect to run is running with the values you wanted to see? | |
Re: the OP hasn't re-checked the daniweb forum for two years now, I doubt there was need to revive this ancient thread for his benefit. | |
Re: > I have been searching the web for a few weeks looking for apprenticeships and stuff like that but they literally all seem to be graduate positions and I do not want to go Uni as I believe I could learn more in 3 weeks at my computer than I … | |
Re: you want them to run your source files? if you consider that feasable, jumping to a career in java development might be a bit ... too soon. first learn the basics, as in: what can we run, how do we run it, ... depending on the type of application, provide … | |
Re: it also depends on what you have to write, off course. if you are asked to write a 'HelloWorld' application, or a multi-level webapplication using Spring, Hibernate, GWT, ... there might appear some reasons to think Java is a little 'less easy' | |
Re: you could always make a second user. the first you re-name, the second time you register with the 'right' capitalization, and just have a link to your other account in signature, but that might go against the rules (maybe only one account is allowed?) and is also a bit far-fetched … | |
Re: in college, I used that time to socialize with friends. as for work, I've never encountered that work was 'off'. sure, sometimes some union wants to protest, but since they have no right stopping me from going to my work. the only thing I can imagine is that the public … | |
Re: SimonRobert: did you really have to revive a seven year old thread for this? | |
Re: that depends on the demands of their employers/clients. yes. you can do such using Java and Swing. | |
Re: not entirely sure, but it seems to me this is not a Java question. so one thing might be, you've posted in the wrong forum. | |
Re: Pyler: it seems to me like you have three or four threads about this particular question. it's pretty hard to follow what has already been suggested, if it's spread over several threads. could you please pick one thread, copy all answers to that, and put the others on 'solved'? | |
Re: what you have to do, is create an empty String before you iterate over your arrays. during the iteration (for loops) you append data to it. after the iteration, you show one single messageDialog, with the String you just generated as text. | |
Re: you do understand that there are quite some possible reasons what might be going wrong, but that with only that snippet, chance is small we will find what it is? for instance: what does your pop method do? what is the value of the SIZE variable? | |
Re: that would depend on what it is you are trying to accomplish (get as output). can you elaborate more on that? | |
Re: what stack class are you using? what error is it giving? | |
Re: either popular, or doesn't exist anymore. I think, however, it's safe to say the OP is not reading this anymore. there are a lot of recent threads asking basically the same. updates can be posted there as well. | |
Re: use an if statement, and pack the entire 'to loop' within a while loop. boolean test = true; while ( test) { // ... System.out.println("WANT MENU AGAIN?? Y/N"); char c = readFirstChar(); // replace this by the correct call for // this. read a String and extract the first char. … | |
Re: are they actual seperate classes? they just seem to be seperate methods to me. can you be a bit more precise which String you are trying to pass from wich method (in which class) to which method (in which class) and where exactly it is null? | |
Re: I used to have DVDXCopy (actually bought the software, since it was THAT good) made a decent copy of the entire DVD, all languages, all features, ... with two simple clicks of the mouse (and a bit of patience, duh). too bad the creators lost a lawsuit, and had to … | |
Re: how do you expect this to return false: String age="Disposed"; if("Disposed".equals(age)){ | |
Re: keep a variable somewhere that stores the last time you updated the intrest. best in a txtfile or something, but for the time being, just in the 'running application'. for year: save 2013 include a check -> if date equals january first, check the current year against the stored year. … | |
Re: ehm, seems to me you could use a DecimalFormat, that returns a String dependent on whether there are numbers after the decimal point or not. | |
Re: also: > but I'm 95% sure it's just a mix of Java and HTML? no, it isn't. the jsp file is basically (and only) the view through which you show the data that's being built by servlets (Java classes). only those who are not all that experienced in JSP / … | |
Re: by writing it in a JInternalFrame instead in a JFrame? a few remarks on your if statements: `if ((chkfees1.isSelected() == true) && (chkfees2.isSelected() == true) && (chkfees3.isSelected() == true))` this can be rewritten as: `if ( chkfees1.isSelected() && chkfees2.isSelected() && chkfees3.isSelected())` makes it a lot easier to read. in your … | |
Re: this post makes no sense. is your computer a database? no? then it shouldn't be able to. | |
Re: whether or not to get your output in a text file, has nothing to do with running your application from an IDE or from a command prompt. the information you provide, has actually nothing to do with what you are asking for. you need to go over [this](http://docs.oracle.com/javase/tutorial/essential/io/). as the … | |
Re: read the code, you'll see. anyway, this is an ancient <solved> thread, there's no real reason to revive it. | |
| |
Re: too bad. looks like the signature (s)he needed to put is just advertising for a Marketing agency. | |
Re: ig you hry those 'pointers', that means you are calling the toString method on an instance of a class which didn't override the toString method, but rather uses the one provided by the Object class. not sure whether you'll have a foolproof solution for this, since you are using a … | |
Re: `int array [a] = input.nextInt();` you don't need to declare the separate elements. replace the above by: `array[a] = input.nextInt();` | |
Re: what do you mean: aligned? they are aligned. if you want them next to each other, instead of underneath, you'll need to change the values of the rows and columns in the constructor for the GridLayout. now you set: `new GridLayout(2,2,5,5)` try with: `new GridLayout(1,3,5,5)` you have searched the net … | |
Re: here is the problem: `public ImagePanel(ArrayList<ImageInfo> photos){` this is the constructor you provide for your ImagePanel class. this is the one you try to call: `window.getContentPane().add(new ImagePanel());` the compiler will automatically add a default (non argument) constructor, but only if you don't provide any constructors in your class yourself. so, … | |
Re: what is it you are having trouble with? it's easier for us to look into your question if we know what the actual question is. but try and remove redundant code. an example I gave a few days earlier as well: if(another.equalsIgnoreCase("y") == true) { anotherFlag = true; } else … |
The End.