1,963 Posted Topics
| |
| |
Re: [QUOTE=Josseling;1024833]Para que se usa el string.value, ayudenme a crear una clase cuenta. Manda a pedir si quieres crear una cuenta de ahorro o una de credito...[/QUOTE] Αυτό το thread είναι από το 2005. Αν έχεις να κάτι να πεις πόσταρε στα Αγγλικά. Do you see how frustrating it is that … | |
Re: When I want to go from one frame to another I use: [CODE] JFrame.setVisible(true/false); [/CODE] If you call it with false, the frame is not lost. It is just not visible. Meaning that you can call back the same method and set it to visible(true) whenever you want and the … | |
Re: Your question has been answered: [URL="http://www.daniweb.com/forums/thread232053.html"]http://www.daniweb.com/forums/thread232053.html[/URL] If this answers your question give a positive rep to [I]BestJewSinceJC[/I] | |
Re: [QUOTE=jen140;1022117] int i=123; System.out.println(i[1]); Any ideias?[/QUOTE] 'i' is an int, not an array: [CODE] int [] i = new int[2]; i[0] = 1; i[1] = 2; i[2] = 3; System.out.println(i[1]); [/CODE] | |
Re: The code doesn't compile. Post the correct code | |
Re: What is wrong with your withdraw? You have the balance in your class. It should take only one argument, the amount to deduct: [CODE] withdraw(float amount) { if (balance >= amount) { balance = balance - amount; } else { System.out.println("Not enough money"); } } [/CODE] Then at the main, … | |
Re: If this is what you want to enter: John Smith, then try inserting "John Smith" By the way you don't say what exactly is you problem and what you are trying, to do. Post your inputs, what it is stored in the variable and what you wanted to be stored | |
Re: [QUOTE=ahmadramadan;1018336]i designed normal calculator application........if u want just tell me to send it for u and tell me the modifications u need...... SNIP[/QUOTE] Please don't do that again, as [I]masijade[/I] has mentioned. It makes the rest of us look stupid. As if we couldn't write similar code or we are … | |
Re: Put everything in a separate method. Have result, input and exchange as arguments and return the output123. | |
Re: [QUOTE=krishna990;1018718]how to mearge two file where one is exel file and another is java file[/QUOTE] Start a new thread for your question and do you want to know it can be done using code? Because I don't know how to do this without code. One is a java file, the … | |
Re: Well the code runs as it's supposed to be. The code is not very complicated to provide any suggestions on how to do things differently | |
Re: [URL="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JComboBox.html"]javax.swing.JComboBox[/URL] When you add an Object to the Combo Box, the toString() method is called and it displays that at the GUI: [ICODE]void addItem(Object anObject)[/ICODE] The method [ICODE]Object getSelectedItem()[/ICODE] gets you the item you have selected. So create an object with all the info from the DB including the primary … | |
Re: [ICODE](day1.after(day2)[/ICODE] day1 and day2 are Strings. They don't have an after method: [QUOTE] The method after(String) is undefined for the type String [/QUOTE] You should be able to figure that out. I would suggest your methods to return the date object since it has these methods: [CODE] public static Date … | |
Re: From the error: [QUOTE] cannot find symbol symbol : constructor NsccLine() [/QUOTE] That means the class NsccLine doesn't have a constructor with no arguments | |
Re: I don't think it's possible. Whenever you type something it is stored in the variable, therefor you need an if statement, but I would suggest to wait for other people responses as well in case someone has a better answer. Actually there is something that can simulate that. Write a … | |
Re: [CODE] nf.format(calcTaxes (grossPay)) [/CODE] How do you define the "nf"? I would suggest to write a simple program with only a double number and the Formatter, and try to print it the way you want. Once you accomplish that, transfer the Formatter to your main method | |
Re: This is totally unnecessary: [CODE] [B][COLOR="Red"]stringArray.toString();[/COLOR][/B] System.out.println("Alpha"); [/CODE] It doesn't do anything. You don't need it. And put the if statements in the for loop: [CODE] for(int i = 0; i < stringArray.length; i++) { char ch = stringArray[i]; if ((ch=='a')||(ch=='A')) { System.out.print("Alpha "); } else if ((ch=='b')||(ch=='B')) { } … | |
Re: [QUOTE=dannyboiii;1015387]can anyone please help me start the min,max and avg off? with some examples. ill appreciate that a lot[/QUOTE] Assuming that you have a while loop from which you read the numbers from the keyboard, then: [CODE] Scanner in = new Scanner(System.in); int sum = 0; int count = 0; … | |
Re: To [I]pardon_garden[/I] [CODE] ResultSet rs = s.executeQuery(sql); return (rs == null) ? null : rs; [/CODE] First of all, this: [ICODE]ResultSet rs = s.executeQuery(sql);[/ICODE] [U]never[/U] returns null And also this is very "not inteligent": [ICODE]return (rs == null) ? null : rs;[/ICODE] If it is null return null, if it … | |
Re: I have been reading this thread and didn't notice the poll. I believe the "Read Me" thread with the MVC tutorial is very nice guide to start with. But we do need a guide with links to tutorials that will cover the aspects described in the tutorial with more detail | |
Re: [QUOTE=heart_18;1014909]write a program that will accept an integer number from 0-9999. Then, convert this number into words[/QUOTE] Start a new thread | |
Re: [QUOTE=akulkarni;1008319]i am trying to learn servlets so i downloaded tomcat server.I learned that i have to do this...set path=c:\tomcat\lib\servlet.jar or click the exe file tomcat6 in the bin folder. I tried to connect with localhost8080 it is not working.I am not getting Tomcat home page. Any help will be great.[/QUOTE] … | |
Re: [URL="http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html"]java.text.SimpleDateFormat[/URL] [URL="http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html"]java.text.DecimalFormat[/URL] | |
Re: The method that [I]di2daer [/I] is referring to can be found here: [URL="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html"]java.lang.String[/URL] | |
Re: Have you tried using another attribute than "disabled". The input "text" has an attribute "readonly". Search what other attributes the checkbox has. | |
I encountered some code at work that got me thinking. There was a util - class that had some methods that had nothing to do with the state of the class. They were all "util" methods. Meaning that they could all be declared static with [U]no[/U] problem because the only … | |
Re: [QUOTE=madeltweenlibra;1012445]java programming is the latest program around the world. i am a student of computer programing our assessment are too near, i need to learn java programs in just four days starts from tomorrow ... could you?[/QUOTE] Providing private lessons is not what we do here. Check the Read Me … | |
Re: In case you haven't noticed we have October. Tanning is out of the question, unless you plan to use the application at the South hemisphere. | |
Re: You forgot to add this: [CODE] <option [B][COLOR="Red"]value="user"[/COLOR][/B]>User</option> [/CODE] I haven't read your code; just stopped reading when I reached that part. This is a site that helped me a lot to learn html and java script: [URL="http://www.w3schools.com/default.asp"]w3Schools[/URL] Also for "select" use this: [ICODE]request.getParameter("role")[/ICODE] It is used whenever you submit … | |
Re: [QUOTE=Pheng7negs;1010891]I am new in java programming i want to ask help on how to code a program method using endWith. Thanks.[/QUOTE] Start a new thread, don't hijack other's threads. Especially to post twice the same thing when the Original Poster hasn't got his answer yet. Do you think it's nice … | |
Re: [QUOTE=Sinh;1010639] I believe that OneRowNim.java is correct[/QUOTE] Why do you believe that, when you have created a new class named OneRowNim2 and in your main you call the old one? | |
Re: First of all first print the query that you run: [CODE] String query = "Select * from ACCOUNT where AccNum like '"+number+"'"; System.out.println(query); rs1 =st1.executeQuery(query); //SQL statement [/CODE] It will print: Select * from ACCOUNT where AccNum like '5' But [U]AccNum[/U] is declared as number, but when you write '5' … | |
Re: You need t o implement a for loop. I assume that you have been taught how to calculate the sum using a for loop. This is the same thing to you will need to change the firmula: sum = 1 + 2 + 3 + 4 + .... [CODE] double … | |
Re: You can access it because you write: [B][U]AShape[/U][/B].DEFAULT_SIZE If DEFAULT_SIZE is declared as static it means you don't need to initialize the class in order to call it. So whenever you call: [B][U]AShape[/U][/B].DEFAULT_SIZE you have access to the DEFAULT_SIZE of the [B][U]AShape[/U][/B] class. If TestShapes implemented the [B][U]AShape[/U][/B] then you … | |
Re: Try: [CODE] System.out.printf("The Value for X is: " + VarX); // OR System.out.println("The Value for X is: " + VarX); [/CODE] I am not familiar with printing using: [I]printf[/I]. I know that it is used to format the output, but I have never used it before. You might want to … | |
Re: [QUOTE=raneen;1009307] please i need it now[/QUOTE] Now, now, now, now, ... | |
Re: [QUOTE=bharath1;1007826]i want the code for avl trees using dictionaries in java... with total insert , delete, display options[/QUOTE] Why did you create 2 identical threads? What were you trying to accomplish? | |
Re: And you think that by posting to a [B][COLOR="Red"]4[/COLOR][/B]!!! year old thread that discusses the simple [U]Hello World[/U] program will get you an answer? This is not a thread were people can ask questions about their problem. It is a code-snippet. Here people post code that [U]works[/U] for tutorial purposes … | |
Re: Usually a NullPointerException means that you are trying to use something that is null. So if you get the exception at line 63: [CODE]_file.pixels[x][iy].setValue("b");[/CODE] it would mean that: "_file.pixels[x][iy]" is null. So how do you populate that array? | |
Re: public static void main(String []args) { javaa j=new javaa(1,2,3); j.av(); } Actually you need to call the average() method because there is no method: [U]av[/U] declared in the class. Also next time if you want code tags, please click the button labeled [code] ,when you create a new post | |
Re: I think he wants a javax.swing.* program. What you ask is impossible because we don't know your requirements. We cannot just start writing a program that does nothing using random commands with no purpose. Not to mention that we don't do other's people homework on demand. In the meantime watch … | |
Re: I believe that your problem is this: [CODE] String s1 = new String( secondLength ); .... lastName.getChars ( 0, 5, secondLength, 0 ); [/CODE] When you create the "s1" the "secondLength" array is empty. Then you call the method that gives to the array values, but the s1 was already … | |
Re: [CODE] System.out.print( df.format(montantPublicite) ); [/CODE] "System.out.print" takes what is inside the parenthesis and displays it. If you want whatever is inside the parenthesis displayed somewhere else then take it and put wherever you want. | |
Re: Don't you mean JTextField? If yes then you should use the 'getText' method. For a complete API: [URL="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JTextField.html"]JTextField[/URL] Also for the formatting: [URL="http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html"]SimpleDateFormat[/URL] | |
Re: For the simplest solution try: [URL="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/AbstractSpinnerModel.html"]AbstractSpinnerModel[/URL] and [URL="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/SpinnerDateModel.html"]SpinnerDateModel[/URL] | |
Re: - Firstly we cannot provide a [U]system[/U] using java because this is java forum not a [U]system[/U] forum. - Secondly here is any program as you asked: [QUOTE=mhil_joy;1003949] please please help me.. or [B]any program[/B].. [/QUOTE] [CODE] public class Main { public static void main(String [] args) { System.out.println("Hello mhil_joy!"); … | |
Re: [CODE] if (appointments.getName() == null){ newButton.setEnabled(true); }else { newButton.setEnabled(false); } [/CODE] According the above, the button is disabled when the the getName is not null. If it always get disabled it means it is always not null. Therefor your logic must have sort of mistake when you call [ICODE]appointments.next();[/ICODE] or … | |
Re: As JamesCherrill said, we will not read your code the way you posted it. Use code tags. When you create a new post click the code button and put your code between the tags |
The End.