How can I center a frame ?

I created a 820x480 frame and want to center it in my screen. Is there an easy option or do I have to retrieve the screen's x and y coordinates first ???
cheers, Anne

This is how I usually center my JFrames:
Dimension frameSize = jframe.getSize();
Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
jframe.setLocation(screenSize.width/2 - frameSize.width/2, screenSize.height/2 - frameSize.height/2);
You may want to be more careful though; things could blow up if the frame size is bigger that the screen size!?

Similar Messages

  • I have made a book of my I Photo pictures. In certain layouts there is a textframe. How can I avoid the frame becoming visible in the print if I don't want to write anything? Should I just leave it or should I delete the text "Write your text here" ?

    I have made a book of my iPhoto pictures. In certain layouts there is a text frame. How can I avoid the frame becoming visible in the print if I don't want to write anything?  Should I just leave it untouched or should I delete the instructing text "Write your text here"?

    Most pages have layouts for pictures only or pictures with text boxes. Either select the same layout for that page but the one without the text box or put a space in the text box.
    Putting a space in the text box will avoid getting the warning when ordering that there's an unfilled text box in the book. The box will not be visible in the final product.  You can and should check the book before ordering by previewing it as described in this Apple document: iPhoto '11: Preview a book, card, or calendar before you order or print it
    Happy Holidays

  • The share operation "master file" has failed. the operation could not be completed because an error occurred creating Frame 93164 (error-1). how can i find the frame?

    The share operation "master file" has failed. the operation could not be completed because an error occurred creating Frame 93164 (error-1). how can i find the frame?

    https://discussions.apple.com/thread/6219522

  • How can I change the frame rate mode?

    Adobe Premiere Pro exports my videos with a variable frame rate. Because of this long videos are asynchronous. How can i change the frame rate mode? So Adobe Premie Pro exports my videos with a CONSTANT frame rate? The original video  has a constant frame rate...

    Sorry my mistakes. I am from Germany.. so...I mean with asynchronous that the video file and the sound file are displaced. In the beginning of the Video it's normal, but if the videos is very long it goes VERY "asynchronous"
    I analyzed the video with "mediainfo":
    General
    Format                                   : MPEG-4
    Format profile                           : Base Media / Version 2
    Codec ID                                 : mp42
    File size                                : 2.00 GiB
    Duration                                 : 20mn 13s
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 14.2 Mbps
    Encoded date                             : UTC 2013-12-11 13:56:13
    Tagged date                              : UTC 2013-12-11 13:58:30
    ©TIM                                     : 00:00:00:00
    ©TSC                                     : 30
    ©TSZ                                     : 1
    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : [email protected]
    Format settings, CABAC                   : Yes
    Format settings, ReFrames                : 3 frames
    Format settings, GOP                     : M=3, N=30
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 20mn 13s
    Source duration                          : 20mn 13s
    Bit rate                                 : 14.0 Mbps
    Width                                    : 2 560 pixels
    Height                                   : 1 440 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Variable
    Frame rate                               : 30.000 fps
    Minimum frame rate                       : 30.000 fps
    Maximum frame rate                       : 30.030 fps
    Standard                                 : PAL
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.127
    Stream size                              : 1.98 GiB (99%)
    Source stream size                       : 1.98 GiB (99%)
    Language                                 : English
    Encoded date                             : UTC 2013-12-11 13:56:13
    Tagged date                              : UTC 2013-12-11 13:56:13
    Color primaries                          : BT.709
    Transfer characteristics                 : BT.709
    Matrix coefficients                      : BT.709
    mdhd_Duration                            : 1213733
    Audio
    ID                                       : 2
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : LC
    Codec ID                                 : 40
    Duration                                 : 20mn 13s
    Source duration                          : 20mn 13s
    Bit rate mode                            : Variable
    Bit rate                                 : 158 Kbps
    Maximum bit rate                         : 254 Kbps
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 44.1 KHz
    Compression mode                         : Lossy
    Stream size                              : 22.8 MiB (1%)
    Source stream size                       : 22.8 MiB (1%)
    Language                                 : English
    Encoded date                             : UTC 2013-12-11 13:56:13
    Tagged date                              : UTC 2013-12-11 13:56:13
    mdhd_Duration                            : 1213777
    And there i can read that the "frame rate mode" is variable... and that's the bad thing... I want to change that point to a constant frame rate mode. I use the H.264 codec 

  • How can I get the frame option that diffuses the edges of a picture in pages 5.2

    I recently updated to Pages 5.2 and have discovered that my favorite and most used framing option is no longer a choice.  How can I get the frame option that allowed you to diffuse the edges to soften a picture edges on 5.2? 

    That is called the vignette, and yes Apple has removed it from Pages 5 along with 100 other features.
    Pages '08/'09 should still be in your Applications/iWork folder so use that.
    Be aware that Pages 5.2 is not only short of features it is also buggy and prone to leaving you with files that won't open.
    Peter

  • How can I center it in the cell (above big sub-table)

    The "Cross Browser marquee II" at
    http://www.pafoscarhire.com/index.php
    how can I center it in the cell (above big sub-table) ?
    I try but layer goes to the center of page rather than center
    of cell , well ?

    Heh - can't imagine what that's about....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Walt F. Schaefer" <[email protected]> wrote in
    message
    news:f53j7t$asj$[email protected]..
    >I got the same error Murray. And, I might add it was not
    centered. ;-)
    >
    > --
    >
    > Walt
    >
    >
    > "Murray *ACE*" <[email protected]>
    wrote in message
    > news:f53itb$adt$[email protected]..
    >> Internal Server Error
    >> The server encountered an internal error or
    misconfiguration and was
    >> unable to complete your request.
    >> Please contact the server administrator,
    [email protected] and
    >> inform them of the time the error occurred, and
    anything you might have
    >> done that may have caused the error.
    >>
    >> More information about this error may be available
    in the server error
    >> log.
    >>
    >>
    >> --
    >> Murray --- ICQ 71997575
    >> Adobe Community Expert
    >> (If you *MUST* email me, don't LAUGH when you do
    so!)
    >> ==================
    >>
    http://www.dreamweavermx-templates.com
    - Template Triage!
    >>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >>
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    >> ==================
    >>
    >>
    >> "123polis123" <[email protected]>
    wrote in message
    >> news:f539js$9d$[email protected]..
    >>> The "Cross Browser marquee II" at
    http://www.pafoscarhire.com/index.php
    >>> how can
    >>> I center it in the cell (above big sub-table) ?
    >>> I try but layer goes to the center of page
    rather than center of cell ,
    >>> well ?
    >>>
    >>>
    >>
    >>
    >
    >

  • How Can i use Html frames with  simple JSP???

    How Can i use Html frames with simple JSP???
    Actually i am creating an application in which i have used Index.html as frame.
    Noew i am trying that if i click on a link of one frame(say menu frame) the \result shoul come to some other frame(say frame named mainwindow).
    Hoe can i do like this???
    Anand Pritam

    Well i am using..
    < Base target="mainwindow">
    But it is no working is there some other way??

  • How can I center the chart inside the portlet?

    Hi,
    I created a bar chart and published it as a portlet.
    The chart is left-positioned inside the portlet which doesn't
    look good. How can I center it?
    Thank you in advance for your help.

    Hi,
    There is no way of centering your chart within a portlet.
    Thanks,
    Anu

  • How can I extract single frames from an imovie?

    How can I extract sigle frames from an imovie? Thanks for any input on this. Using iMovie 11

    John Codgell has some tips on how to use MPEG Streamclip to do this on this Discussion Thread:
    Helpful AnswerRe: can you make a still photo from clip

  • How can I center this tag?

    http://www.ivoog.com/link
    How can I center it without using background-position:center
    or margin-auto or can anyone find out how it can be centered?
    Thanks!

    :::sigh:::
    Three questions.
    1. How wide is the image that is the background of the div?
    2. Do you want the div to be the same width as that image?
    3. As Murray asked, could you please describe in detail what
    you are trying
    to do?
    Thank you,
    Tim
    "Murray *ACE*" <[email protected]> wrote
    in message
    news:fl3grq$lgn$[email protected]..
    > Good grief. We have come full circle.
    >
    > --
    > Murray --- ICQ 71997575
    > Adobe Community Expert
    > (If you *MUST* email me, don't LAUGH when you do so!)
    > ==================
    >
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    > ==================
    >
    >
    > "trhymer" <[email protected]> wrote in
    message
    > news:fl3e4t$iqo$[email protected]..
    >> You want the background image to be centered?
    >>
    >> try: background-position:center
    >

  • HT201317 How can I disable picture frame when in locked position?

    How can I disable picture frame when in locked position?

    Go to Settings>General>Passcode Lock, enter your passcode, then turn Picture Frame to Off.

  • Why my Dock is always on the LEFT at the bottom. How can I center it?

    My dock is on the LEFT side at the bottom. How can I center it?

    Welcome to the Forums!
    Location is set in System Preferences > Dock. It should be centered, either centered horizontally if placed at the Bottom, or centered vertically if placed at the Left or Right.
    I take it you have it set at the Bottom, and it's along the bottom but over to the left side?
    Try deleting the file "com.apple.dock.plist" from ~/Library/Preferences.
    Hope this helps...

  • How can I include the Frame Number  when using "Export Frame"?

    Im using the button at the bottom right of the Playback Control Panel called "Export Frame".  This does exactly what I need but I have a lot of frames that need single frame exporting. How can I get the file name to automaticly include the frame number at the end of the file name? 
    For example, instead of it displaying "Sequence 01.Still001"  by default.  I would like for it to display "Sequence 01_0001"   Letting me know that is frame 0001.
    This is possible, correct?

    Well what about in the export option using CTRL + M?  I saw a coworker using this method in an older version of Premiere, but we can't enable it on CS5.5.  Being able to export a single frame as a bmp that has the frame number at the end of the file name.
    Example:
    Output Name: Sequence 01_0001.bmp
    Under Video Basic Setting is:
    Export As Sequence UNCHECKED
    Field Type: Progressive
    Frame number still doesn't show at end of file name.  What are we missing?

  • How can i center a pop up window?

    hello,
    i am trying to get the new window that will open after
    clicking a link with an onClick beheavior to span the entire length
    of a monitor displaying a 1440 pixel resolution .
    when the user clicks the link & the new window opens, it
    pops up relative to where the previous browser window is located.
    the new window is 1440 pixels wide, however, it most likely opens
    with a portion cut off, rather than being fit to screen.
    does anyone know how i can possibly center the window, or any
    other way to control where it will appear when it opens?
    Here is the code I used.
    <a href="folio.html"
    onClick="window.open('folio.html','foliowindow','toolbar=no,location=no,directories=no,st atus=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=1440,height=760');retur n
    false;">
    link here</a>

    In the properties of your page, change the property 'Launch in New Window' to 'Display in separate window'.

  • Film won't render. Error is like: error in frame 3490. How do I find out what is wrong? How can i find the frame numbers?

    Hello
    Who can help me? I made a movie in Final Cut. Not a special one, some text and that's all. With scenes from mu Sony camera, I imported. When i want to share the movie (to facebook, youtube, or masterfile), it won't work. It loads upto 57% or so and that it quits, and gives error code:
    the operation could not be completed because an error occurred when creating frame 3490 (error -1).
    And now? I can't find framenumbers? How can i find out what's wrong. I tried everything. The film plays well in playback. I just can't make a filmfile.
    Xandra Storm

    Like Tom said, you can locate the offending frame by switching in Preferences->General the Time Display to "Frames" (that is how it looks in 10.1; I believe that in older versions the same preference might be in Edit or Playback preferences, I can't recall exactly).
    When this error occurs, it can usually be solved by deleting render files, or by replacing the clip where the problematic frame happened.

Maybe you are looking for

  • No audio on PC's, Audio is fine on Mac

    After exporting a project to quicktime, the movie plays fine on my Macbook Pro however on my clients PC there is no audio. Ideas? Is there a rock solid, cross-platform Quicktime codec out there?

  • About query related problem

    hi ,        we are generate query in 2005b,and procced for execuite query.following problem occure'<b>odbc sql server driver'[sql server] syntax error the converting the nvarchar value' 70302/20307' to column of data type int received alert OAIB</b>

  • Javac

    I would like to be able to compile java programs on my laptop, but I can't get it to work. I have Windows XP running on an HP Pavilion laptop. So far I've uninstalled everything related to Java and reinstalled it so that I have the Java SE Developmen

  • Preview, Applescript & Mountain Lion

    Just a warning: Because the "Preview" app has been un-AppleScript-able since forever, homegrown terminal commands are recommended to make it scriptable, such as: "Quit Preview.app, then open a terminal and enter: "sudo defaults write /Applications/Pr

  • V1.5.1, Contact Printing Color Management Broken (?)

    I'm finding the color to be off significantly when trying to print contact sheets in v1.5.1 (yes, I'm using color management and color managed printing with custom made printer profiles). The same images print fine if they are printed on their own th