name = "<html>"+ item.getName().substring(0, space) +"<p>" +item.getName().substring(space+1, item.getName().length()) + "</html>";
name = "<html>"+ item.getName().substring(0, space) +"<p>" +item.getName().substring(space+1, item.getName().length()); needEndHTML = true;
    private void addWG(final String group, final ArmylistWargearItem item, final JPanel selectedGroupPanel, final JCheckBox box){        this.model.selectWargear(group, item);        final JLabel selectedLabel;                String name;        if(item.getName().length() > MAX_NAME_LENGTH){            int space = item.getName().substring(SEARCH_START_INDEX, MAX_NAME_LENGTH).lastIndexOf(" ") + SEARCH_START_INDEX;            if(space != -1){                name = "<html>"+ item.getName().substring(0, space) +"<p>" +item.getName().substring(space+1, item.getName().length()) + "</html>";            }else{                name = item.getName().substring(0, MAX_NAME_LENGTH) + "..";            }        }else{            name = item.getName();        }                if(item.getPointcost() == (int)item.getPointcost()){            selectedLabel = new JLabel(name+ " " + ((int)item.getPointcost()));        }else{            selectedLabel = new JLabel(name+ " " + item.getPointcost());        }        selectedLabel.setToolTipText(item.getName());        selectedLabel.setCursor(MainWindow.DEL_CURSOR);        selectedLabel.addMouseListener(new MouseAdapter(){                public void mouseClicked(java.awt.event.MouseEvent evt) {                    removeWG(selectedGroupPanel, selectedLabel, group, item, box);                }                    public void mouseEntered(java.awt.event.MouseEvent evt) {                    selectedLabel.setFont(new Font(selectedLabel.getFont().getName(), Font.BOLD, selectedLabel.getFont().getSize()));                }                        public void mouseExited(java.awt.event.MouseEvent evt) {                    selectedLabel.setFont(new Font(selectedLabel.getFont().getName(), Font.PLAIN, selectedLabel.getFont().getSize()));                }        });        selectedGroupPanel.add(selectedLabel);        selectedGroupPanel.updateUI();        box.addActionListener(new ActionListener(){                    public void actionPerformed(java.awt.event.ActionEvent evt) {                        if(box.isSelected()){                            //addWG(group, item, selectedGroupPanel, box);                        }else{                            removeWG(selectedGroupPanel, selectedLabel, group, item, box);                        }                    }                             });         this.updatesPanel.refreshPointcost();    }