selectedLabel = new JLabel(name+ " " + ((int)item.getPointcost()));
if(needEndHTML){ selectedLabel = new JLabel(name+ " " + ((int)item.getPointcost()) + "</html>"); }else{ selectedLabel = new JLabel(name+ " " + ((int)item.getPointcost())); }
    private void initData(){        if(this.model.getArmylistModel().getAllowedWargear() == 0)            return;                Iterator groups = this.model.getArmylistModel().getAllowedWargearGroups().iterator();        while(groups.hasNext()){            final ArmylistWargearGroup group = this.model.getArmylistModel().getArmylistArmy().getWargearGroupbyName((String)groups.next());            if(group == null)                continue;            JPanel groupHeaderPanelAll = new JPanel();            groupHeaderPanelAll.add(new JLabel(group.getName()));            groupHeaderPanelAll.setBackground(MainWindow.TITLE_BACKGROUND);            groupHeaderPanelAll.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0)));                        JPanel groupHeaderPanelSelected = new JPanel();            groupHeaderPanelSelected.add(new JLabel(group.getName()));            groupHeaderPanelSelected.setBackground(MainWindow.TITLE_BACKGROUND);            groupHeaderPanelSelected.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0)));                        this.allWG.add(groupHeaderPanelAll);                        final JPanel selectedPanelGroup = new JPanel();            selectedPanelGroup.setLayout(new VerticalFlowLayout());            selectedPanelGroup.add(groupHeaderPanelSelected);            this.selectedWG.add(selectedPanelGroup);                                    Collection selectedInGroup = this.model.getSelectedWargear(group.getName());                        Iterator itemsInGroup = group.getItems().iterator();            while(itemsInGroup.hasNext()){                final ArmylistWargearItem item = (ArmylistWargearItem)itemsInGroup.next();                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();                }                final JCheckBox box;                final JLabel selectedLabel;                                if(item.getPointcost() == (int)item.getPointcost()){                    box = new JCheckBox(name+ " " + ((int)item.getPointcost()));                    selectedLabel = new JLabel(name+ " " + ((int)item.getPointcost()));                }else{                    box = new JCheckBox(name+ " " + item.getPointcost());                    selectedLabel = new JLabel(name + " " + item.getPointcost());                }                box.setToolTipText(item.getName());                selectedLabel.setToolTipText(item.getName());                               // new JCheckBox(item.getName()+ " " + (item.getPointcost() == ((int)item.getPointcost()) ? ((int)item.getPointcost()) : (int)item.getPointcost())  );                 //= new JLabel(item.getName() + " " + (item.getPointcost()== ((int)item.getPointcost()) ? ((int)item.getPointcost()) : (int)item.getPointcost())  );                if(selectedInGroup.contains(item)){                    selectedPanelGroup.add(selectedLabel);                    selectedLabel.addMouseListener(new MouseAdapter(){                            public void mouseClicked(java.awt.event.MouseEvent evt) {                                removeWG(selectedPanelGroup, selectedLabel, group.getName(), 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()));                            }                       });                             selectedLabel.setCursor(MainWindow.DEL_CURSOR);                    box.setSelected(true);                }                box.addActionListener(new ActionListener(){                    public void actionPerformed(java.awt.event.ActionEvent evt) {                        if(box.isSelected()){                            addWG(group.getName(), item, selectedPanelGroup, box);                        }else{                            removeWG(selectedPanelGroup, selectedLabel, group.getName(), item, box);                        }                    }                                    });                                this.allWG.add(box);                            }        }           }