--- old/src/java.desktop/share/classes/javax/swing/table/DefaultTableColumnModel.java	2018-03-28 11:51:52.450350001 +0530
+++ new/src/java.desktop/share/classes/javax/swing/table/DefaultTableColumnModel.java	2018-03-28 11:51:52.202350001 +0530
@@ -427,23 +427,7 @@
      */
     public int[] getSelectedColumns() {
         if (selectionModel != null) {
-            int iMin = selectionModel.getMinSelectionIndex();
-            int iMax = selectionModel.getMaxSelectionIndex();
-
-            if ((iMin == -1) || (iMax == -1)) {
-                return new int[0];
-            }
-
-            int[] rvTmp = new int[1+ (iMax - iMin)];
-            int n = 0;
-            for(int i = iMin; i <= iMax; i++) {
-                if (selectionModel.isSelectedIndex(i)) {
-                    rvTmp[n++] = i;
-                }
-            }
-            int[] rv = new int[n];
-            System.arraycopy(rvTmp, 0, rv, 0, n);
-            return rv;
+            return selectionModel.getSelectedIndices();
         }
         return  new int[0];
     }
@@ -455,16 +439,7 @@
      */
     public int getSelectedColumnCount() {
         if (selectionModel != null) {
-            int iMin = selectionModel.getMinSelectionIndex();
-            int iMax = selectionModel.getMaxSelectionIndex();
-            int count = 0;
-
-            for(int i = iMin; i <= iMax; i++) {
-                if (selectionModel.isSelectedIndex(i)) {
-                    count++;
-                }
-            }
-            return count;
+            return selectionModel.getSelectedItemsCount();
         }
         return 0;
     }
