code: protected SegmentType getSegmentType(JComponent c) {
          SegmentType segmentType = SegmentType.NONE;
  
          String position = (String) c.getClientProperty("JTabbedPane.Tab.segmentPosition");
  
          if ("first".equals(position)) {
              segmentType = SegmentType.FIRST;
          } else if ("middle".equals(position)) {
              segmentType = SegmentType.MIDDLE;
          } else if ("last".equals(position)) {
              segmentType = SegmentType.LAST;
          }
  
          return segmentType;
      }
docs: Get the segment type (if any) from the component's client properties.
  
  @param  c the component.
  
  @return the segment status.