Is there a way to specify where an app starts on your screen

Is there a way to specify where the JFrame will appear on your screen at runtime by default? For me it always starts on the upper left hand corner, and I want it more in the middle.

Sorry, that should actually read:
    frame.setSize(800, 600);       
    // center the frame       
    Dimension size = frame.getSize();       
    Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();       
    frame.setLocation((screen.width - size.width) / 2, (screen.height - size.height) / 2);       
    frame.setVisible(true);cheers,
Greg

Similar Messages

  • When using the built in web server, is there a way to specify a different

    When using the built in web server, is there a way to specify a different error handler when you try to access a NON .CFM file? Right now I get the standard:
    java.io.FileNotFoundException: filename.ext
    Is there any setting to override this and direct the message to your own .cfm template? The missing template handler in the CF Admin work only for .cfm files.
    Thx

    The in-built web server for ColdFusion 8 is JRun. I am on ColdFusion 10, however, and so cannot offer hands-on advice. (CF10 replaced JRun with Tomcat.)
    My guess is that you have to modify the file {CF_ROOT}/WEB-INF/web.xml. Don't forget to create a back-up first!
    You may then proceed as follows.
    1) In the ColdFusion root (CF_ROOT), create the file myCustomFileNotFound.cfm. Give it some content, like
    My custom File Not Found page. Current time: <cfoutput>#now()#</cfoutput>
    2) Open the file {CF_ROOT}/WEB-INF/web.xml in a text editor. Add the following error-handling specification just before the end tag </web-app>:
    <error-page>
    <error-code>404</error-code>
    <location>/myCustomFileNotFound.cfm</location>
    </error-page>
    Save the file web.xml.
    3) Restart ColdFusion. Test by browsing to a URL requesting filename.ext

  • Is there a way to specify a value not allowed in text field?

    I see there is max/min chars and values but is there a way to specify not to allow specific words or a specific value like 2000 in an integer field? Maybe I'm blind but I searched through all of this document http://labs.adobe.com/technologies/spry/articles/textfield_overview/ as well as this forum and wasn't able to find anything. Thanks in advance for any help.

    This forum is for authoring Dreamweaver Extensions. Are you using Spry in a DW Extension?
    If not, try the Spry forum:
    http://forums.adobe.com/community/adobe_labs/spry_framework_ajax_prelease
    Randy

  • Is there a way to specify text-to-speech to dictate a specific line or..

    Hi guys,
    Is there a way to specify text-to-speech to dictate a specific line or page in a pdf file?
    In fact, it would be cool if text-to-speech highlighted each word that is being spoken through out the document during dictation and you could rewind, pause or fastforward the speech in real-time. Is this feature available? if not, can anyone recommend any other programs that can do this?
    thanx in advance

    Is there a way to specify text-to-speech to dictate a specific line or page in a pdf file?
    Yes!
    With fully modern Cocoa applications (like Safari, Preview, TextEdit, and Mail) you can select the line or page and then from the application menu > Services > Speech > Start Speaking Text
    You can also select and then Control-Click on the selection and then pick Speech > Start Speaking Text from the contextual menu. (Works with Safari, TextEdit, and Mail, but not Preview for PDF.)
    In fact, it would be cool if text-to-speech
    highlighted each word that is being spoken through
    out the document during dictation and you could
    rewind, pause or fastforward the speech in real-time.
    That would be cool. Are you looking for an interface enhancement, or would a talking book reader with these features be acceptable?
    Is this feature available?
    No, but you can get somewhat close to this ideal by using VoiceOver and checking Show Caption Panel.
    if not, can anyone recommend any other programs that can do this?
    I have had fair success with the Text Help Read & Write Aloud products.
    http://www.texthelp.com/rwm.asp?q1=products&q2=rwm
    eMac 1.42   Mac OS X (10.4.6)   I paid the going Windows price for a screen reader and got a free computer!

  • HT1689 If i have an iPhone that was stolen and is not hooked up through a carrier is there a way to locate where the phone is?

    If i have an iPhone that was stolen and is not hooked up through a carrier is there a way to locate where the phone is?

    No.

  • Is there a way to specify sorting in Notes and Reminders in IOS 7?

    Is there a way to specify a sorting order in Notes and Reminders in IOS 7?  Although Notes and Reminders now sink with Outlook (via an Exchange server,) they seem to appear in a random order.

    If you're on an iPhone and you pull down on the unsorted reminder list, it exposes a Search box and an alarm clock.  If you select the alarm clock, it puts the reminders in ascending chonological order grouped by date -- e.g., "Today", "Thursday, September 26", etc. with the caption "Scheduled" at the top.

  • HT3149 When I click on a photo, is there a way to see where else it is located, like in which albums it is in?

    When I click on a photo, is there a way to see where else it is located, like in which albums it is in?

    In iPhoto '11 you can show the event a photo is in or show the image file in the Finder:
    You can select a photo and click the triangle in the lower right corner. Then select "Show event".
    To show the image file in the Finder use the "File" menu in iPhoto: File > Reveal in Finder.
    But there is no direct way back to the albums. To find the photo in the albums you could use unique keywords for each album or flag the photo, then filter the abum you are interested in.
    Regards
    Léonie

  • There any way to know where my ipad, because it was stolen? and do not use iCloud? besides not remember if you have installed any applications to track it?

    there any way to know where my ipad, because it was stolen? and do not use iCloud? besides not remember if you have installed any applications to track it?

    If you did not set up Find My iPad, then there is no way to track it. Contact the police and change any passwords for any online accounts you may have used from your iPad (the iTunes Store, for instance). 
    Regards.

  • On the new ipod touch, is there a way to enlarge album art to fill the whole screen?

    Hi there,
    For Christmas I was given a new ipod touch (long story short my old one I put through the wash by mistake ) and this new one is great but when I listen to a song on the new itouch the album art does not fill the whole screen like my old itouch, this is a small detail I know but I loved that feature so much and I was hoping there was a setting I could activate/change which allows this on the new itouch.
    At the moment on the new itouch the album art is small and centered towards the top of the screen while the function icons are below the image while on the last one the album art filled the whole screen and the function icons where over the picture at the bottom and didn't stand out as much as it does now.
    I have drawn a very rough MSpaint diagram explaining what I mean lol.....
    [i tried using the insert image feature but got a javascript error so using external site to upload pic]
    http://s28.postimg.org/aovrsuewt/itouch_something_like_this.jpg
    Anyway my question is, is there a way to have the album art fill the whole screen with the new itouch?

    Just sync them to the iPod. See:
    iTunes: Syncing photos
    They will not go to the camera roll album but to a new album

  • Is there a way to create a playlist from the now playing screen on ios7?

    Is there a way to create a playlist from the now playing screen on ios7? I want to be able to hear a song in my collection and immediately add it to an existing playlist or create a new playlist.
    Thank you in advance

    Hi Cornellius,
    From the now playing screen there's a Create button at the bottom that allows you to create a
    Genius Playlist
    New Station form Artist
    New Station from Song
    IPhone Help, Browse and play
    http://help.apple.com/iphone/7/#/iph3cf21a82
    The Now Playing screen provides playback controls and shows you what’s playing.
    For information on Genius Playlists, see
    Archived - Genius for iPod and iPhone
    http://support.apple.com/kb/HT2978
    I don't see an option to add it to an existing playlist.
    Best Regards,
    Nubz

  • I just bought an ipad2, is there a way to transfer all my apps from my old ipad to my new?

    I just bought an ipad2, is there a way to transfer all my apps from my old ipad to my new?

    Backup the old iPad.
    Restore the backup to the new one.
    tt2

  • Is there a way I can view all apps I have ever downloaded?

    Is there a way I can view all apps I have ever downloaded? Like some sort of historical list associated to my account?
    It would help a great deal- I restored my phone from a backup after my iphone crashed- but I had downloaded many apps since then, so now I have to re-download all the missing apps. Thing is I cant remember all of them?
    Anone else have the same problem?

    Have you never synced your phone? Syncing puts copies of each app into iTunes for you to manage and have available to sync over when you want.
    Other than that, in iTunes, from top menus (forget which one, think under help) you can access your account and then view purchase history.

  • Is there a way to create my own app store that I can share with employees? I'm thinking apps that we've identified as important or needed, all in one place.

    Is there a way to create my own app store that I can share with employees? I'm thinking apps that we've identified as important or needed, all in one place.

    Not exactly your own app store, but close.  Apple has an App Store Volume Purchasing Program for Business > http://www.apple.com/business/vpp/
    It allows you to purchase apps in any quantity you desire and pay using a company credit card.  You will receive a spreadsheet of redeem codes which you distribute to your emloyees.  The program guide has complete information > http://images.apple.com/business/docs/VPP_Business_Guide_US.pdf

  • Is there a way to view only the apps I'm not using?

    If I attach all my iOS devices to my computer, is there a way to view only the apps in my iTunes library that are NOT being used by any device?  To make it easier to know which I'm not using, so I can delete them off my computer and free up some space?

    In Settings:
    General->Network->Cellular Data: Switch off.

  • Is there a way to "Quit" all running apps in dock at the same time verses right-clicking each one individually?

    Is there a way to "Quit" all running apps in dock at the same time verses right-clicking each one individually?

    IIRC, OPTION-click on the Apple icon on the menu bar and select either Restart or Shutdown. Alternatively,
    Control-Command-Eject
    Quit all applications (after giving you a chance to save changes to open documents), then restart the computer
    Control Option-Command-Eject
    Quit all applications (after giving you a chance to save changes to open documents), then shut down the computer

Maybe you are looking for