Positioning of Screen

I have a little card game, when I run it the screen is in the top left hand corner of the screen?
Is there any way I can make it start in the middle of the screen?
Thanks, Johnny C

frame.setLocationRelativeTo( null );

Similar Messages

  • Cursor position on screen data in module pool programming(urgent)

    Hi all,
    I developed a module pool  program which will save the data after  scanning the barcode data.
    In my program screen 100 is there which contains field  ‘2dbar’. scanned data is comming to 2dbar field.
    we r doing scan 4 times.once for vendor number,once for material no. like this.
    After 1st scan, vendor number will come to field ‘2dbar’.
    Then I developed logic to put comma after each scanned data come to this field ‘2dbar’.
    MODULE put_comma INPUT.
    CASE OK_CODE.
    when ''.
    move 2dbar to 2dbar1.
    clear 2dbar.
    concatenate 2dbar1 ',' into 2dbar2.
    *replace 2dbar with 2dbar2 into 2dbar.
    move 2dbar2 to 2dbar.
    *write 2dbar2 to 2dbar.
    condense 2dbar no-gaps.
    *move '' to 2dbar.
    *set cursor field 2dbar offset 5.
    *write
    ENDCASE.
    ENDMODULE.                 " put_comma  INPUT
    By above logic, comma  comes to the starting position of 2dbar after each scan. i.e cursor position is coming to the starting position of screen field ‘2dbar’.
    Now  I need to move the cursor position after the comma position on 2dbar after each scan.
    after 1st scan, 2dbar contains
    vmotorola
    then my logic puts a comma when u put enter on screen 100.
    now 2dbar contains
    vmotorola,
    i should get the cursor position after the comma.but i am getting cursor position before 'v'.so how to move this cursor position  beyond comma after each scan.
    I added set cursor  command but it is not working.plz
    What is the logic, I need to put in PAI  to move the cursor on selection screen.
    Already the logic I have mentioned.  with that logic, I can put comma.now I need to add cursor movement logic  to move the cursoron  on screen field ‘2dbar’.
    Plz reply me as it is urgent.
    Thanks in advance.
    Regards
    pabitra

    CASE OK_CODE.
    when ''.
    move 2dbar to 2dbar1.
    clear 2dbar.
    concatenate 2dbar1 ',' into 2dbar2.
    move 2dbar2 to 2dbar.
    condense 2dbar no-gaps.
    len = strlen ( 2dbar ).
    len = len - 1.
    set cursor field 2dbar offset len.
    ENDCASE.
    ENDMODULE. " put_comma INPUT

  • Question: How to draw to an arbitray position on Screen

    How can one draw to an arbitrary position on screen without getting a Graphics object from a JFrame, JDialog, etc...?
    I am needing the ability to create a special kind of popup, like a tooltip, but with a special shape (Like the text spoken by characters in a comic book).

    Hi acalvin1,
    The thing you are drawing will need to be in some kind of container/window/frame, whatever you want to call it. This is due to the way that the swing libraries delegate the painting of top level containers to their peer equivalent on the OS you are using. Once you have this container you can pretty much draw in it what you like.
    To create speach bubbles you would need to create a component that takes care of painting itself via its paint method (really). You need to get the graphcis object for drawing irrespective of the type of shape you want to draw.
    You may want to consider posting to the swing forum as you might get a better response.
    nes

  • Component position on screen

    Hi all
    Maybe it's too easy problem, but I would appreciate if someone help me. How can I obtain the java.swing.JComponent's position on screen?
    The methods getX() and getY() always returns 0.
    Many thanks

    Components don't have a location until the GUI is actually visible. The getX and getY methods would return the location relative to the parent.

  • How to get the cursor position from screen in module pool program

    Hi,
    I am doing the module pool program, I have one table control in one screen.
    I have to give functionality to the user that when the user enters first record in the table control and after filling the last field
    when he presses enter the cursor will have to come in the starting field of the second record.
    I know the logic , but i m bit confused.
    Can any body help me to solve this....
    thanks

    Hi,
    Check this code,
    Write it in the PBO
    MODULE SET_CURSOR_WERTKONTRAKT.
    MODULE SET_CURSOR_WERTKONTRAKT OUTPUT.
      PERFORM SET_CURSOR USING 'VBAP-ZWERT'.
    ENDMODULE.                 " SET_CURSOR_WERTKONTRAKT  OUTPUT
    FORM SET_CURSOR USING US_FELDNAME.
      DATA: DA_TFILL LIKE SY-TFILL.
      DESCRIBE TABLE IVBAP LINES DA_TFILL.
    FCODE 'Create Position':
    ==> Cursor to the first free line set to make the new position
    Can be created directly
        IF DA_TFILL EQ 0.
          SET CURSOR FIELD US_FELDNAME LINE 1.   -> set cursor position
        ELSE.
          SET CURSOR FIELD US_FELDNAME LINE 2.
        ENDIF.
    Product proposal actively
    Set ==> cursor in the first row
      IF DPP_ACTIVE   EQ CHARX AND
         XVBAP_UMFANG_OPV IS INITIAL.
    in the 'target volume' if available
        IF KOPGR_MIT_ZMENG CS TVAK-KOPGR.
            SET CURSOR FIELD 'VBAP-ZMENG' LINE 1.
            EXIT.
        ELSE.
    Else in the field 'Order quantity'
          SET CURSOR FIELD 'RV45A-KWMENG' LINE 1.
          EXIT.
        ENDIF.
      ENDIF.
    Hope it helps you,
    Regards,
    Abhijit G. Borkar

  • Mouse position on screen

    is there any way to get the mouses position on the screen (not a window)?
    Stephen

    Component c = (Component)e.getSource();
    Point p = e.getPoint();
    SwingUtilities.convertPointToScreen(p, c);
    System.out.println(p);

  • Facebook Login Window Position on screen

    I am working on a kiosk application that must be ADA compliant. Since the screen is vertical and designed for a standing adult, to be ADA comliant, there must be a mode where the UI is all on the lower portion of the screen. This is simple except that I cannot get the Facebook Login window to display in the lower portion of the screen, it will only appear in the center in a new OS window. The LoginWindow class has two properties of width and height that can be set, but not the position of the window on the screen. Is there a way to set a position for where the Facebook Login window appears on screen?

    That sounds like an OS level question rather than an AIR specific question.  You may have better luck searching for support on your OS.

  • ITunes 9.2.1 (4) problem with position on screen

    Ever since i upgraded to iTunes 9 i am unable to keep the program where i like it.
    For instance i use the mini player and put it in the bottom left corner of my screen right along the bottom of the screen. Then i maximize the program to change music and hit the + symbol to go back to mini player, the program sits about 1cm up from the bottom of the screen.
    Every time I put it back in the bottom corener, same thing again, maximize and minimize, back up to 1cm above the bottom of the screen. Right in line with the top of my dock. and no my dock is tiny, its not sitting on top of or near it.
    Only since the update.
    Any ideas?

    Here's what I had to do - and so far it has kept its settings.
    - Go to the top of iTunes in the gray shaded area & right click
    - Click on "size" - the cursor should change from an arrow to 4 arrows resembling a square (seen when editing a picture in other programs such as word)
    - Left click & hold to drag iTunes until you can see a side (either left or right - doesn't matter)
    - Once you see a side, you can move to that side (cursor changes from 4 arrows resembling a box to a left/right arrow) and bring the side in - decreasing the iTunes window - I did this to the left, top & right until all 3 sides were visible on my screen
    - I then lined it up and adjusted all 3 sides so that I could see everything (even the up/down slide bar to the far right)
    - Once I was happy with the position, I held the CTRL key down while closing iTunes (this saves the setting)
    Now, when I open iTunes, it's where I left it. Hoping this is a permanent fix. We shall see.
    Hope this helps some.

  • Elements 10 organizer window position on screen.

    I am helping an elderly friend who uses Elements 10 on a MAC, his organizer window appears on screen with the top line/menu bar having File, Edit, find, View etc. off the screen at the top and I can't move it down to display properly. I am not very familiar with a MAC being a PC user myself, does anyone know why this has happened and how to fix it please?

    I totally don't understand what you're saying, sorry. One major difference between PSE in windows vs the mac version, is that on a mac, for both the editor and the organizer, that top line is attached to the top of the mac's screen itself, not the program window. You can't do anything to the organizer window that would cover it.
    See:
    So are you sure he's  not just  looking in the wrong place? No matter where I put an application window, that top bar with the black apple is at the top of the display in every program.

  • Windows 7 explorer run prompt window position on screen varies

    whether I use the mouse via start/run or <windows key>+R the small window that appears to await input from me for the run command line dpes not consistently appear in the lower left above the windows start globe (forgive inaccurate nomenclature). 
    Generally speaking, say 50% of the time, the machine; a dual xeon HP z820 with AMD Firepro graphics and 3 display port NEC monitors with the AMD/ATI current catalyst pro drivers and NEC spectraview 2 running, puts the run window immediately above
    the start globe.  but the other half or more of the time it could be dead center in the active monitor or at varied locations about the center of the active monitor (reported as #2 in the Microsoft ID monitors results).  It's never been on a non
    primary monitor and I've tried switching monitors. to change the active one, and I've tried switching between and deleting the profiles for eyefinity, which btw is rarely in use.  It's generally just in the extended windows mode with 3 monitors.
    Is there a way to correct, control, or otherwise manage the location of the run prompt window?
    thanks in advance,
    fw

    I came here looking for a solution to a similiar issue where the "RUN" dialog kept popping up in the middle of my screen.  This thread helped me find the answer even though the answer was not in this thread. I thought I post what actually fixed my issue.
    AMD graphics have a feature in AMD Catalyst Control Center.  Look for a setting called "Dialog Control \ Enable Dialog Repositioning"  it is enabled by default and makes your dialogs go to the center of your primary screen.  Disable it and
    everything goes back to normal.

  • How to specify GUI starting position on screen

    Hello lads.
    I'm trying to figure out how to specify where a GUI begins (the default seems to be the top left hand corner of the screen).
    In my GUI program there are many "blocks". Each time one of these blocks is used another small GUI pops up. I would like for the GUI to appear:
    A) at least - in the middle of the screen. But
    B) hopefully, if possible - at the block that was just accessed.
    Can anyone point me in right direction please?
    Oh and also, I am aware of the JPopupMenu class. I am not using it.
    I would be greatful for any suggestions.
    Cheers.

    Cheers Darryl.
    It was setLocationRelativeTo();

  • [Solved] Syslinux: changing menu position on screen?

    Hi there!
    I'm trying to adjust the menu-position in syslinux to get the menu out of the upper left corner. I'm using a 1920x1080 resolution with a fitting backgroundimage. But I cannot find any information about how to use parameters like "VSHIFT" in syslinux.cfg. I've tried to fiddle around with it, but I'm not able to find out what system is behind this setting.
    Has anyone a working config for this resolution or any other hint for me?
    Thank you!
    Last edited by Thorsten Reinbold (2013-04-16 11:45:22)

    HA! Got it!
    This is really easy, if (!) you understand how it works. If Anyone with a FullHD-Display is searching for this:
    MENU VSHIFT -25
    MENU HSHIFT 80
    VSHIFT with a negative value mean "rows from bottom to top". HSHIFT 80 is (as far as my ruler says) perfectly centered.
    Next steps: changing colors.
    Many thanks for the help!

  • Applescript to open Mail & position on screen!!

    Hi
    I am brand new to Apple scripts and dont have a clue how to program them.
    I would like a script to help me check payment emails to entries to a charity bike ride that I have listed in a Filemaker pro database.  At the moment I have to re position the mail window and the Filemaker pro window side by side so I can check each email against an entry and then file it.
    My goal would be to write a script to organise my desktop for me.
    I have programmed Filemaker pro to open a new window positioned itself far left of the desktop.  I can then get it to trigger an applescript.  Is it possible to get one to open the mail app, go to a particulat folder and then position itself on the desktop to the right so I can see the two windows side by side.
    It would be good if I could tell it the absolute postion of the window and even the size then once the script is in place I could just change the values to fine tune.
    Thanks in advance.

    How are you driving Filemaker to position its window? The chances are that positioning Mail.app's windows is just the same.
    The bit you're probably missing is in selecting the message in question. That's a two-part thing that involves manipulating a message viewer:
    tell application "Mail"
              set selected mailboxes of message viewer 1 to mailbox "Stuff"
              set selected messages of message viewer 1 to (get message 1 of mailbox "Stuff")
    end tell
    This script first sets the current message viewer to point to the 'Stuff' mailbox, then it selects the first message in that mailbox. From there you can set the bounds of the message viewer to size and position the window as you like:
              set bounds of message viewer 1 to {100, 100, 500, 500}

  • Retrieve 3 rows of data and put each row in different position on screen

    I need to retrieve 3 consecutive rows of data (easy) and need to put each row's data in an entirely different location on the home page
    for example,
    row 1 needs to go up in the top left content box
    row 2 needs to go in the large content area in the middle of the page
    row 3 needs to be put down in the footer of the page
    what's the most efficient way to do this ?

    Ok, I've tried to research this a bit more, but I'm no further forward
    So if I have a query...
    <cfquery name="getData" datasource="foo">
      SELECT *
      FROM 00_pricelist
    </cfquery>
    <cfoutput query="GetData" startrow=1 maxrows=3 >
         <!--- surrounding table 1 --->
         #getData.uneak_code[1]#<br />
         <!--- surrounding table 2 --->
         #getData.uneak_code[2]#<br />
         <!--- surrounding table 3 --->
         #getData.uneak_code[3]#<br />
    </cfoutput>
    can you tell me what I'm doing wrong ?

  • Positioning Multiple pdfs on array of 6 large screens when each pdf is restarted

    I am setting up an array of 6x 42” screens connected to a single windows computer using 2 x nVidia NVS 510 4 port graphics cards.
    nView ver 141.00 is installed.
    we are using Adobe reader X
    Our challenge is how to run multiple pdf displays each starting automatically and being positioned with one pdf displayed
    on each screen. We are initiating each display from a shortcut in the Start folder.
    The main problem is the each pdf defaults to being located in the same position and screen as the previous one.
    If I locate the pdfs on the required screen then close each one. The first pdf reopened opens in the position of the last one closed and subsequent pdfs open on the primary monitor.

    I have subsequently noticed tyhat the problem is related to pdfs that are set to display in full screen mode

Maybe you are looking for

  • Producer consummer loop and timing loop

    Hi, I have to acquire 32 signals and record each signals. I would like to acquire my signals at a sample rate of 100kHz. But I tried with a different sample read and I have always an error of overwritten. In my producer loop I read and display all si

  • Hide button in Firefox

    Hi, I just built a project in RH X5 with a skin that has an image for the "Hide" button. It works great in IE, but doesn't show up in Firefox. Is there a fix for this or is something else that we're waiting for Firefox to fix with the next version? T

  • Elements 13 Spot Healing

    Does Elements 13 allow spot healing of Raw/TIFF files, for example dust spots on scans? If not, what product does? Thanks, Dan

  • Can't do a combo update

    Good day. I too am having a printing issue after the last security upgrade. I spent some time last night reading about possible fixes. The only one I could find that might work for me was the re-down load of 10.5.2 in the form of the Combo download a

  • Calendar Constrain Issue

    I'm having a bit of an issue with the constraint feature on a Prompt. A little curious if what I'm trying to do is even possible I have 2 items on my prompt. #1. Date Selection (calendar) #2. User (drop down list) Now the User is constrained based on