Getting the size on the screen
I making video games, its a good idea to make the games
playable on any size on screen or montior. Im trying to
do that. What Im trying to do here is: when the game starts
the program check what size screen the computer has, and
then open a window to that size. Does anyone know how to do this?
Im thinking its something like this:
ScreenDevice sd = ScreenDevice.getDefaultScreenDevice();
// and then on from there..
Can anyone help me out?
Thanks
this is the most correct way of doing it :-
GraphicsEnvironment ge = GraphicsEnvironment.getLocalEnvironment();
GraphicsDevice gd = ge.getDefaultScreenDevice(); //this line uses the primary monitor only
//you could modify it to take into account multi-monitor systems
DisplayMode dm = gd.getDisplayMode();
dm.getWidth();
dm.getHeight();however, you can also do this :-
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
d.getWidth();
d.getHeight();all this info is available in the javadoc ;p
Similar Messages
-
I upgraded to OS Yosemite on my MacBook Air...and I cannot upgrade the Adobe Flash download that Adobe keeps asking me to download. I get the screen and when I click on the icon it just creates a new window but not download. Thoughts?
I just tried the link and it is just fine. If the GateKeeper pops up then open Security & Privacy preferences, click on the General tab, set the last radio button to Anywhere.
-
How can I get the screen to lock on my iPhone 4, so I don't press buttons while talking?
I just upgraded to the iPhone 4. When I am talking on the phone, the screen doesn't lock, so I am constantly pressing buttons or hanging up on the person I'm talking to. How can I get the screen to lock while I'm talking? It's driving me NUTS.
The otterbox is one of the culprits. Take the phone out of the case and see if it still happens. If so it is not the case. If the problem goes away, then you may need to make the hole slightly larger. My family has three iPhone 4's in otterboxes and none have this problem. Other users on this forum have reported success with the above methods.
-
the touch screen on my ipod touch is not working. meaning that i can not unlock my ipod or even turn it off. is there anything i could to to get the screen to work again?
Try # 2 and 3 in link below. If neither work, your screen digitizer might need to be replaced.
Basic troubleshooting steps
17" 2.2GHz i7 Quad-Core MacBook Pro 8G RAM 750G HD + OCZ Vertex 3 SSD Boot HD
Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101 -
MY KEY BOARD IIGHTS ARE ON BUT NO MATTER WHAT I DO I CAN GET THE SCREEN LIGHT ON
my key board lights are on., but no matter what i do i cannot get the screen of my mac pro on
Apple computers: Troubleshooting issues with video on internal or external displays
Scroll down to Reset the system -
Function Module to get the Screen
Hello All,
Can anybody provide me a Function Module to get the Screen by giving Program Name and Screen Number.
Thanks,Hello
check FM RS_IMPORT_DYNPRO
CALL FUNCTION 'RS_IMPORT_DYNPRO'
EXPORTING
dylang = pmlang
dyname = programname
dynumb = screen
IMPORTING
header = header
TABLES
ftab = ifields
pltab = iflowlogic.
or you have to create join b/w table reposrc and tadir .
Thanks
Anirudh -
I forgot the answers to the security questions. When I get the screen to answer them, the email address listed to send the email procedure is wrong. How do i change this email address?
Alternatives for Help Resetting Security Questions and/or Rescue Mail
1. If you have a valid rescue email address, then use this procedure:
Rescue email address and how to reset Apple ID security questions.
2. Fill out and submit this form. Select the topic, Account Security. You must
have a Rescue Email to use this option.
3. This is the only option if you do not already have a valid Rescue Email.
These are telephone numbers for contacting Apple Support in your country.
Apple ID- Contacting Apple for help with Apple ID account security. Select
the appropriate country and call. Ask to speak to the Account Security Team.
Note: If you have already forgotten your security questions, then you cannot
set up a rescue email address in order to reset them. You must set up
the rescue email address beforehand.
Your Apple ID: Manage My Apple ID.
Apple ID- All about Apple ID security questions. -
My iPad conveys that it is disabled, and that I need to connect to iTunes. When I connect to iTunes I get a message that I need to enter my pass code and open my Ipad, but I don't get the screen to open with a password. How do I fix this?
You will need to restore it. It may not sync, but the iPad's sidebar has to appear you can restore it and it will be as the last time ou synced it to iTunes. For more info:
iTunes: Backing up, updating, and restoring your iPhone, iPad, or iPod touch software -
How do i get the screen for pages and numbers to become bigger on my screen
How do I get the Screen for pages, numbers and quickbooks to become bigger on my screen.
The Font is fine for pringingMac's don't have UI scale options like Windows has.
Either you can drop the screen resolution in Displays a wee bit and make things appear distorted, or do what I do and use the Universal Access and set a control key, then use a mouse wheel/scroll to zoom in and out where the mouse is pointed.
For easier web surfing I've got a good solution here
Better surfing options for hard of seeing users -
why can't i connect to my iphone after updating to 7.1.1? i don't even get the screen that lets me login into my apple account??? plz help my phone was stolen and through help of the police i recovered it and now i can't access my phone
You must have had find my iPhone on, or it was locked by your phone carrier.
Call your our cell carrier first.
then log on to a computer to iCloud to erase your iPhone.
NOW... You will be able to setup with a backup. -
Can I get the screen fixed on the iPhone 4S if it was dropped and cracked? How much does it cost?
Apple do not repair ,an OoW echange unit in US is $199 for an iP4S
if you take it to an unauthorised repairer they do not have Apple spares and Apple will subsequently refuse any service or support on that device -
Since july 2 I have Acrobat Pro (the paid version). But every time I start the program I get the screen with: this is a trial version. You have X days left, etc. I find that quite annoying.
This is not just annoying, it is wrong, because at the end of the trial it will stop completely. You must resolve it before then.
So, did you do anything to license the trial version? It needs to be told that you have purchased, or it will stop working at the end of the trial. -
When I open my iTunes and am also connected to my iPad, I do not get the screen where I can select a device or choose the Summary tab. What am I doing wrong?
Hello Hegsted60,
Sorry to hear that your iPad is currently not recognized by iTunes. I found an article with steps you can take when you experience an issue like this. I wasn't sure whether you were using a Windows or Mac computer, so I included the respective articles for each:
iOS: Device not recognized in iTunes for Windows
http://support.apple.com/kb/TS1538
iOS: Device not recognized in iTunes for Mac OS X
http://support.apple.com/kb/TS1591
Thank you for using Apple Support Communities.
Best,
Sheila M. -
How do I get the screen to refresh when drawing a line larger than the art board
How do I get the screen to refresh properly when drawing a line larger than the art board when the screen scrolls? Everything turns white in CS6, CS5 and CS4.
Existing art - not the new art. The new art just gets a proxy shape - seen in my example as the blue rectangle. The existing art is what gets smeared as you drag past the edge of the screen. If it's anything other than an Ilustrator thing, it's a Mac thing. I've never known it to be any other way other than maybe in the past showing blank white instead of stuttered art on probably 10 different macs over the years.
Take any art that you've ever created. Zoom in so that your art is bigger than your screen (so that there's somewhere to scroll). Rectangle tool (or move, scale, rotate(?) something, or draw a line) Start your rectangle anywhere, drag so that you are at the edge of the screen, causing it to scroll. The existing art will get all effed up. The rectangle you're drawing will draw as you expect it to - that's not the issue.
How does Wade take his videos? -
Hello - can anyone tell me why my iPad (4th Gen) screen will no longer rotate. I don't have a screen lock symbol next to the battery icon. I have the rotate icon on my desktop but still can't get the screen to rotate.
Double-click the Home button and swipe Task Bar to the right. Check the Rotation Lock on the far left of Task Bar.
http://i1224.photobucket.com/albums/ee374/Diavonex/ba23c598623fe4fd062a40e349af2 18d.jpg -
Dropped my iphone 5. Can I get the screen replaced for free?
Dropped my iphone 5. This is the replacement phone Apple gave me a month ago - the camera didn't work properly so they gave me this one. They told me it has a 90 day guarantee. Can I get the screen replaced for free?
That is not a 90 day guaranrtee. It is a 90 warranty which only covers workmenship and materials not damage. So no. You are going to have to pay to get it replaced.
Allan
Maybe you are looking for
-
Have a friends model A205-7458 that he was downloading a file onto a USB HD when apparntly the printer cable got hooked on the USB drive and yanked it out. System now will not load and hits a corrupt file message in \windows\system32\drivers\fileinfo
-
Hi All, Again i am here for your valuable suggestion and help. I dont know User Exit. I got a situation like below. Plz give me some step by step process to resolve the issue, My time is very short.. so if u can give the exact full steps it will be v
-
is there any .obr files related to Oracle SOA Suite 10.1.3.1.0 ? if yes then i want to open that .obr files in Oracle SOA Suite 11g environment . is it related to Oracle Business Rules ?
-
Random record retrieval problem
At this point I'm sort of desperate as this has been going on for a few weeks now. I missed this part of the forum an dposted the problem here: thread If anyone can help I would very much apprecfiate that!
-
Why still can not update thunderbolt update 1.2.1
I had newly bought a Thunderbolt Ethernet Adapter for my late 2010 MacAir. However, when I try to install the Thunderbolt update 1.2.1 and it keep shows "This software is not support in this system". Can someone tell me why ? and How can I solve this