2,777 Posted Topics

Member Avatar for Monkey101

What packages are you using? I don't find the Pixel class in the Java Se API doc. Have you printed out the x,y locations of the source and target pixels to see if their values are correct?

Member Avatar for NormR1
0
694
Member Avatar for KRUX17
Member Avatar for crownedzero

Can you make a small, simple, single program file that shows the problem you are working on? Or merge the six files into one file and post that.

Member Avatar for crownedzero
0
264
Member Avatar for amahmoud

Also posted at http://forums.devshed.com/java-help-9/database-in-java-934288.html

Member Avatar for NormR1
0
41
Member Avatar for KRUX17

Please post the full text of the error message that shows where the error occurs. What statement causes the exception? > method whose result type is void? The posted method is defined with return type of void on line 1. It can not return a value on line 12. Change …

Member Avatar for KRUX17
0
298
Member Avatar for dana.persad.5

Do you have any specific questions you'd like to ask about your assignment?

Member Avatar for javabitch.04
0
135
Member Avatar for Arabian filly
Member Avatar for Viped
Member Avatar for germainelol1

> how to compare these 2 Term objects Would the two terms be equal if their coef and expo values were equal? The equals() method would need to cast its arg to a Term object and access its contents.

Member Avatar for JamesCherrill
0
503
Member Avatar for taylor.mitchell.353

> java.lang.OutOfMemoryError: Java heap space That's usually caused by recursive calls. Check you code to make sure there is no recursion. How many lines does it read from the input file before the error happens? You need to post the input file to allow us to test the code.

Member Avatar for taylor.mitchell.353
0
705
Member Avatar for ThisIsMeOrIsIt

> ArrayIndexOutOfBoundsException: 6 > at programfour.ArrayReader.main(ArrayReader.java:28) The index used on line 28 is past the end of the array. What are the dimensions of the array? Which index is past the end? Remember that the max value for an index is the array length-1. An array defined with 5 elements …

Member Avatar for ThisIsMeOrIsIt
0
2K
Member Avatar for jamesperkins0

Where in the posted code is the problem? I can not find: tutormin in the posted code.

Member Avatar for jamesperkins0
0
207
Member Avatar for bhutchison

> java.lang.NumberFormatException: For input string: "Poland" You should post the full text of the error message which gives the name of the method that threw the error and the location in the program where the error happened. I guess that the program had a String containing: Poland that it tried …

Member Avatar for JamesCherrill
0
99
Member Avatar for doomsday1216

> swing class to take user input? If from the console window, the Scanner class is easy to use. If from a dialog window, a JOptionPane could be used. If from an input field in a JFrame, a text field could be used.

Member Avatar for JamesCherrill
0
230
Member Avatar for mbarqadle

Please post the full text of the error message. An array element reference requires an index.

Member Avatar for ~s.o.s~
0
111
Member Avatar for ObSys

To run an applet you need an html file with an <APPLET tag. Load the html file into a brower or the applet viewer to execute the applet. The browser will call the applet's methods to execute it. See the tutorial for all the details: http://docs.oracle.com/javase/tutorial/deployment/applet/index.html

Member Avatar for NormR1
0
245
Member Avatar for bhutchison

> Exception in thread "main" java.lang.NullPointerException > at hutchisonbarry.Group.getAllContaining(Group.java:50) > at hutchisonbarry.HutchisonBarry.main(HutchisonBarry.java:88) There is a variable on line 50 that has a null value when the code is executed. Look at line 50, find the variable with the null value and backtrack in the code to see why that variable …

Member Avatar for NormR1
0
125
Member Avatar for FUTURECompEng

Start by making a list of the features the program should have. For example: what input does it get and what does it do with that input.

Member Avatar for FUTURECompEng
0
181
Member Avatar for greystreet34

If the number of minutes is less then 10 then you need to concatenate a leading "0" to the minutes to get the two digits.

Member Avatar for greystreet34
-1
3K
Member Avatar for IsaiahLay

How are you trying to execute the code? Are there any error messages in the browser's java console window?

Member Avatar for NormR1
0
196
Member Avatar for ibthevivin

Try debugging the code by adding some println statements to show where the execution flow goes and to show the values of the variables as they are changed and used.

Member Avatar for ibthevivin
0
191
Member Avatar for cj122

Convert the code to use a JPanel for showing components and add it to a JFrame. Rewrite the applet methods like init() and start() or call them from the class's constructor. Replace all applet methods. What happens if you change the extends to a JPanel and execute the code as …

Member Avatar for NormR1
0
258
Member Avatar for hallepalle

This thread is OLD. Please start a new thread with your problem. Be sure to post the full text of the error message and the code that caused it.

Member Avatar for NormR1
0
15K
Member Avatar for lovebirds

> check wether the values displayed in the label is 0 or not What is the value returned by the getText() method? Print it out so you can see if it is "0".

Member Avatar for NormR1
0
38
Member Avatar for ObSys

> compile the class but it comes up with an error Message saying "Could not find the main class: zellers.algorithm.Main. Program will exit." That sounds like an execution time error, not an error from the javac compiler program. Do you understand packages and how putting a class in a package …

Member Avatar for NormR1
0
172
Member Avatar for Morbs

