Forums Register Login

problems the program

+Pie Number of slices to send: Send
I am having problems with this program. When I run javac I am getting e errors about illegal start of expression.



Error is at
public void setResultValue(); What do I need to do to fix this error?
+Pie Number of slices to send: Send
Remove the semi-colon:
+Pie Number of slices to send: Send
I did as you suggested but still having issues. Here is the latest version with 4 errors.


errors are:
line 57 else without if??? else if (event.getsource()= JButton ("Clear')
line 74 3 errors 2 illegal start of expression and one ; expected

I did not think you needed a ; for public void *.*
+Pie Number of slices to send: Send
It would help if you indicated which lines are 57 and 74.
+Pie Number of slices to send: Send
to be honest with you, the types of errors indicate this is your first program,
or an assignment in debugging, so us just fixing it for you is not going to help you at all.

if this is your first program, you shouldn't be trying to build a gui, instead
just start with the tutorials and the HelloWorld app and learn the basics before
attempting a gui program.

if a debugging app, start with the first error from the compiler, read what it says,
and fix that error then recompile. Only (and only) fix one error at a time.
+Pie Number of slices to send: Send
I have read the tutorials and am trying to learn now to write a GUI. after the errors listed I have put the code that it is referencing. I was just looking for how to fix these errors.
+Pie Number of slices to send: Send
 

Originally posted by Lois Smith:
I have read the tutorials and am trying to learn now to write a GUI. after the errors listed I have put the code that it is referencing. I was just looking for how to fix these errors.



Your code has too many errors to easily fix, and I'd recommend that you simply scrap it. I agree with the other poster that you should go through the Sun Swing tutorials (again if need be), but slowly and one step at a time, going through all the example programs. It will make it a whole lot easier and enjoyable for you when you are ready to fly on your own with this type of project.

Much luck.
+Pie Number of slices to send: Send
Another tip is to write the smallest possible amount of code that will compile at a time, then compile it, then test it, if possible. Then add a few more lines, and compile and test again. If you write a few hundred lines and then try to compile it, it's hard to know where you've gone wrong. But if you've written five lines, then, well, it's one of those five!
This guy is skipping without a rope. At least, that's what this tiny ad said:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1043 times.
Similar Threads
Help with errors again
last week of class last assignment. Any help is appreciated.
Trying to figure out Exception Error in code
Problems with this weeks code..Still not understanding Illegal start of expression...HELP PLEASE
One error in code..not understanding what it tells me. Code works it is on line 55.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:07:14.