2,777 Posted Topics

Member Avatar for WargRider

[QUOTE]starts a new game window that is ALL blank[/QUOTE] What should the window show? And when should it show it? [QUOTE]but then went blank [/QUOTE] What made it go blank? Look at the logic of the code to see why the above is happening.

Member Avatar for NormR1
0
104
Member Avatar for soumya_mjmder
Member Avatar for NormR1
0
4K
Member Avatar for shirup
Member Avatar for NormR1
0
105
Member Avatar for pi_lord12
Member Avatar for darling332001

[QUOTE]How do I get the program to wait until information on all cats have been inputted before returning the answer that fits the "if" [/QUOTE] Are you gathering the info inside a loop? Where is the end of the loop? Move the question/"if" outside of the loop so that it …

Member Avatar for tong1
0
268
Member Avatar for smoothe19

Look at encrypting and decrypting the password. Look at using the javax.crypto package. No idea how to use it. Best google for some samples

Member Avatar for NormR1
0
91
Member Avatar for jiraiya

Have you tried printing out the values being tested before the tests? System.out.println("characters.size()=" + characters.size() + " vs eS=" + expectedSize); FOr all three arrays after their references are set?

Member Avatar for Taywin
0
100
Member Avatar for ttboy04

[QUOTE]the set returned by getFruits()[/QUOTE] It'd help if you defined what type of data (the java class) is returned by the getFuits() method.

Member Avatar for ttboy04
0
137
Member Avatar for smoothe19

The output you've posted is hard to understand. Can you show the ordering you would like for the characters: a A b B c C 1 2

Member Avatar for NormR1
0
435
Member Avatar for WargRider

Have you tried a small test program to work out the details on this technique? Something you could post here for others to work with.

Member Avatar for WargRider
0
348
Member Avatar for nettle4k

[QUOTE]how to link them to my draw method.[/QUOTE] Normally you draw in the paintComponent() method for the GUI component that is to show the drawing. The GUI collects the input from the user (rect coordinates) and waits for the user to press a button. The action listener for the button …

Member Avatar for nettle4k
0
171
Member Avatar for jefferlyn92

Everything in the computer is in binary, I assume that its the representation of that binary data as Strings that you are talking about. What data type do you have as input and what type do you want as output. For example if the input is an int and the …

Member Avatar for NormR1
0
68
Member Avatar for P00dle

[QUOTE]Whatever I try,[/QUOTE] Can you show us what you have tried? [QUOTE]set the cells to the correct values[/QUOTE] What values does it set them to?

Member Avatar for P00dle
0
75
Member Avatar for djenoe
Member Avatar for Cort3z

[QUOTE]how to make this work[/QUOTE] I think we'll need a fully working program to solve this. Can you make a small program that executes and demos the problem?

Member Avatar for Cort3z
0
68
Member Avatar for divya bangroo
Member Avatar for steph47
0
111
Member Avatar for mgd00tz

Please use code tags when posting your code. Please copy full text of error message and paste it here. Here is a sample: [QUOTE] TestSorts.java:138: cannot find symbol symbol : variable var location: class TestSorts var = 2; ^ [/QUOTE]

Member Avatar for NormR1
0
1K
Member Avatar for Bewitched

When testing Strings for equality, use the equals() method. The == operator does not test the contents of an object. It tests if two pointers point to the same object. Also look at the method that ignores case.

Member Avatar for pi_lord12
0
180
Member Avatar for smoothe19

Extent the blah JPanel class and override its paint method with your drawing code.

Member Avatar for NormR1
0
64
Member Avatar for SashaC

Try debugging your code by adding println() statements to show execution progress and how variable values are changing. It would help someone trying to look at your code quickly if you'd put a comment in the code like: // **** LOOK HERE **** AND tell us to look for that …

Member Avatar for NormR1
0
238
Member Avatar for interjuan

