Java Swing (jtextfield)
Boa tarde pessoal, tenho uma dúvida, quando executo este projeto, porque só digitar no swing ele não aparece os dados, mais ao pressionar o botão de = aí sim mostra o resultado da soma? Alguém pode me ajudar a resolver isso, para que quando eu digite os dados na tela gráfica, os dados já apareçam de imediato? Porque só está aparecendo após pressionar o botão de resultado!



8 Replies
⌛ This post has been reserved for your question.
Hey @Rodrigo! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.Please ask your question in English.
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.@dan1st | Daniel I have a question, when I run this project, why just typing in the swing does not show the data, but when pressing the = button it shows the result of the sum? Can anyone help me resolve this, so that when I enter the data on the graphical screen, the data appears immediately? Because it is only appearing after pressing the result button!
I guess you wrote the code that your actionPerformed method is only called when you click on the button?
you could add a listener for keypresses on the input fields
This is exactly what is happening, can you explain to me what I should change in the code?
What do you call this listener method? I'm just starting out in Java, and learning about swing
and using the code this way, when I type it happens like in the video

💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.