Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JFrame border

843804May 16 2005 — edited May 17 2005
How does one go about obtaining the handle for a JFrame border?

The method of obtaining minimum size has been covered countless times on this forum, but I have yet to come across a method that performs like they would in a well designed application, where the border would stop "resizing" at a certain place, and wait for the user to release the mouse button.

If no handle can be obtained, then how does one go about adding a title bar to a JWindow, and custom painting a border around the window? The reasoning for this is I imagine I could track mouse movements, and if the mouse is above a certain range on the screen, and those are the same coordinates as a border on the window, then the mouse pointer would change to the correct orientation, the user could drag the pointer, and a resizing border could be painted on the screen and when the mouse is released, the window redraws to the correct size.

Does this seem like a roundabout way to do what I would like to do, or is this the only way to have a professional quality solution?

Thank you,
Jonathan
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 14 2005
Added on May 16 2005
2 comments
93 views