Hello, the task is to implement java Applet with support for reading NFC and further transfer of the parameters of the read smart card to the server (Json). The problem is that Gui is not updated when reading the magnetic card. An event for updating the gui, namely Label, after successfully reading the card number, created it in a separate thread, but nothing happens. I read about paint (), repaint () for the Applet, but did not find any information.
1 answer
When I wrote the applet for VKontakte also came across this problem, the solution turned out to be obvious:
вызовите метод .clear(); от вашего label а также почистите переменные\массивы которые должны заполнять ваш label No threads are needed)
- It did not help (The fact is that before Label.setText (cardNumber) an instance of the Card class from java SmartCard is created, where you work with cards, any type of boolean on whether the card has leaned, what type of reader to read, etc.! Maybe This Card object interferes, because prior to its initialization .setText () works, and the line below is gone. I tried Card.disconnect (true), Card = null, System.gs (), I tried to do all this in a separate thread but alas ( - GoodRA
- @GoodRA I had such a problem ru.stackoverflow.com/questions/708812/… - God
|