Make sure the variables are defined in the same scope (within the same pair of {}s) as where you are trying to use them. They need to be defined at the class level if you are going to reference them in different methods.

Member Avatar for Morbs
0
626
Member Avatar for jg1405

Can you explain what your problem is and ask some specific questions about it? Can you add some comments to the posted code that describe the steps that they are taking to solve the problem. For example what is the for loop at line 5 supposed to do?

Member Avatar for NormR1
0
158
Member Avatar for jamesperkins0

Can you post what the agentreport.txt file should contain? Here's what I get: > > > COMMERICAL > FARM > LAND > RESIDENTIAL > > 101 600000.00 > 105 30000.00 > 106 200000.00 > 107 1040000.00 > 110 250000.00 Add some debug println statements in the pTypes method to show …

Member Avatar for jamesperkins0
0
469
Member Avatar for j.jroxs

> array should be inside of class or inside of the void setString method. If you want the contents of the array to be avaiable after execution leaves the method, you should define the array at the class level. If the array is discarded when the method exits, it can …

Member Avatar for NormR1
0
125
Member Avatar for hwoarang69

Can you add the needed import statements so the code will compile and also post the html needed to execute the applet so the code can be compiled and tested?

Member Avatar for hwoarang69
0
291
Member Avatar for alikhandro
Member Avatar for javaprog200

Is the keyPressed() method ever called? > unable to register the right key event from this program Can you explain what "to register" means? What do you want the code to do? What does the code do now?

Member Avatar for javaprog200
0
254
Member Avatar for jamesperkins0

What do the if statements do incorrectly? What happens when the code executes? Can you show the output and explain what is wrong with it? Can you explain how the program is supposed to work? What does the program do, what does the user do and what does the program …

Member Avatar for jamesperkins0
0
393
Member Avatar for JamesCherrill

I prefer the second method because when I use the editor's "Find matching brace" function from a } it displays the line with the statement I'm looking for. With the { on an empty line I have to scroll up one to see where I am in the code. That's …

Member Avatar for JamesCherrill
0
379
Member Avatar for PriteshP23

What happens when you compile and execute the code? There are several extra spaces in the posted code. Is what you posted copied from your code or did you type the post in from memory?

Member Avatar for PriteshP23
0
187
Member Avatar for Muzzla
Member Avatar for NormR1
0
620
Member Avatar for Ubi2073

Does the code read in the numbers OK? Print them out to see what is being read in. Have you tried to manually encode a single letter and decode it to verify that you understand the algorithm?

Member Avatar for NormR1
0
296
Member Avatar for Lamirp

Make sure the definition of the inFile variable is in scope where you are trying to use it. In scope means defined within the same pair of {}s where it is being referenced.

Member Avatar for Lamirp
0
187
Member Avatar for alastair1008

Can you post the contents of the command prompt window when you execute the jar file? On windows: To copy the contents of the command prompt window: Click on Icon in upper left corner Select Edit Select 'Select All' - The selection will show Click in upper left again Select …

Member Avatar for alastair1008
0
222
Member Avatar for hwoarang69

What are the possible combination of values of the variables you are testing in the paint method? With the chained if/else if statements the first one that is true is the only one that will be executed. Is that what you intend? BTW `if(jump)` is sufficient. You don't need == …

Member Avatar for NormR1
0
247
Member Avatar for Tomi1988

Java passes variables by value. You can not change the value of the original variable. Some objects like Strings are immutable and their contents can not be changed. The contents of objects like a List can be changed.

Member Avatar for JamesCherrill
0
242
Member Avatar for gaurangj

Add a call to the printStackTrace() method to the catch block to get more information about where and what exception is being thrown.

Member Avatar for NormR1
0
174
Member Avatar for taylor.mitchell.353

Can you post a small, complete program that compiles, executes and can be used for testing?

Member Avatar for NormR1
0
219
Member Avatar for Aninda

Should the if on line 69 fall through to the next if on line 74? What if the condition on line 69 is false?

Member Avatar for NormR1
0
190
Member Avatar for KRUX17

A question: Why do you create an Orderbook object on line 17? If you don't assign what is returned by the new, the object will not be avaiable for use anywhere. There must already be an object existing for the addNewOrder()method to be called.

Member Avatar for KRUX17
0
174
Member Avatar for tingwong

Try debugging the code by print out the value of i every time it is changed as the loop executes. Also print out the value of c that goes with that i value.

Member Avatar for JamesCherrill
0
1K
Member Avatar for laguardian

> how do I access the printElements method from main Since that method is static you can call it directly from the main() method without creating an instance of the class.

Member Avatar for NormR1
0
141
Member Avatar for bcassillo

> I keep getting an out of bounds error. Can you post the full text of the error message that shows where the error happens and what the value of the index is?

Member Avatar for NormR1
0
198
Member Avatar for Monkey101

What are the coordinates for the pixels (source and target) as they are copied? Make a loop that copies the pixels for each row inside another loop that goes through the rows.

Member Avatar for NormR1
0
114
Member Avatar for Malymieczek

Can you post the console that shows the input to the program and what the program prints out? In windows To copy the contents of the command prompt window: Click on Icon in upper left corner Select Edit Select 'Select All' - The selection will show Click in upper left …

Member Avatar for NormR1
0
165

The End.