How do you know if anything was returned by the readLine()? Add a println("temp=" + temp +<") statement immediately after the readLine() to show what was read. Maybe it has read a 100 lines and is waiting for 101st. Also you could use the available() method to see if there …

Member Avatar for NormR1
0
130
Member Avatar for roishtraifler

Try debugging your program by adding println() statements to show where it is executing and how the variables are changing value.

Member Avatar for NormR1
0
148
Member Avatar for ans025

How are you executing the program? Are you using the java command? The error message says you entered: java HomeField.HomeField as the commandline. Try java HomeField

Member Avatar for NormR1
0
1K
Member Avatar for makan007

Read the API doc for the split() method. Where (what index) in the array returned by split() would the desired word be?

Member Avatar for java_programmer
0
138
Member Avatar for Dzero

[QUOTE]i have many errors that i cannot solve[/QUOTE] See 3. above. We can't help you without the full text of the error messages you are getting.

Member Avatar for NormR1
0
220
Member Avatar for Hunter2379

Are you saying that The server is at that IP address and the client uses that address in a Socket trying to connect to the server? Is there a firewall or other software involved?

Member Avatar for NormR1
0
93
Member Avatar for SashaC

You have defined many String[] selection as local variables. When execution moves out of the {} enclosing the definition, the variables are no longer defined. Move the definition of selection out of the methods to where it is in scope for the methods that need it. Read up on "scope" …

Member Avatar for JamesCherrill
0
180
Member Avatar for Guest51

[QUOTE]variable DvdTitle might not have been initialized[/QUOTE] Where is the variable: DvdTitle initialized? The compiler wants you to assign it a value before you try to use it.

Member Avatar for NormR1
0
139
Member Avatar for dupowdis

Write the program in steps. First step is to read in the lines from the file. To verify its working, use System.out.println(...) to show them. When you can do that, we'll move on to the next step: parsing out the values you want.

Member Avatar for dupowdis
0
126
Member Avatar for papay0011
Member Avatar for bin shahid

Read the Java Tutorial about network programing. You'll need to understand how to use Sockets, HTTPConnections, URLs and InputStream classes. Also reading about HTML and and the HTTP protocol will help you understand how clients and servers communicate.

Member Avatar for NormR1
0
205
Member Avatar for yurixzach

Can you explain what you are trying to do and what the problem is? Recommendations: Don't be so lazy when typing in the names of variables. Give them names that mean something. Do Not use short names like: n, i, y, c. [CODE]name=n; id=i; year=y; course=c;[/CODE] Instead of reading into …

Member Avatar for NormR1
0
138
Member Avatar for stark025

Your conversions from month of year (int) to the name of the month looks weak. Anytime there is a bunch of repetitive if's like that look to put the data in a collection of some kind with a lookup or direct indexing. The list of ifs should be if{} else …

Member Avatar for NormR1
0
221
Member Avatar for jefferlyn92

Read the API doc for the String class to see how to get each character one at a time. See the Integer class for how to convert an String character to an integer.

Member Avatar for ANDIEniable
0
648
Member Avatar for seanvitalaim

[QUOTE]<identifier> expected[/QUOTE] The compiler is looking for a data type like int or double. Look at how to define a method.

Member Avatar for NormR1
0
99
Member Avatar for aditya027
Member Avatar for Guest51

[QUOTE]creates a crash[/QUOTE] When you get errors, please copy and paste the full text here.

Member Avatar for JamesCherrill
0
207
Member Avatar for RaniThomas

Use the javac command to compile a java program. There are NO requirements for any methods in a class to be able to compile it.

Member Avatar for Taywin
0
158
Member Avatar for chinee

See also other thread on same topic: [URL="http://www.daniweb.com/forums/thread295305.html"]http://www.daniweb.com/forums/thread295305.html[/URL]

Member Avatar for NormR1
0
248
Member Avatar for Derrin

Please put posted code in code tags. Unformatted code is hard to read. What are your problems? Can you ask specific questions about them?

Member Avatar for JamesCherrill
0
177
Member Avatar for moddie

[QUOTE] allows users to login[/QUOTE] What does login mean? Using an applet implies that there is a server somewhere that the applet is loaded from. If there is no server, then the program should be an application not an applet. [QUOTE]without using a database[/QUOTE] Yes there is no need for …

Member Avatar for NormR1
0
143
Member Avatar for seanvitalaim

Code test = new Code (var1, var2, var3); yes, that looks Ok if the Code class constructor takes 3 args and types of the args match the constructor.

Member Avatar for NP-complete
0
151
Member Avatar for yasin.mr

Please use code tags when posting code. Also please add some comments to the code describing what it is you want the code to do.

Member Avatar for JamesCherrill
0
99
Member Avatar for seanvitalaim

No, you can't create variables like car01 at runtime. You can use a Map(like HashMap) and save data in it using a key = "car01" with any value you want.

Member Avatar for JamesCherrill
0
221
Member Avatar for gunjannigam

[QUOTE] configure the server[/QUOTE] Read the doc for the server and see what it says about FTP.

Member Avatar for NormR1
0
60
Member Avatar for joe_ojah

[QUOTE]package the database in the jar file [/QUOTE] You can add files to a jar file by using the jar command.

Member Avatar for NormR1
0
92
Member Avatar for Sunshineserene

Say a row = a line and a column a word on that line. Create a 2 dim array with first dim >= number of lines in file Read in file and parse words of each line into an array and add that array to the first array at its …

Member Avatar for NormR1
0
241
Member Avatar for jemz

You need to use another collection of some type to accumulate the counts for each of the elements in the array. One class to use could be a Hashtable with the element as the Key and the value as the count. For a small range of integers, you could use …

Member Avatar for jemz
0
5K
Member Avatar for fsl4faisal
Member Avatar for echellwig

The End.