I have two events for two separate components, but there is a problem. The JTabbedPane stateChanged event event is fired before the focusFost JFormattedField event. Is there a way to make the StateChange event fire after the focusLost event.
Thanks, Tuna
As long as Java guarantees that the event will be fired, the order will not be guaranteed and may vary on different platforms.
A potential solution is to wrap stateChanged code in SwingUtilities.invokeLater (). This will put the code at the end of the Thread Dispatch Thread (EDT) so that it runs after the focusLost code.
, JTabbedPane, fireStateChanged() , , , stateChanged .
fireStateChanged()
. , , (SwingUtilities2.tabbedPaneChangeFocusTo(newComp)), , , .
SwingUtilities2.tabbedPaneChangeFocusTo(newComp)
fireStateChanged() - , JTabbedPane , , .
, , .
Source: https://habr.com/ru/post/1744003/More articles:Сообщения об ошибках gcc - gccBest way to find kids module? - ruby | fooobar.comsingle sign-on using coldfusion with IIS version 5 using NTLM - coldfusionIs there a free open source (GNU GPL, LGPL, etc.) Comet Video Chat? (PHP) - phphow to convert RSAParameters from .net to .pem file so that I can use it in php - c #VS2010 - добавить шаблон в новое окно проекта - visual-studio-2010Что такое "образец"? - audioHow to implement Hibernate Pagination using the cursor (so that the results remain unchanged despite adding new data to the table on which the page is called)? - javaOracle string change timestamp - databaseКак читать более 256 столбцов из файла excel (формат 2007) с использованием OLEDB - c#All Articles