N
nukleus
I am trying to restore a frame to its position from the last
time the app ran, but, for some reason, when bounds are saved,
the frame.y is offset by -19 pix from its true value.
Does anyone know what the issue is?
In following code, if you do:
MainFrameBounds = super.getBounds(); after app.show(),
rect has the same parameters as were loaded.
But, when you the same thing during save(), the
MainFrameBounds.y is offset by -19 pix.
Anybody knows what the issue is?
Thanks in advance.
public class Main extends MainFrame implements Runnable
{
Rectangle MainFrameBounds = new Rectangle();
public static void main (String args[])
{
NewsMaestro app = new NewsMaestro(args);
app.show();
}
public void show ()
{
this.setBounds(MainFrameBounds);
super.show();
}
void save()
{
...
MainFrameBounds = getBounds();
pout.print("Main_Frame_Bounds: "
+ MainFrameBounds.x + ", "
+ MainFrameBounds.y + ", "
+ MainFrameBounds.width + ", "
+ MainFrameBounds.height + NewLine);
}
void load()
{
(get bounds from parameters file)
super.setBounds(Bounds);
}
}
time the app ran, but, for some reason, when bounds are saved,
the frame.y is offset by -19 pix from its true value.
Does anyone know what the issue is?
In following code, if you do:
MainFrameBounds = super.getBounds(); after app.show(),
rect has the same parameters as were loaded.
But, when you the same thing during save(), the
MainFrameBounds.y is offset by -19 pix.
Anybody knows what the issue is?
Thanks in advance.
public class Main extends MainFrame implements Runnable
{
Rectangle MainFrameBounds = new Rectangle();
public static void main (String args[])
{
NewsMaestro app = new NewsMaestro(args);
app.show();
}
public void show ()
{
this.setBounds(MainFrameBounds);
super.show();
}
void save()
{
...
MainFrameBounds = getBounds();
pout.print("Main_Frame_Bounds: "
+ MainFrameBounds.x + ", "
+ MainFrameBounds.y + ", "
+ MainFrameBounds.width + ", "
+ MainFrameBounds.height + NewLine);
}
void load()
{
(get bounds from parameters file)
super.setBounds(Bounds);
}
}