Component (final JTable table, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int column) { final InjInfo injection = (InjInfo)value; // fix for a marvellous Swing peculiarity: AccessibleJTable likes to pass null here if (injection == null) return myLabel; final String languageId = injection.injection.getInjectedLanguageId(); final Language language = InjectedLanguage.findLanguageById(languageId); final FileType fileType = language == null ? null : language.getAssociatedFileType(); myLabel.setIcon(fileType == null ? null : fileType.getIcon()); myLabel.setText(language == null ? languageId : language.getDisplayName()); setLabelColors(myLabel, table, isSelected, row); return myLabel; }