logical problem with opening a Sliding Window(Custom window) from 'RIGHT' - LEFT

for a common approach regarding with Top-Level containers such as JFrame or JDialogs, everything is manipulated from a LEFT-to-RIGHT orientation, i have a custom window, with some animated opening with a an Orientation of Left-to-Right, i was trying to make it a Right-To-Left opening with this basic logic, like decrementing the 'x' position twice than the 'width' of the component (i.e for every single decrement of width by '1' the 'x' will have a twice or 3 times decrement update), but i ended up with a Jaggy animated window and it somehow starts with the middle
here is a sample working code for the sliding window (LEFT to RIGHT).