Results 1 to 1 of 1
Thread: Smooth window resizing.
- 07-31-2012, 12:46 AM #1Member
- Join Date
- Apr 2012
- Rep Power
Smooth window resizing.
Hello Java Forums!
Im currently experimenting with Translucent windows in Java but i'm now stuck with some silly resize logic that im trying to create.
So, the window i'm trying to resize looks like this:
Its basicly a translucent window with no rezize option from the swing library etc.
So far i have been able to resize the window using only the current mouse position (int posX, posY), but that makes the window jump to the "mousetip" everytime you try to resize the frame.
Im currently sitting with a set of variables im not sure how to put together in order to make the resizing smooth.
//Mouse Variables int posX; //Current Location of the Mouse X-AXIS int posY; //Current Location of the Mouse Y-AXIS int clickedMousePosX; //Location of the mouse after MOUSE CLICK X- AXIS int clickedMousePosY; //Location of where a mouseclick happened Y-AXIS int lastMousePosX; //Location of the mouse after MOUSE RELEASE X- AXIS int lastMousePosY; Y-AXIS int diffX; //Diffrence between lastMousePosX,Y and clickedMousePosX,Y int diffY; //Diffrence between lastMousePosX,Y and clickedMousePosX,Y ;
If i need to explain further i will try to do so the best i can. Even if my Swenglish is horribad.
Thanks for your time!
- By j_arif123 in forum AWT / SwingReplies: 4Last Post: 07-03-2012, 02:40 PM
- By fr33d4n in forum AWT / SwingReplies: 1Last Post: 08-19-2011, 08:55 PM
- By Nyet in forum AWT / SwingReplies: 4Last Post: 11-27-2009, 04:13 AM
- By er91ic512 in forum AWT / SwingReplies: 2Last Post: 07-28-2009, 12:48 PM
- By designer in forum Java AppletsReplies: 1Last Post: 07-21-2009, 07:10 PM