Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to a frame with no ability to resize the content pane

 
Lee Chalupa
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Magic Draw the uml java tool has a main frame which consists of a menu bar and tool bars. There are no panels or container in the content pane. In addition, the content pane cannot be resized. if you attempt to drag the bottom edge of the frame down the page, when you release it, the panel snaps back like a window shade to it's original position. At the same time the frame can be resized horizontally by dragging the sides of the frame left or right.
How are they doing this?
The answer is not using the SetResizable method. It restricts both horizontal and vertical resizing and you are not able to get a handle on the edge of the frame to drag it in either direction.
Any ideas how they are doing this?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've done this before by attaching a ComponentListener to the Frame and resizing it back to it's previous size in the componentResized() method.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic