4,084 Posted Topics
so far all of the Threads in which I've replied to are marked with a symbol (circle with enclosing circle), but for this thread: http://www.daniweb.com/software-development/java/threads/455985/jframes in the Java forum, I just get the difference between 'new' and 'read', a simple button with a file on it. is this a glitch, … | |
Re: do you mean the size as in number of pixels, or as in number of bytes? yes, you can either check the size, or re-size if you want it smaller. | |
Re: download the JDK from the Oracle website, don't bother yet with an IDE. http://www.oracle.com/technetwork/java/javaee/downloads/java-ee-sdk-6u3-jdk-7u1-downloads-523391.html | |
Re: [This](http://stackoverflow.com/questions/1383797/java-hashmap-how-to-get-key-from-value) might answer that for you. | |
Re: all information about Hibernate, including decent documentation and downloads, can be found [here](http://www.hibernate.org/) | |
Re: what code? what have you got so far? | |
Re: to a non static method? you want the easy approach or a decent one? easy: create an instance, and pass them as parameters. more decent: make your array an instance variable, and perform all your operations on an instance, instead of in a static context. | |
Re: that's not all the compiler is currently throwing. in order for us to figure out where that call is going wrong, you may want to show the next lines of the stacktrace as well... as you probably have noticed, the line numbering you have here is not the same as … | |
Re: why don't you just do: FileWriter foStream; try{ foStream = new FileWriter("file1.txt"); .... } catch(Exception e){ } try{ foStream = new FileWriter("file2.txt"); ... } catch(Exception e){ } you can also put them in the same try-block. | |
Re: could you specify "keep getting errors"? compile vs run time? stack traces? error messages? ... | |
Re: what exactly is it supposed to do, and where are you stuck? you're not giving us much information to go on here... | |
Re: I doubt there's anything going wrong there that can't be answered by the next two links. overlooking something basic is easily done. http://stackoverflow.com/questions/7709041/javac-is-not-recognized-as-an-internal-or-external-command-operable-program-or http://www.coderanch.com/t/519460/java/java/javac-recognized-internal-external-command | |
Re: create a setTextInJTextArea and getTextInJTextArea method. or, a getJTextArea, but to keep control of that textarea in the containing class, I suggest the first. | |
Re: if ( actionIsInvalid ) throw new Exception("tadaaaa!!!"); | |
Re: to display you don't need a returnValue, you just need to call the setText method of that JTextArea. | |
Re: what level you are? ehm, I would say the level of a first-year (maybe second year) college student who takes a programming course in Java. In the list you've provided, there's nothing but very basic concepts, so no real fuss there. also, the code you've shown, once decently refactored, might … | |
Re: integration of Java into mysql???? that's not really the way it works. you use a connector to connect your project to a db, and you just write Java code. just make sure the server of the db is running when you try to access it. do you have any experience … | |
Re: if you don't know how to work with libraries, I would suggest first learning that. there's no use jumping straight into a professional IDE if you don't know the basics. since you're trying to find the IDE that supports that package .. every IDE can work with it, you don't … | |
Re: actually, willjohanz: those blanks are where YOU are supposed to fill the answer. how about you at least give it a try, instead of plan on cheating without any effort? | |
Re: why do you return null from those methods? I think it would be better to throw an Exception from the catch block, or have your method throw the exception instead of handling with it. the main method is just a test class ... yeah well, since we don't know what … | |
Re: don't use a while loop for that, it'll block all the code that is not within that while loop. use a Thread instead. | |
Re: you can use String's split method with comma as separator, and then check if the 6th element is Y. if so, print, if not, don't. | |
Re: in what IDE you made your project is irrelevant. first: why on earth would you want to make an exe? if need be: there are tons of applications "out there" that can create an exe based on your .jar file, which you can find in the dist folder of your … | |
Re: why in your tomcat configuration? just because the users shouldn't be able to log in, doesn't mean your tomcat should stop working, right? just configure your application or service right. your servlets run server side, so that should be "safe" (if you configure it decently, that is). and add a … | |
Re: this is a very weird question.... they're two components that should be used together. a servlet is supposed to contain your business logic (your actual Java code), while a jsp file is only supposed to contain the GUI and calls to the servlets. yes, you can put Java code directly … | |
Re: you can write an algo rithm like the kids do at first/second grade: 13/5? =+> 1/5 = 0 (keep the one) add next digit: 13/5 = 2 (loose the 10 => 2*5) no next number, so: 13/5 = 2 with rest 3. as in we're going to write the code … | |
Re: seems like a weird output to me. anyway, in your package explorer it's pretty easy to add external libraries to your project. some pointers though: 1. don't hardcode username and password and other DB specific info. store them in properties or xml files, that way, you won't have to recompile … | |
Re: that means you are calling an instance of an object and try to perform an action on it, or use it in any way that the jvm is expecting an actual instance, but you haven actually instantiated it yet, meaning the instance still has the default value for an Object … | |
Re: NormR1 is right, just creating a file with a certain extension can be done easily like [Code=Java] File myFile = new File("testfile.qrr"); boolean created = myFile.createNewFile(); [/Code] but it would be nothing more than a txt file with a different extension. it'll take more than just to change the extension … | |
Re: is there somewhat of a client application on the 2nd computer connected to that web-app? | |
Re: I don't think you grasp the inheritance principle very well. your SortSalon should not extend HairSalon. not only aren't you using it, it makes no sense to do so. just have your HairSalon class implement the Comparable interface, and create the implementation of compareTo as you see fit. once that's … | |
Re: Violet: you basically answered that question by each and every class you've written so far. all classes extend the Object class, but I pretty much doubt you'll write your classes in the Object.class code, right? all that is needed for your class to extend a class, is that that class … | |
Re: so ... you are calling an external command prompt (not one you've written yourself) and on closing that, you want to end the running of the Java process, am I right? | |
Re: you are a final year student and you don't know how to start working on a stand-alone chat program? hmmm ... seems a bit dodgy to me, but still... there are several ways you can go: RMI, JNDI (for example) .. RMI does have a bit of a problem though, … | |
Re: what do you mean "using it"? using it as an executable, running it by clicking it? anyway, if a .jar file doesn't run on one system, but does on another, the problem is usually that either the non-functioning one either doesn't have a jre installed, or hasn't got it's environment … | |
| |
Re: then read the previous reply (which has been there for 4 years already, so the "but that wasn't there when I posted mine" excuse won't fly. do understand that, since Oracle is planning to remove jdbc from Java in the upcomming version, you may want to choose to look for … | |
Re: and what exactly are you having trouble with? can you show us the code you've got so far and tell us where it's going wrong? | |
Re: the code is underlined in red. doesn't really tell us much. what exactly are you trying to do, show an image in a Swing GUI? | |
Re: you don't need to add the @Override annotation in order to actually override the method. the Object class contains a toString method as base funcionality, so each and every class have a toString method (even if it's just the one they inherit from Object). actually, when you perform something like: … | |
Re: actually: the answer to each and every one of your questions is: by writing the code to do that. > I got the GUI made ... what do you mean by that? you wrote the code, or are you using a Swing editor like the NetBeans editor. also: why building … | |
Re: not .. learn how to use servlets, and write your code as such that your jsp files communicate with those servlets. I can recommend the "Head First Servlets & Jsp - 2nd edition" | |
Re: rubberman: read any decent (and correct) text on Java, it'll state that Java doesn't use pointers. I can assure you, the official pages and articles about Java do. (and I'm pretty sure the creators of Java were well aware whether or not Java uses pointers when writing those texts) | |
Re: > import java.util.Scanner; > public class sortString { > public static void main(String args[]){ > Scanner input=new Scanner(System.in); > String s; > String reverse=""; > System.out.println("Enter String:"); > s=input.next(); > for(int i=0;i<s.length();i++){ > reverse=s.charAt(i)+reverse; > > > } > System.out.println("Reverse String= "+reverse); > > } > > } > don't … | |
Re: a remark on cool_zephyr's post: public static void showFeet(double meters) { double feet= meters * 3.2; return feet; } no ... this is not how it should be. this wouldn't even compile. maybe like this: public static double showFeet(double meters) { double feet= meters * 3.2; return feet; } or … | |
Re: > A car travelled 28km from A to B in 30 minutes. If the distance between A and B is 36km,Then what is the speed of the car in kmph? well ... the distance isn't 36 km. this is an 'impossible to answer question' as is. we know the time … | |
Re: on the ubuntu fora there are already threads where te installation of eclipse is handled: [one way](http://askubuntu.com/questions/206379/install-eclipse) [other way](http://askubuntu.com/questions/26632/how-to-install-eclipse) | |
![]() | Re: well, sure. you can read those numbers (nr of numbers to input, lower and upper boundary) by using an instance of the Scanner class. http://docs.oracle.com/javase/tutorial/essential/io/scanning.html `new Scanner(System.in);` allows you to read those numbers from the command line. just check the [Scanner api page](http://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html) to see what method you need. |
Re: very urgent, is usually a rought translation of: > Yeah, I was given this task two weeks ago, but didn't bother until five minutes before the deadline. so I think it's clear why we don't all jump to the occasion of doing your job for you. first thing you do: … | |
Re: Aries: this entire forum is about helping people in Java. ver few appreciate getting pm's and/or personal mails. the point is to ask questions in a (new) thread on this forum, so that everyone can benefit from the replies and sollutions that are provided by the members (and so more … |
The End.