2,777 Posted Topics

Member Avatar for vocater

Please edit your code and surround it with code tags. Or post it again in code tags. Code tags given by upper right icon. BTW your code is an application not an Applet.

Member Avatar for NormR1
0
149
Member Avatar for aditya027

Where are the println()s for debugging? You need to output variable values so you can see what your code is doing. See post on thread: [URL="http://www.daniweb.com/forums/post1312708.html#post1312708"]http://www.daniweb.com/forums/post1312708.html#post1312708[/URL]

Member Avatar for NormR1
0
119
Member Avatar for -Ice-

[QUOTE]i got xlint error during compiles[/QUOTE] When you get an error, please copy the full text and paste here. It saves a lot of guesswork.

Member Avatar for coil
0
105
Member Avatar for mani_1991

Explain what you want the code to do in more detail, and we'll try to help you find the java code to do it. Something like this: Start the timer, connect to a website, upload/download a large number of bytes, end the timer and compute: bytes sent/unit of time

Member Avatar for mani_1991
0
497
Member Avatar for rowley4

[QUOTE] I need to change this to accept any input.[/QUOTE] What are the possible sources for input? Files, internet connection, GUI text boxes, console input? If its console input, look at the Scanner class. There are many code samples on this forum for you to look at. Use the Search.

Member Avatar for tong1
0
301
Member Avatar for aditya027

Please repost your code using the code tags (use icon above to right of text input box) To debug your code, add println() statements to show the values of the variables that control the location of the balls. Show these values when they are changed and when they are used.

Member Avatar for aditya027
0
465
Member Avatar for niitin
Member Avatar for musikluver4

Do your browser's have a Java console? Are there any error messages in the java console? Why does the second html post show the bin folder when the first one did NOT? CODE = "bin/JDemoGraphics.class" vs <APPLET CODE = "JDemoGraphics.class" Which one are you using?

Member Avatar for DeadSoul
0
2K
Member Avatar for Bladtman242

[QUOTE]If someone would validate whether or not this code is okay[/QUOTE] How do we tell if it is ok? What are the criteria? Can you explain what the code is supposed to do? I can't see any comments in the code describing what it does.

Member Avatar for Bladtman242
0
119
Member Avatar for Megha SR

Having multiple methods with the same name is known as method overloading. It looks strange, but the compile can figure it out because the args to each method are different. The overloaded methods should have the same functionality. In your case they don't, so it be better if the method …

Member Avatar for NormR1
0
76
Member Avatar for bunifrog

One approach would be to break the code up into methods and have a master method that calls the other methods in the order you want them called in. You need to use a state indicator to remember where you are and what you have done to control what to …

Member Avatar for jon.kiparsky
0
320
Member Avatar for sportinguista

[QUOTE]need to modify some pixels from int (0-255) values to double values[/QUOTE] Are pixel values whole numbers in the range 0-255? Can you edit your post and reenter the text of the error message to preserve the line ends? What line of code in your program caused the error? [QUOTE]I …

Member Avatar for sportinguista
0
345
Member Avatar for emcyroyale

[QUOTE]I want to know if my math in the code and by hand is wrong [/QUOTE] Can you explain what your algorithm is and what you are trying to do? The title for this thread is Binary to Decimal. What format is used to represent these values? Are they both …

Member Avatar for NormR1
0
144
Member Avatar for cac186

Have you read the API doc for the text field classes? There are methods for setting the text that it displays. In Swing look at the super class for JTextField. If you have the data in a String or convert it to String, then you can put that String into …

Member Avatar for NormR1
0
291
Member Avatar for tedtdu

See cross post at [URL="http://www.java-forums.org/new-java/31802-stack-can-t-pop-off-see-code-java-problem.html#post139396"]http://www.java-forums.org/new-java/31802-stack-can-t-pop-off-see-code-java-problem.html#post139396[/URL]

Member Avatar for jon.kiparsky
0
283
Member Avatar for darling332001

