2,777 Posted Topics

Member Avatar for danny.vin

Are you trying to create a simple IDE? Something that will allow you to edit the source and compile it?

Member Avatar for stultuske
0
202
Member Avatar for cor.vandijk.779

You will need to convert the String obtained from the textfield to a Color object. One way would be to use a chain of if/else if statements to compare the String and set the Color, or switch with 1.7, another would be to use a Map<String, Color> that has been …

Member Avatar for JamesCherrill
0
239
Member Avatar for njbst18

The posted code looks in a folder relative to the current directory for the image files it is trying to read. Can you put the images inside of the jar file? If so, you could treat the image file as a resource and use the ClassLoader's getResourceAsStream() method to get …

Member Avatar for NormR1
0
752
Member Avatar for osiron

Have you tried debugging the code by adding some println statements to show you what the code is doing? Try using the Arrays class's toString() method to format the array for printing: S.o.p("before=" + Arrays.toString(a)); // show before sort

Member Avatar for Taywin
0
145
Member Avatar for jamojo

What program or software is executing on the server that will read what you send it and write it to disk? You will need to tell that program the name of the file and where to save it.

Member Avatar for NormR1
0
912
Member Avatar for annette_arpana3

Please explain why the program can not read a String vs the number from the user? Where in the code (700+ lines) is the problem? A text field takes text (String) data, not numberic data.

Member Avatar for annette_arpana3
0
165
Member Avatar for Tajinderpal

> i want to capture the entire html page as image I assume that you are talking about an html page being displayed in a browser. And the html page is too long to view on the screen requiring that the browser scroll forward to the next viewing. You want …

Member Avatar for JamesCherrill
0
4K
Member Avatar for PhilEaton

> insert a pre-determined string into a field on the internet If you are talking about an html page that you see in a brower, you need to look at HTML and the HTTP protocol to understand how forms are filled in and submitted to a server. > programs that …

Member Avatar for PhilEaton
0
124
Member Avatar for speakon

