private void addMarkerToMenu(JMenu menu, AutomaticMarker automaticMarker, HashMap<String, JMenu> marksGroups, boolean mode) {
    String[] groups = automaticMarker.getMarkerGroups();
    if (groups == null || groups.length == 0) {
      groups = new String[]{ "" };
    }
    for (String g : groups) {
      JMenuItem markerMenuItem = new JMenuItem(automaticMarker.getName());

      Icon icon = new ColorIcon(automaticMarker.getColors().getBackground(), automaticMarker.getColors().getForeground(), 16, 16, "Ab");
      markerMenuItem.setIcon(icon);
      markerMenuItem.setToolTipText(automaticMarker.getDescription());
      markerMenuItem.addActionListener(new AutomaticMarkUnamrkActionListener(dataTableModel, automaticMarker, mode, statusObserver));
      if (g.length() > 0) {
        JMenu m = marksGroups.get(g);
        if (m == null) {
          m = new JMenu(g);
          marksGroups.put(g, m);
          menu.add(m);
        }
        m.add(markerMenuItem);
      } else {
        menu.add(markerMenuItem);
      }
    }

  }
Set column size depending on configured display text/icon.
If the header is wider than contend, the width of header will be used.
olv-core/src/main/java/pl/otros/logview/gui/LogViewPanel.java