int availSize = getAvailableSize(splitPane.getSize(), splitPane.getInsets()); int[] newSizes = new int[3]; double weight = splitPane.getResizeWeight();  int oldLen = sizes[0] + sizes[1];   availSize -= sizes[2] + oldLen;  int rightAlloc = (int) (availSize * (1 - weight)); int leftAlloc = availSize - rightAlloc;  sizes[0] += leftAlloc; sizes[1] += rightAlloc;
    void distributeExtraSpace()    {      int availSize = getAvailableSize(splitPane.getSize(),                                       splitPane.getInsets());      int[] newSizes = new int[3];      double weight = splitPane.getResizeWeight();      int oldLen = sizes[0] + sizes[1];      // dividers don't change size.      availSize -= sizes[2] + oldLen;      int rightAlloc = (int) (availSize * (1 - weight));      int leftAlloc = availSize - rightAlloc;      sizes[0] += leftAlloc;      sizes[1] += rightAlloc;    }