public void dragFrame(JComponent f, int newX, int newY)
{
+ if (newY<0)
+ {
+ newY=0;
+ }
delegate.dragFrame(f, newX, newY);
}
public void resizeFrame(JComponent f, int newX, int newY, int newWidth,
int newHeight)
{
+ Rectangle b=desktop.getBounds();
+ if (newY<0)
+ {
+ newY=0;
+ }
delegate.resizeFrame(f, newX, newY, newWidth, newHeight);
}
//sp.getViewport().setView(desktop);
//getContentPane().add(sp, BorderLayout.CENTER);
getContentPane().add(desktop, BorderLayout.CENTER);
- desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
+ desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
+
// This line prevents Windows Look&Feel resizing all new windows to maximum
// if previous window was maximised
desktop.setDesktopManager(new MyDesktopManager(
new DefaultDesktopManager()));
+
Rectangle dims = getLastKnownDimensions("");
if (dims != null)
{