Monday, March 5, 2012

OOoBean resize solution

article

This is the crucial part: (replicated from article)
container.addComponentListener(new ComponentAdapter() { 
public void componentResized(ComponentEvent e) { 
Rectangle b = (e.getSource() != null? ((Component) e.getSource()).getBounds() : null); 
container.setMinimumSize(MINIMUM_SIZE); 
final XWindow componentWindow = aFrame.getComponentWindow(); 
if (componentWindow != null) { 
componentWindow.setPosSize(0, 0, (int)b.getWidth(), (int)b.getHeight(), (short) (PosSize.WIDTH + PosSize.HEIGHT)); 


}); 

No comments:

Post a Comment