1,963 Posted Topics

Member Avatar for traversio
Re: hai

Nice to meet you too. Although this is not the right thread for introductions

Member Avatar for javaAddict
0
18
Member Avatar for ashishdmc4
Member Avatar for saraguna

[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 …

Member Avatar for javaAddict
0
175
Member Avatar for kathmartir

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 …

Member Avatar for FriQenstein
0
5K
Member Avatar for redlyfs

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]

Member Avatar for redlyfs
0
222
Member Avatar for jen140

[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]

Member Avatar for jen140
0
406
Member Avatar for dhanh90
Member Avatar for ahmedshayan

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, …

Member Avatar for javaAddict
0
785
Member Avatar for Derice

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

Member Avatar for javaAddict
0
123
Member Avatar for ZER09

[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 …

Member Avatar for .11
0
80
Member Avatar for Ranek

Put everything in a separate method. Have result, input and exchange as arguments and return the output123.

Member Avatar for Ranek
1
392
Member Avatar for ratnasatish

[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 …

Member Avatar for javaAddict
0
130
Member Avatar for gpremkum

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

Member Avatar for jonelynne
0
90
Member Avatar for bruceaj

[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 …

Member Avatar for bruceaj
0
120
Member Avatar for timon_zed

[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 …

Member Avatar for javaAddict
0
142
Member Avatar for 00darbo

From the error: [QUOTE] cannot find symbol symbol : constructor NsccLine() [/QUOTE] That means the class NsccLine doesn't have a constructor with no arguments

Member Avatar for javaAddict
-1
94
Member Avatar for morgoe

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 …

Member Avatar for javaAddict
0
139
Member Avatar for hello214

[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

Member Avatar for javaAddict
0
168
Member Avatar for _dragonwolf_

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')) { } …

Member Avatar for _dragonwolf_
0
2K
Member Avatar for dannyboiii

[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; …

Member Avatar for BestJewSinceJC
0
296
Member Avatar for izzet

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 …

Member Avatar for javaAddict
0
108
Member Avatar for peter_budo

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

Member Avatar for peter_budo
3
88
Member Avatar for themafia_69

[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

Member Avatar for javaAddict
0
177
Member Avatar for akulkarni

[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] …

Member Avatar for akulkarni
0
133
Member Avatar for r0n

[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]

Member Avatar for javaAddict
0
131
Member Avatar for javapal

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]

Member Avatar for mrnutty
0
102
Member Avatar for rp_prasanna

Have you tried using another attribute than "disabled". The input "text" has an attribute "readonly". Search what other attributes the checkbox has.

Member Avatar for javaAddict
0
54
Member Avatar for javaAddict

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 …

Member Avatar for javaAddict
0
127
Member Avatar for madeltweenlibra

[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 …

Member Avatar for javaAddict
-2
305
Member Avatar for Edvin

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.

Member Avatar for javaAddict
-3
135
Member Avatar for shuchi.vishnoi

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 …

Member Avatar for Thirusha
0
173
Member Avatar for mactavish

[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 …

Member Avatar for quuba
0
70
Member Avatar for Sinh

[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?

Member Avatar for Sinh
0
179
Member Avatar for low1988

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' …

Member Avatar for javaAddict
0
127
Member Avatar for kulrik

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 …

Member Avatar for javaAddict
0
313
Member Avatar for sxk

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 …

Member Avatar for javaAddict
0
120
Member Avatar for shroomiin

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 …

Member Avatar for javaAddict
0
124
Member Avatar for raneen
Member Avatar for ejosiah
-3
262
Member Avatar for bharath1

[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?

Member Avatar for javaAddict
-2
91
Member Avatar for mmiikkee12

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 …

Member Avatar for javaAddict
1
157
Member Avatar for gotm

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?

Member Avatar for javaAddict
0
172
Member Avatar for gtey

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

Member Avatar for javaAddict
0
137
Member Avatar for farzanehmif

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 …

Member Avatar for masijade
-10
94
Member Avatar for Teethous

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 …

Member Avatar for Teethous
0
180
Member Avatar for guilh_22

[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.

Member Avatar for javaAddict
0
135
Member Avatar for jrosh

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]

Member Avatar for javaAddict
0
77
Member Avatar for jrosh

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]

Member Avatar for javaAddict
0
88
Member Avatar for mhil_joy

- 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!"); …

Member Avatar for javaAddict
0
85
Member Avatar for JimD C++ Newb

[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 …

Member Avatar for javaAddict
0
95
Member Avatar for Bloubul

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

Member Avatar for javaAddict
0
267

The End.