How do i get the max width and height?

Hey
I want to get the max width and height, so my desktoppanes size can be set automatically.
I know i should use getBounds but i cant find a concrete example on goole, on how to use it.
Can someone point me in the right direction, with an example?

Ok, assuming you want to get the screen resolution, i.e. 1024 x 768.
You will need these imports:
import java.awt.Dimension;
import java.awt.Toolkit;and this line of code:
Dimension myScreen =  Toolkit.getDefaultToolkit().getScreenSize() ;You can now use myScreen.width and myScreen.height to access the height and width of your screen's resolution. (width = 1024, height = 768 in my case)
Hope this helps,
Stern
Edited by: Stern on Apr 13, 2008 6:49 AM

Similar Messages

  • How can I get the image width and height stored in database?

    Hi!I write s servlet to display images store in database.but how can I get the image width and height?

    Have you tryed using PJA or a similar library?
    I presume you get java.lang.NoClassDefFoundError on the line :
    Toolkit.getDefaultToolkit();?

  • How do I return the page width and height as a text variable?

    Hi
    I'm trying to create a media box for use in job to return information in the slug area. I have a script that will return the username of the computer as a text variable but I would also like to return the height and width in mm as a text variable too. Does anyone know how to this please?
    Thanks

    Hi Vamitul
    Thank you for your response. I very new to scripting so I hope you'll bare with me.
    How do I apply your code to indesign please? At the moment I have a script that returns the computer user name(an online script i found called 'addCustomVariables_103.jsx') that's going to be one of the variables I use in my media box. This lives in the startup scripts folder but i'm guessing I can't just add your code to it as yours will require an open document to return any values. How would I apply your code so it works in inDesign? Ideally i could do with this automatically adding the text variables at startup as I'll be installing this on several machines.
    Thanks once again for your assistance.

  • How can i get the max rpm from cpu fan??

    how can i get the max rpm from my cpu cooler regarding that i don't have a speed controller attached to the cpu fan ,,, ??  please make things clear for me
    thanks

    if you have not reduced it by using a speed controller either hardware or software or by the 7v mod its already going as fast as it will at 12 v dc you cannot speed it up only slow it down
    need more air get a different cooler/fan

  • HT1203 Can I share one iTunes account for my iPad and two I phones? If so, how can I get the purchased apps and music on all three devices? Do I need a home computer,

    Can I share one iTunes account for my iPad and two I phones? If so, how can I get the purchased apps and music on all three devices? How do I sync all the devices to have the same music and apps?

    You can set up an iCloud account on each one (the SAME iCloud account using the same AppleID on each) and then sync via iCloud.
    http://support.apple.com/kb/HT5262\
    However, an iCloud backup nor sync contains purchased content - that is available for redownload from the iTunes and App stores (so no need to waste iCloud space storing it for you).
    So, for purchased content, you will have to download it on each device - just use the same AppleID and download each item on each device.
    Without a computer to aid the sync'ing, downloading the purchased content on each device is the only way.
    P.S  audiobooks cannot be re-downloaded once purchased (all other content can be), so without a computer to save, store and move the audiobook files around, you will only be able to put those on one device - the one you first purchase it on.

  • How can I get the second group and report totals in Matrix report?

    Hi,
    I have created a matrix report with 2 break Groups.
    Iam getting columns totals for the first group, but not for the second group and the report totals.
    How can I get the second group and report totals for each month?
    Thanks.
    Ram.

    Hi Ram,
    If you want a total at any group-level, go to the particular group in the data model, insert a summary column in the group, and select
    Reset At > appropriate Group Name
    For report level summaries, you must create the summary column outside of all groups.
    Navneet.

  • How can i get the code html and css of my form please help me

    how can i get the code html and css of my form

    HI,
    If you like to embed the HTML form in your web page then you will need to obtain the form code from the Distribite/Embed tab. Additional information can be found here: http://forums.adobe.com/docs/DOC-1991
    You will not be able to access/modify the css code or the rest of the form html code.  If you like to view the source of of a HTML page, please use your browser 'view source code' functionality.
    I hope this answer your question,
    Thanks,
    Lucia

  • How do i resize videos from my iPhone into iMovie so that they are the correct width and height as a standard youtube is ????

    Hey guys i have recorded some videos on my iphone and i have synced them to my mac.
    i would now like to edit them using imovie, the only problem i have is that when i open them in imovie, quicktime, vlc etc etc, they all playback at the same width and height as the iphone screen.
    now is there any way using imovie that i would be able to resize the video to make it larger so that the video is the correct height and width of a video that you would see on youtube.
    If this makes sense and if there is anyway of doing please let me know as i have tried looking for a shortcut or a plug in everywhere and i just cant seem to do it.
    Thanks
    Sean.

    you probably recorded in 'portrait' orientation instead of videos standard 'landscape' ...
    as my ex-wife always and approx. 75% of all 'phone movie maker' do ...
    read in iMovies Help, how to use the CROP tool.

  • How do you create aligned interactive text boxs in a PDF with the same width and height?

    how do you create aligned interactive text boxs in a PDF with the same width and height?
    Without free hand creating the sizing?

    Assuming by "interactive text boxes" you mean form fields; in Acrobat, make a form field, then copy it and paste. (GIve the pasted copy a different name so they don't genetate the same field feedback.) Now you have two fields of the exact same size. Shift-click or marquee-drag to select both, then right-click and choose a command from the Align, Distribute or Center menu.

  • Need help!!!! I've got an old mac mini G4 and while adding a cd to itunes, there was a power shortage to the house. Now when I try to reboot I get three beeps and the CD is still stuck in the mac. How do I get the CD out and is that why I am getting beeps

    Need help!!!! I've got an old mac mini G4 and while adding a cd to itunes, there was a power shortage to the house. Now when I try to reboot I get three beeps and the CD is still stuck in the mac. How do I get the CD out and is that why I am getting the three beeps?

    If you can't eject a CD or DVD or open the drive tray
    How do I eject a defective DVD?: Apple Support Communities
    How to eject a CD on a MAC mini with PC keyboard and mouse « FAQforge
    From:
    Mac computers: About startup tones
    3 successive tones, a 5 second pause (repeating): This indicates RAM does not pass a data intregrity check.
    1 long tone while holding down the power button: Indicates an EFI ROM update is in progress on a computer manufactured before 2012.
    3 long tones, 3 short tones, 3 long tones: Indicates EFI ROM corruption is detected and the computer is in EFI ROM recovery mode.

  • Hello, I forgot what apple ID and password i have in order to go into game center. All I know is the username. How can i get the apple ID and password back?

    hello, I forgot what apple ID and password i have in order to go into game center. All I know is the username. How can i get the apple ID and password back? Please help!

    i have the same problem did you find out how please ?

  • How do I get the user name and password for the Apple Extreme Router to connect to a Slingbox

    How do I get the user name and password for the Apple Extreme Router to set up my Slingbox?  It will not accept the Apple Extreme Name and password.

    The AirPort Extreme does not have a User Name, but it does have a device name and device password, which you may have already tried.
    There is also a Wireless Network Name and Wireless Network Password for the AirPort Extreme, which might be what the Slingbox is looking for if you are trying to connect it to your wireless network.
    There are no other "user names" or "passwords" on the AirPort Extreme.
    You established the device name, device password, wireless network name and wireless network password when you originally configured the AirPort Extreme.
    If you cannot remember these, you will need to perform a Soft Rest to reset everything. Follow the instructions in this Apple support document:
    Resetting an AirPort Base Station or Time Capsule FAQ

  • How do I get the full path and filename of the current document?

    I'm writing a format plug-in. How do I obtain the full path and filename of the current image (document) from within my plug-in? Any help would be greatly appreciated!

    I actually just figured this out. For anyone else who would like to know, check out the propetizer sample code in the photoshop sdk. It makes a "filter" plug-in that just spits out all the properties of the document you could ever want to know about. The function I used to get the full path and filename of the current document is PIGetDocumentName(). I hope this helps someone eventually...

  • How can I get the administrators name and password so I can download the latest os this is a refurbished iMac

    How can i find the administrator name and password for my  iMac .
    This was a refurbished product purchased online and i need this info to download new things form the apple store ?

    See #5
    Step by Step to fix your Mac

  • Get image properties (width and height)

    Hi there,
    Does anyone know if there is a way that I could get the width and height of an image to be displayed in a JSP.

    Image has methods to get the width & height.

Maybe you are looking for

  • Why does logic need to be "warmed up"?

    Whenever I start logic pro 7.1.1 and load up my most recent song, I always have to go through a series of core overloads. Most of my softsynths ( I typically use around 25 ) are EXS24 samples, and it seems as though whenever I load up an instrument I

  • Web query problem

    Hi All, I am using a jump query in my web application, the user can click on the result area and jump to the next detailed view I am able to jump to the next query without any problem and able  to get the result but the next screen starts blinking(se

  • Why is my iCloud storage at 4.8GB?!

    Why is my iCloud storage at 4.8GB?! I have 0.8GB from Music, 1.2GB from Apps, and the rest from "Other." No one at Apple Store or Sprint store gave me correct advice. Most all my apps are OFF for backup. I don't get it. What is taking up so much spac

  • Calling multiple paper types and duplexing

    Hi all, I'm being tasked to evaluate Live Cycle Designer as a development tool for batch printing of forms. We have multiple page forms that require multiple paper calls. I.E. page 1 on plain paper, page 2 on perf paper, pages 3 & 4 on double perf. A

  • Maintaining HD frame size and compressing to MPEG2?

    Hi all... Doing my first DVD Pro project and learning... Here is my problem... The quicktime files coming out of FCP are 720p and I´d like to maintain that size when doing my SD DVD. In Compressor I choose the setting "Best Quality DVD 90 minutes" an