[QUOTE]I need a get method which will receive the position of the variable (1,2, or 3) and will then return the variable at that position. [/QUOTE] Sounds like an application for an array. Change the word "position" to index and 'variable' to element and you're talking about arrays. An array …

Member Avatar for mikeNIkesT
0
89
Member Avatar for joker400
Member Avatar for prem2

Where is the ex_sample.class file when you execute the 'java ex_sample' command? Can the java command "see" it? The default classpath is the current directory.

Member Avatar for NormR1
0
118
Member Avatar for prem2

[QUOTE]bad class file: ./HelloWorld.java[/QUOTE] Why is it refering to a .java source file as being a bad class file? Is this an IDE configuration problem? What command do you execute to generate that error message shown in red?

Member Avatar for prem2
0
506
Member Avatar for johnbryle
Member Avatar for tedtdu

You'll probably need a LIFO stack to keep track of opening tags for matching with closing tags

Member Avatar for NormR1
0
210
Member Avatar for hazeeel

A suggestion, test text1 string is long enough before doing: coordinates1[i][2]= Double.parseDouble(text1.substring(46,56));

Member Avatar for NormR1
0
198
Member Avatar for ciali
Member Avatar for glenak

Have you tried the other write methods in the ObjectOututStream class? There are methods for different data types. [QUOTE] why I have to use the ".flush" method after using an InputStream object[/QUOTE] I don't know why you'd use flush with an InputStream.

Member Avatar for glenak
0
149
Member Avatar for nocookies92

First thing is try to debug the code by adding println()s to see where the code is executing. The code does not compile: [CODE]ClickyLatinHelp.java:78: cannot find symbol symbol : class Lists location: class ClickyLatinHelp.DrawingArea Lists listhi = new Lists(); ^ ClickyLatinHelp.java:78: cannot find symbol symbol : class Lists location: class …

Member Avatar for nocookies92
0
169
Member Avatar for herberwz

While debugging I'd add a trailing else: [CODE] } else if (e.getSource() == exitBtn) { }else { System.out.println("unhandled action " + e); // tell em about it } [/CODE]

Member Avatar for NormR1
0
117
Member Avatar for bowmaster
Member Avatar for NormR1
0
78
Member Avatar for Sunshineserene

Have you defined a second array with the same name inside the loop, hiding the public one?

Member Avatar for Sunshineserene
0
817
Member Avatar for jemimaloh

[QUOTE]the datatypes are incompatible[/QUOTE] Do you get errors? Please copy and paste the full text of the messages here.

Member Avatar for ~s.o.s~
0
133
Member Avatar for Xufyan

Add this to your code to see what you are passing to acos(): System.out.println("acos arg=" + a*(180/3.14)); // show the arg

Member Avatar for tesuji
0
697
Member Avatar for scottyg13
Member Avatar for Temmu

[QUOTE]// list of servers and up or not - the tab thing [B]needs some work[/B]...[/QUOTE] The comment says it all. Where are the arrays with the servers and the Up/down settings? You show one named: hostarray, now you need one for the status. Read up on how to use a …

Member Avatar for NormR1
0
104
Member Avatar for junichiro90

[QUOTE]can i do it in other way beside database?[/QUOTE] Yes but. As an alternative you could design a way to use files and folders to store your data. The keyword here is design. Some day though you will have to learn databases.

Member Avatar for JamesCherrill
0
126
Member Avatar for capsitan

[QUOTE]variable wage might not have been initialized[/QUOTE] Give it a value when you define it. Add a / in the ending code tag

Member Avatar for tong1
0
161
Member Avatar for playdaguigame

[QUOTE] gives me my error message - "problem with showdata" [/QUOTE] Where does that error message come from. I don't recognize it as a java error. Is it generated by the program? If so, no one can help you without seeing the code that generates the error messsage. Do you …

Member Avatar for javaAddict
0
101
Member Avatar for Xufyan
Member Avatar for keanoppy

