public void loadSubcategories(JMenu category) {
        int n = list.indexOf(category);

        if(!listBool.get(n)) {
            String[] categoryMembers = new String[15];

            //subcategories
            try {
                categoryMembers = wiki.getCategoryMembers(category.getText(), Wiki.CATEGORY_NAMESPACE);
            } catch (IOException ex) {
                Logger.getLogger(CategoryHint.class.getName()).log(Level.SEVERE, null, ex);
            }
            if(categoryMembers.length>0) {
                category.addSeparator();

                //title
                JMenuItem title = new JMenuItem("<html><i>"+Data.text("fileedit-cat-subcats")+"</i></html>");
                    title.setEnabled(false);
                    category.add(title);

                //add
                for(String s : categoryMembers)
                    if(s.contains(":")) {
                        final JMenuItem item = new JMenuItem(s.substring(s.indexOf(":")+1));
                        item.addActionListener(new ActionListener() {
                            public void actionPerformed(ActionEvent e) {
                                setCategory(item.getText());
                            }
                        });
                        category.add(item);
                    }
            }

            //supcategories
            try {
                categoryMembers = wiki.getCategories("Category:"+category.getText());
            } catch (IOException ex) {
                Logger.getLogger(CategoryHint.class.getName()).log(Level.SEVERE, null, ex);
            }

            if(categoryMembers.length>0) {
                category.addSeparator();

                //title
                JMenuItem title = new JMenuItem("<html><i>"+Data.text("fileedit-cat-supcats")+"</i></html>");
                    title.setEnabled(false);
                    category.add(title);

                //add
                for(String s : categoryMembers)
                    if(s.contains(":")) {
                        final JMenuItem item = new JMenuItem(s.substring(s.indexOf(":")+1));
                        item.addActionListener(new ActionListener() {
                            public void actionPerformed(ActionEvent e) {
                                setCategory(item.getText());
                            }
                        });
                        category.add(item);
                    }
            }

            listBool.set(n, true);
            category.setIcon(new ImageIcon(getClass().getResource("/cuploader/resources/tick-small.png")));
        }
    }