I am newby to java swing gui and I cannot figure out this problem Lets assume I Have a Jframe size 100,100 I have 4 button positions
left top widht height
button1 0 0 10 10 // left up
button2 90 0 10 10 // right up
button3 45 45 10 10 // middle
button4 0 90 10 10 // left down
button5 90 90 10 10 // right down
All of left top width height sized scaled from 100,100.
I need using Absolute positioning (Becaouse my real situation different left,top,width,height) But responsiveness I consider maybe I can use factors to multiple the left,right,width,height values
For example after running gui if I change frame to 400,200 then new positions should be
button1 0 0 40 20 // left up
button2 360 0 40 20 // right up
button3 180 90 40 20 // middle
button4 0 180 40 20 // left down
button5 360 180 40 20 // right down
x factor = 400/100=4 and y factor = 200/100=2
How can I listen Jframe's changes from 100,100 to 400,200 and develop above approach. Any information appreciated.
EDIT
I get left top width height from different service and my example could be like
left top widht height
button1 01 04 11 14
button2 91 0 10 10
button3 44 45 9 14
button4 0 90 10 10
button5 90 90 1 1