[QUOTE]how do i eliminate the word "do" from each of the tokens? without affecting the number of tokens involved?[/QUOTE] Not sure I understand what you are asking. 'do' is a token. It is not contained within any other tokens. Are you asking how to remove one token ('do') from a …

Member Avatar for keanoppy
0
259
Member Avatar for Xufyan

[QUOTE] how can i add two points of x-coodinate and two points of y-coordinate ??[/QUOTE] Can you explain what you are trying to do. Say you have two points given by x1, y1 and x2, y2 What does "adding" these two points mean? Can you give an example?

Member Avatar for Xufyan
0
125
Member Avatar for merlin1106

Please edit your posted code and add code tags (upper right icon/link above this text field) to preserve the formatting. [QUOTE]Nothing works[/QUOTE] That'll make it hard to help. Can you ask specific questions about your problem?

Member Avatar for jon.kiparsky
0
407
Member Avatar for boiishuvo

[QUOTE]For example, java ShowStars 2 3 1 4[/QUOTE] First comment about your code is that it doesn't follow the example you show. The String[] args passed to the main() method would contain the args shown by your command line: args[0] is 2, args[1] is 3 etc [QUOTE] it is still …

Member Avatar for javaAddict
0
185
Member Avatar for hmarie88

Please edit you program and add code tags to preserve the formatting. Use the icon to the right above the input text field: [ code ]. [QUOTE]Exception in thread "main" java.lang.NumberFormatException: For input string: "GTR"[/QUOTE] Where did the input the string "GTR" that shows in the error message come from? …

Member Avatar for hmarie88
0
113
Member Avatar for toferdagofer

How would you solve this problem if you had to write down everything vs remember the numbers you were given? Say you had two pieces of paper, one for largest and one for smallest. I give you a number. What would you do? You'd compare what I gave you to …

Member Avatar for toferdagofer
0
202
Member Avatar for bunifrog

Your program does NOT compile. I get 54 errors. Could you fix it? Also please preserve the indentation when you post code. Unformatted code is very hard to read.

Member Avatar for bunifrog
0
187
Member Avatar for Xufyan

[QUOTE]if its not a constant then how will i use it in a case[/QUOTE] I don't think you can use a variable with case. You'll have to use if() in the default: section. Can you define what the code is supposed to do?

Member Avatar for Xufyan
0
260
Member Avatar for anushri

@nickguletskii How are you helping the OP learn programming by solving his problem instead of teaching him how to solve his problems? Can you take the time to describe to the OP how you found the problems? And give the OP some hints on how he can do it next …

Member Avatar for nickguletskii
0
171
Member Avatar for raj26061990

If your going to post code examples, at least you could check if it works. [CODE]CD_Finder.java:18: cannot find symbol symbol : method GCD(int,int) location: class GCD_Finder.GCD System.out.println("GCD of "+num1+" and "+num2+" is "+obj.GCD(num1,num2)); ^[/CODE]

Member Avatar for raj26061990
0
2K
Member Avatar for Xufyan

std1.RollNo = 2000; Here you are referencing a class variable RollNo using an existing object: std1 Each Student object you create will have one of these variables. You need to use the object reference variable(std1) to access the variables in that object Student.stdcount Here you are referencing a static variable: …

Member Avatar for NormR1
0
837
Member Avatar for skyzer

Where are all the files (jar, class, html) when you try to open the html page in a browser? Is the planetary class in a package? What messages are in the browser's Java console? Please copy and paste them here.

Member Avatar for NormR1
0
130
Member Avatar for raghujosh

Is this the same post as: [URL="http://www.daniweb.com/forums/thread304297.html"]http://www.daniweb.com/forums/thread304297.html[/URL]

Member Avatar for raghujosh
0
434
Member Avatar for Melow

Your problem is you are passing the wrong args to the ImageIcon constructor. Read the API doc to see what kind of String value is valid and whether there should be another type of arg used.

Member Avatar for tong1
0
164

The End.