■ ■ ■ ■ ■ ■
src/main/java/loggerplusplus/FilterController.java
| skipped 141 lines |
142 | 142 | | } |
143 | 143 | | |
144 | 144 | | public void formatFilter(String string, Color foregroundColor, Color backgroundColor){ |
145 | | - | ((JTextField) filterField.getEditor().getEditorComponent()).setText(string); |
146 | | - | filterField.setForegroundColor(foregroundColor); |
147 | | - | filterField.setBackgroundColor(backgroundColor); |
| 145 | + | SwingUtilities.invokeLater(() -> { |
| 146 | + | ((JTextField) filterField.getEditor().getEditorComponent()).setText(string); |
| 147 | + | filterField.setForegroundColor(foregroundColor); |
| 148 | + | filterField.setBackgroundColor(backgroundColor); |
| 149 | + | }); |
148 | 150 | | } |
149 | 151 | | |
150 | 152 | | public HistoryField getFilterField(){ |
| skipped 4 lines |