Why you would like to do such operation on Stack? Stack works on LIFO(Last in First out). So last element inserted will be on top always.
If you would like to do custom insertion at middle or anywhere else use List or ArrayList or Vector.
solved java Can I add an element into the middle of the Stack?