> if(card == "2") { Use the equals() method to compare Strings. The compiler should tell you there is an unreachable statement (after return)

Member Avatar for speakon
0
1K
Member Avatar for GlenRogers
Member Avatar for Jdan2388

> have to catch the value of the handRank and add it to the last value of the handRank Are you asking how to accumulate the values of handRank across several games? Define a variable to hold the total and add the current value to it at the end of …

Member Avatar for Jdan2388
0
274
Member Avatar for magg93

You need a varable that refers to an instance of the Membership class that contains the method you are trying to call. The method and data belong to an instance of the class and are not static. > Membership.getMonth(); Replace Membership (the class name) with a variable that has the …

Member Avatar for magg93
0
545
Member Avatar for bobytch

> my do while loop never end. what does the code do to end the loop? When is y ever set false or a break statement used? > if y or n it always repeat.. where does the program look at the value that the user entered and use it …

Member Avatar for NormR1
0
1K
Member Avatar for wuguo

> I got the IndexOutOfBoundException You forgot to post the full text of the error message that shows the value of the index and where it happened in the code.

Member Avatar for NormR1
0
141
Member Avatar for Viped

By angles do you mean the changes in the x and y locations of the object as it moves? If you change only the x value then the object moves horizontally. Changes in the y value moves the object vertically. Changes of both will move somewhere in between.

Member Avatar for Viped
0
144
Member Avatar for iEpic

Where it will be executed. First thing in the main() method would be a good spot.

Member Avatar for NormR1
0
253
Member Avatar for iEpic

Make sure the image is in the location that the program is looking for it to be. Where is the image folder? Is it in the current directory for the program when it is executed?

Member Avatar for NormR1
0
4K
Member Avatar for kannan_pahang
Member Avatar for Wazzza95
0
472
Member Avatar for sammoto
Member Avatar for sammoto
0
447
Member Avatar for pendo826

Are you asking how to find a record using any one of several keys: name, id, email address? If you must use HashMaps, and all the keys are unique, then you could store references to the same record as the value using the different keys.

Member Avatar for JamesCherrill
0
1K
Member Avatar for kannan_pahang

You forgot to post the code you are having problems with and your specific questions about those problems. If you are getting errors, please copy and paste here the full text of the error messsages.

Member Avatar for JamesCherrill
0
105
Member Avatar for efth

Can you post an example of where you are having a problem with the scope of a variable? A return statement can return any single value to the method's caller.

Member Avatar for jLocke
0
254
Member Avatar for Viped

> when I am trying to get it work from third class it wont show up Can you give the name of the "third class" and explain how you are using the Laatikko class? The posted code creates three instances of the class on lines 57, 59 and 68. What …

Member Avatar for Viped
0
289
Member Avatar for Massa3332

Do you have code for testing? Post a small program that compiles, executes and shows the problems. How have you tried debugging the code? I don't see any println statements to print out the values of the variables as they are changed and used to control the codes execution. try …

Member Avatar for JamesCherrill
0
216
Member Avatar for sarathsshanker

> man.Phone@4830c221 What you printed was the String returned by the Phone class's default toString() method. It is made of the full classname, @ and the object's hashcode(in hex). If you want to change that String, you need to override the Phone class's toString() method and have it return the …

Member Avatar for sarathsshanker
0
2K
Member Avatar for Krokcy

Can you use a loop that reads some bytes into an array and then writes those bytes? Then reads some more and writes some more until done.

Member Avatar for Krokcy
0
4K
Member Avatar for #include <lou>

What is the relationship between the two classes? Does one create an instance of the other? If one creates the other then: When do you want to pass the values? Do you have them when you create an instance of the class? If so pass them to the class in …

Member Avatar for NormR1
0
211
Member Avatar for C:\>

Add a method in Class1 that returns ca to its caller. What is the relationship between Class1 and Class2? Does either have a reference to the other?

Member Avatar for delta_frost
0
245
Member Avatar for nikolaos

Please repost the code with proper formatting and indentation. Unformatted code is hard to read and understand.

Member Avatar for NormR1
0
485
Member Avatar for jalpesh_007

> It always execute else method and gives output "Something Wrong"... Add some more data to the printed message to describe what the problem is and give the values of all the variables being used in the if statements. The printed output should help you solve the problem.

Member Avatar for NormR1
0
2K
Member Avatar for trishtren

Does the code have compiler error messages? Please post the full text of the error messages.

Member Avatar for JamesCherrill
0
209
Member Avatar for anonb
Member Avatar for Valentinesmith
0
350
Member Avatar for alemojarro

Can you post a complete program that compiles, executes and shows the problem? It looks like you are writing the data in one format (in a binary format) and trying to read it as character data. The write and the read methods should match. You should either: Write an object …

Member Avatar for alemojarro
0
98
Member Avatar for sush jack
Member Avatar for godzab

What do you mean by "go to the next frame"? Call a method in another class that extends JFrame? Hide the current frame and set another one visible?

Member Avatar for NormR1
0
690
Member Avatar for L1ndzee

What does the SalesData class do? Where does the getTotals() method get the value it returns? When is any data put in the sales2 array?

Member Avatar for NormR1
0
404
Member Avatar for grga4life

> It gives null pointer Look at line 113 and find the variable with the null value. Then backtrack in the code to see why that variable does not have a valid value.

Member Avatar for NormR1
0
173
Member Avatar for Maymac

> java.lang.ClassNotFoundException: com.mysql.jdbc.Driver The JVM is not able to find the above named class when the code at line 101 calls the forName() method. Find the definition for the missing class and put it on the classpath. It's probably in a jar file.

Member Avatar for NormR1
0
169
Member Avatar for pooja.shinde

Can you explain how the question is related to java programming. Post the code and the full text of the error messages.

Member Avatar for pooja.shinde
0
349
Member Avatar for s.mahamure

Your question leaves out many details. How is the question related to java programming? How is the data stored? How are you reading it? What kind of app is it? What is an authentication error?

Member Avatar for s.mahamure
0
305
Member Avatar for trishtren

I don't understand your example. 16000 in hex is 0x3e80 12000 in hex is 0x2ee0 What data is input that you want the following output to create: > 78 00 07 D0 00 00 17 70 00 00 Does the above represent the byte contents in hex? When you talk …

Member Avatar for NormR1
0
464
Member Avatar for atummapala
Member Avatar for JamesCherrill
0
457
Member Avatar for willjohanz
Member Avatar for sammoto

You should not be able to directly access private members of a class. The class needs to provide methods that give you any access that the author of the program deems allowable. > I want to know access the "value" of a Card in the "cards" of "pile". What about …

Member Avatar for sammoto
0
192
Member Avatar for msd153

The problem could be where to restart the scan. If each line is independent of all other lines, then it might be possible to start the scan on the next line. But if there is nesting of statements, there could be lots of errors as James said. As a student …

Member Avatar for NormR1
0
203
Member Avatar for GlenRogers

Post a small complete program that compiles, executes and shows the problem.

Member Avatar for GlenRogers
0
241
Member Avatar for pooja.shinde

Can you give an example? The currentTimeMillis() method returns a long representing the elapsed time from a fixed time.

Member Avatar for pooja.shinde
0
244
Member Avatar for trishtren

> two other bytes that have already been created Where are the bytes that "have already been created"? If in an array and the array is not full, then you need to move all the elements to the right at the insert point. If the array is full, then you …

Member Avatar for trishtren
0
182
Member Avatar for hwoarang69

> i want enemy to move closer to player Test if the player is to left (minus) or right (plus) and change the x value accordingly. The player is to the left if its x value is less than the enemy's x value.

Member Avatar for NormR1
0
186
Member Avatar for shasha56959

> stuck when i want to try to put the relation into the two dimension array. Can you define what a "relation" is and how it's value is put into the array? You need to explain what goes into each row and column of the 2D array.

Member Avatar for NormR1
0
158

The End.