Layout question

Discussion in 'Java' started by nukleus, Feb 18, 2007.

  1. nukleus

    nukleus Guest

    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);
    }
    }
    nukleus, Feb 18, 2007
    #1
    1. Advertising

  2. nukleus

    hiwa Guest

    On Feb 18, 9:20 am, (nukleus) wrote:
    > 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);
    > }
    >
    > }

    Post a small demo code that is generally compilable, runnable and
    could reproduce your problem. See: http://homepage1.nifty.com/algafield/sscce.html
    and http://www.yoda.arachsys.com/java/newsgroups.html
    hiwa, Feb 18, 2007
    #2
    1. Advertising

  3. nukleus

    Giles Guest

    On Feb 17, 6:20 pm, (nukleus) wrote:
    > 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.
    >


    What is this chicken shite, you lil whiner?
    You got any active neurons on line?
    Are you gonna fall on yerr arse and cry like a 6 year old
    pedo boy next?



    > 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.


    You suck?

    >
    > But, when you the same thing during save(), the
    > MainFrameBounds.y is offset by -19 pix.



    You give a ****?


    >
    > Anybody knows what the issue is?


    How big is yerr output hole?
    Good enough fer a chainsaw?


    > Thanks in advance.



    Is something broken with this thing?

    >
    > 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);



    Chainsaw up yerr arse.
    You like?
    Or you'd rather suck arse of a drunk gorilla?
    > }
    >
    > void load()
    > {
    > (get bounds from parameters file)
    >
    > super.setBounds(Bounds);
    > }
    >
    > }
    Giles, Feb 19, 2007
    #3
  4. nukleus

    nukleus Guest

    In article <>, "Giles"
    <> wrote:
    >On Feb 17, 6:20 pm, (nukleus) wrote:
    >> 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.
    >>

    >
    >What is this chicken shite, you lil whiner?
    >You got any active neurons on line?
    >Are you gonna fall on yerr arse and cry like a 6 year old
    >pedo boy next?


    Oh, DA dong beatle again?

    I toldya already, suxy,
    you have to dig deeper

    and deeper





    and deeper










    and deeper
























    and deeper
























    and even deeper than that

























    Zo...


























    How's sucking?
























    Good enough fer breakfast?




























    ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ



    ZZZZZZZZZZZZZZZZZZZZZZZ
























    ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ


























    Gremlin,
    Gremlin,

    Come in pleeeze.

























    Could you turn off the lights in Washington DC?




























    Just fer a couple of hours...
























    Cause we are nukin' da house


























    of da white mouse

























    and ....



























    Well, thats top secret informationz

























    As a matter of intercourse.


























    And then?


    >> Does anyone know what the issue is?


    You suck?

    >> But, when you the same thing during save(), the
    >> MainFrameBounds.y is offset by -19 pix.


    You lil chicken shit impersonator?

    >> Anybody knows what the issue is?


    >How big is yerr output hole?
    >Good enough fer a chainsaw?


    Is it?

    Is something broken with this thing?

    Looks like it locked up or zomefin.

    >> public class Main extends MainFrame implements Runnable


    Would you like to talk to my monkay?

    >Chainsaw up yerr arse.
    >You like?


    That was a compliment, dummy!

    >>Or you'd rather suck arse of a drunk gorilla?


    That was a typo.

    The correct text is:

    Or you'd rather suck DICK of a drunk gorilla?

    You see how much difference such a lil thingy can make?










    ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ






























    Gremlin,
    Gremlin,























    We're coming.

























    Where?

























    void loadCrapUpToYerrEars()
    {
    (get more crap from Google and then Poogle)
    super.setBunnies(HorseShitPile);
    }
    nukleus, Feb 19, 2007
    #4
  5. nukleus

    Lew Guest

    "Giles" wrote a bunch of over-the-top obscene nonsense.

    nukleus wrote:
    (understandably perturbed response to Giles's abuse.)

    Nukleus, please do not feed this troll. "Giles" is obviously getting their
    jollies just pissing you off. Don't give them the satisfaction.

    You and I don't see eye to eye on many things, but I do not think you or we
    should have to put up with the offensive playground insults "Giles" posted.

    Ignore them.

    - Lew
    Lew, Feb 20, 2007
    #5
  6. nukleus

    Giles Guest

    On Feb 19, 7:52 pm, Lew <> wrote:
    > "Giles" wrote a bunch of over-the-top obscene nonsense.
    >
    > nukleus wrote:
    >
    > (understandably perturbed response to Giles's abuse.)
    >
    > Nukleus, please do not feed this troll. "Giles" is obviously getting their
    > jollies just pissing you off. Don't give them the satisfaction.
    >
    > You and I don't see eye to eye on many things, but I do not think you or we
    > should have to put up with the offensive playground insults "Giles" posted.
    >
    > Ignore them.
    >
    > - Lew


    Sorry, pal. I was minding my own business when "Nukleus" saw fit to
    flame me.
    I don't know who he is, and I don't care.
    I never wrote to him or about him, so I don't know what his problem
    is.
    My "abuse" was ALL HIS RESPONSES to one of my posts.
    100%. HIS WORDS
    Nice guy, huh?
    I just posted them back to him.
    Have a nice day!
    Giles, Feb 20, 2007
    #6
  7. nukleus

    Lew Guest

    Lew wrote:
    >> "Giles" wrote a bunch of over-the-top obscene nonsense.
    >>
    >> nukleus wrote:
    >>
    >> (understandably perturbed response to Giles's abuse.)
    >>
    >> Nukleus, please do not feed this troll. "Giles" is obviously getting their
    >> jollies just pissing you off. Don't give them the satisfaction.
    >>
    >> You and I don't see eye to eye on many things, but I do not think you or we
    >> should have to put up with the offensive playground insults "Giles" posted.
    >>
    >> Ignore them.


    Giles wrote:
    > Sorry, pal. I was minding my own business when "Nukleus" saw fit to
    > flame me.
    > I don't know who he is, and I don't care.
    > I never wrote to him or about him, so I don't know what his problem
    > is.
    > My "abuse" was ALL HIS RESPONSES to one of my posts.
    > 100%. HIS WORDS
    > Nice guy, huh?
    > I just posted them back to him.
    > Have a nice day!


    Ah, I see. How very unfortunate.

    It is true that some people's posting style is rather inflammatory. I have
    more sympathy for your point of view now as well.

    - Lew
    Lew, Feb 20, 2007
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rick Spiewak
    Replies:
    3
    Views:
    3,134
    Rick Spiewak
    Aug 26, 2003
  2. RobertH
    Replies:
    1
    Views:
    710
    Steve C. Orr [MVP, MCSD]
    Nov 4, 2003
  3. NWx
    Replies:
    4
    Views:
    2,951
    Kevin Spencer
    Feb 19, 2004
  4. Eric
    Replies:
    4
    Views:
    699
    clintonG
    Dec 24, 2004
  5. Replies:
    1
    Views:
    564
    John Timney \(MVP\)
    Jun 19, 2006
Loading...

Share This Page