There is an archive in which there are about two thousand svg-files. My task is to create a format list [Иконка] Имя svg Π² Π°Ρ€Ρ…ΠΈΠ²Π΅ . I use the Apache Batik library to work with svg. When decoding only one icon in the main stream, the interface noticeably hangs (and generally working with files in the main stream is bad practice), so I decided to decode asynchronously, but after executing the code, the icon in the list does not appear. Please tell me where I was wrong and what needs to be fixed for the icon to appear? The code contains crutches (the result of the transition from Java for Android to Java for PC), but, nevertheless, I tried to comment it well. Thanks in advance for your help!

Everything starts here, in UserInterface.class , where the list is populated:

 // ΠžΠ±Π½ΠΎΠ²Π»ΡΠ΅Ρ‚ список ΠΈΠΊΠΎΠ½ΠΎΠΊ. private void reloadIcons() { // ... // ОбновлСниС списка ΠΈΠΊΠΎΠ½ΠΎΠΊ Π² Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΈ. DefaultListModel<String> mGetNewIconsListModel = new DefaultListModel<String>(); try { // ΠŸΠΎΠ»ΡƒΡ‡Π΅Π½ΠΈΠ΅ списка Ρ„Π°ΠΉΠ»ΠΎΠ² Π² Π°Ρ€Ρ…ΠΈΠ²Π΅. ZipFile mRepository = new ZipFile(new File(Constants.FILE_DATABASE)); Main.mRepositoryIcons = Utilities.getRepositoryIcons(mRepository); for (String mSvg : Main.mRepositoryIcons) mGetNewIconsListModel.addElement(mSvg); } catch (IOException mException) { mException.printStackTrace(); } // Установка отрисовщика элСмСнтов списка. mGetNewIconsList.setCellRenderer(new GetNewIconsListRenderer()); // Установка Π·Π½Π°Ρ‡Π΅Π½ΠΈΠΉ Π² список. mGetNewIconsList.setModel(mGetNewIconsListModel); } 

GetNewIconsListRenderer.class list item renderer : Pastebin

Asynchronous loader SvgDecoder.class : Pastebin

    0