Results 1 to 8 of 8
  1. #1
    mattonitto is offline Member
    Join Date
    Apr 2008
    Posts
    2
    Rep Power
    0

    Default Noob question- easy

    This should be super simple, at least I think.

    Here's the goal. Clean window (no scroll bars) same size as image(link) in the center of the browser.

    Linking through the image is not a problem, resizing the window is not a problem (in itself.)

    Here we go: The window moves to the top left of the browser with scroll bars for both the horizontal and vertical, even though "window.resizeTo" is the same dimensions as the image. As far as moving goes the best I could come up with are "moveTo" and "moveBy", but those both run off coordinates. Is there an easier way to center?

    Throw me a freaking bone here.

  2. #2
    mattonitto is offline Member
    Join Date
    Apr 2008
    Posts
    2
    Rep Power
    0

    Default

    Anything? At least maybe a direction to point me in?

  3. #3
    DonCash's Avatar
    DonCash is offline Moderator
    Join Date
    Aug 2007
    Location
    London, UK
    Posts
    240
    Rep Power
    8

    Default

    Is this a Java question or a JavaScript question? It sounds like JavaScript to me..

    In which case, you should find a JavaScript forum. Java and JavaScript are two different languages.
    Did this post help you? Please me! :cool:

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Not clear that question me too. Seems more like a JavaScript, moveTo confusing me.

    My friend mattonitto, provide more details. At least a code segment may help to all of us :). As Don says, Java and JavaScript are totally different.

  5. #5
    CaptainMorgan's Avatar
    CaptainMorgan is offline Moderator
    Join Date
    Dec 2007
    Location
    NewEngland, US
    Posts
    835
    Rep Power
    8

    Default

    Quote Originally Posted by mattonitto View Post
    This should be super simple, at least I think.
    Then why are you having trouble?

    Here we go: The window moves to the top left of the browser with scroll bars for both the horizontal and vertical, even though "window.resizeTo" is the same dimensions as the image. As far as moving goes the best I could come up with are "moveTo" and "moveBy", but those both run off coordinates. Is there an easier way to center?

    Throw me a freaking bone here.
    I'm not sure where to throw the bone at you.

    If the members here had a nickel for every time someone came here with a Javascript question we'd all be super rich.
    Vote for the new slogan to our beloved Java Forums! (closes on September 4, 2008)
    Want to voice your opinion on your IDE/Editor of choice? Vote now!
    Got a little Capt'n in you? (drink responsibly)

  6. #6
    rico16135 is offline Member
    Join Date
    Apr 2008
    Posts
    28
    Rep Power
    0

    Default

    they should really change the java in javascript to something else, it confuses people

  7. #7
    CaptainMorgan's Avatar
    CaptainMorgan is offline Moderator
    Join Date
    Dec 2007
    Location
    NewEngland, US
    Posts
    835
    Rep Power
    8

    Default

    Quote Originally Posted by rico16135 View Post
    they should really change the java in javascript to something else, it confuses people
    Agreed. This is has been one of the worst names in the biz.... unfortunately, Sun doesn't have a say in the matter, if they did it wouldn't have been named the way it was. :(
    Vote for the new slogan to our beloved Java Forums! (closes on September 4, 2008)
    Want to voice your opinion on your IDE/Editor of choice? Vote now!
    Got a little Capt'n in you? (drink responsibly)

  8. #8
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    8

    Default

    Java v JavaScript - I got my first one a few days ago. In Java, there shoud be some way to get screen size and so on. If it is Java, they have sample code in the tutorials that will center();//

    It is remarkably deep to dig into everything well enough to actually get enough information to proxy for the LayoutManagers.

Similar Threads

  1. Noob
    By nokomis in forum Introductions
    Replies: 2
    Last Post: 03-06-2009, 05:10 PM
  2. [noob]Problem with TOS .bat
    By fred33 in forum Advanced Java
    Replies: 0
    Last Post: 03-19-2008, 02:04 PM
  3. help me with a realy easy program (substring)
    By michcio in forum New To Java
    Replies: 7
    Last Post: 01-27-2008, 12:41 AM
  4. Ah! Help a Java Noob
    By Snejana in forum New To Java
    Replies: 4
    Last Post: 01-24-2008, 03:52 AM
  5. Easy question
    By JavaNoob in forum New To Java
    Replies: 10
    Last Post: 08-03-2007, 10:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •