Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
it's the error I'm not good at programming but I try to learn. I am learning how to use javaFx. In this case I want to implement 4 operations: add, subtract, multiply and divide. When I was using only one it worked for me I am new to the Starck overflow community. I always check when I have doubts. But I did not find a solution to my problem. It would be very helpful if you support me.
If you like me to share the folder. They explain to me how it would be very helpful.
Also my english's not good but i'm learning to
See this post on InvocationTargetException
See the Oracle Documentation on RuntimeException
See this post on javafx.fxml.LoadException
**As noted in the comments, the stack trace, in your case the red error text, tells you one of the problems: ** "Error resolving onAction = '$handleResta', either the event handler is not in the Namespace or there is an error in the script".
The comments are also asking for the file which contains the error, in order to help you more fully; We've identified that onAction = '#handleResta' is a problem problem, but we can't tell what about #handleResta is creating the error until you post this file:
/C:Users/Usuario/Downloads/Proy/build/classes/mvvm/FXMLVista.fxml:14
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
Code fragment
I followed a video series of Derek Banas about java threads but applying the same code on my compiler it gave me an error. I dont know why.please help me out.
Another code fragment
note: I have already defined "getTheMail" with an integer.
This is not a threading issue. You should instantiate GetTheMail class without giving any constructor parameters since it is not expecting any.. like this : new GetTheMail(); I encourage you to read this article for further understanding : https://www.javaworld.com/article/2076204/core-java/understanding-constructors.html
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Please explain me the differences over time and space complexities in java for user defined and predefined functions in java. examples like, linked list, list, stack class. please explain this with valid example.
thank you.
There is nothing special in predefined function over user defined. The only thing is predefined has been written by somebody else for you. It depends on algorithm.
Crap code/implementation runs in a crap way. Doesn't matter if its user created or system/API provided. example at a high level is EJBs vs Spring.
Good written code runs pretty and sleek. Again doesn't matter who the hell wrote it.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Why errors are not handled? Since Error class is derived from Throwable class(JAVA) it can also be handled.But why it is not a good practice to handle the error?
Compilers are not predictive to get the result exactly in the format humans want.
They obviously work on the limited syntax and semantics rule and as per some grammar (or rules you can say).
Errors are also Exceptions in Java that define exceptions which aren't expected to be caught under normal circumstances.
So basically, an error is that problem which requires human handling for getting the correct result. Also, your assumption that errors aren't handled is incorrect, as errors are reported like errors occurring during runtime. But, they don't specifically correct the error and also they don't provide much detail about the error.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
Can any one please tell me how to use logcat? for example I get the error:
Null point exception at activity thread Java.2121. what does 2121 here refer to? Is it some line of code? How do I access it?
It is not certain that the first line of the logcat itself shows the exact error. If you want to get the error from logcat in simplest way then try to find out your package name in that means for an example if your package name is com.test.firstapp then check for this in logcat...after that check for the statement it have then definitely you'll get the idea from that....Hope this'll help you :)
Do not rely on the first line of the exception. Sometimes it happens from the middle when it started calling it. Check the last call to your activity class. That is the root of your problem.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
How can i let user write only one number in text field? Other should be consume.
I have code for write number.
private boolean number(char zn){
if(zn>='0' && zn<='9')
return true;
return false;
}
You state that this is a Swing question, and so I assume that you are using a JTextField. If so, you have one of two possible solutions here:
Use a JFormattedTextField and use a MaskFormatter, something simple like "#" should probably work perfectly here.
Or get the JTextField's Document and set its DocumentFilter with one that restricts input to as you deserve it. I think that this would be unnecessarily complex for you, and I recommend the first option.
Check the tutorial on how to use JFormattedTextFields which you can find here: JFormattedTextField Tutorial. It will explain all of the above including how to use a mask formatter with JFormattedTextFields.
Also please check Jon Skeet's blog on Writing the Perfect Question. Writing questions on this and other sites is a learned skill which can get better with study and effort. The tips that this blog contains will help you so that you'll know what information to include in your question so that the volunteers helping you don't have to guess at things. They will appreciate it, and you'll likely get better and quicker answers.