Home Discussion Discuss: Java get Screen Dimensions

  • Inefficient...aetherX December 19, 2011 at 5:15 PM

    Instead of creating an instance of the toolkit just to use it once, and an instance of the dimension, again to just use it once, just do System.out.println(Toolkit.getDefaultToolkit().getScreenSize.width); and System.out.println(Toolkit.getDefaultToolkit().getScreenSize.height); This is a lot better... trust me.

  • Using this on CF?Hamlet February 21, 2012 at 3:03 AM

    Very nice! How would you use this in ColdFusion?

Post your Comment



Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Related Articles
General

Java get Screen Dimensions
Java get Screen Dimensions     ... and width of the specific screen. The Toolkit class has a static method called... and height of the screen.       Here is the source code 

PHP Tutorial

PHP GD get image dimensions
the program you will get the following output OUTPUT :image exists , here is some 

JSP Servlet Questions

populating a screen on the same page
populating a screen on the same page  i'm making a time table in jsp... down. But now i want that onclicking slot(button) a small selection screen like we get generaly while entering our date of birth to select date,year etc 

Mobile Applications Questions

iphone retina display dimensions
iphone retina display dimensions  What is the dimensions for the iPhone and iPad retina display images..?   According to apple (iTunes) .. The requirements for high-resolution images are 960 x 640, 960 x 600, 640 x 960 

General

Splash Screen in Java Swing
a swing splash screen in Java. The Java splash screen will get disappeared on its own...Splash Screen in Java Swing This Java tutorial chapter explain you how to create and implement the splash screen using Java Swing. The Java Swing splash 

Software Services

The isTouch Screen on the iPad a Convenient Feature
The Touch Screen on the iPad is a Convenient Feature One of the best features that the Apple iPad has is its ability to work with a touch screen. This screen is one that will make it easy for anyone to control different types 

Struts Examples

Login Screen of Application
Login Screen of Application       Login Screen our web application allows the user... to logged on the system.  Login Screen: Field Description: Login Id 

JSP Servlet Questions

Screen Capture
Screen Capture  How to capture the screen using jsps and servlets 

windows

How to Manage Windows 8 Start screen?
user interface called the Windows Start Screen or Metro Style Interface that appears to you when you login to Windows 8. This time the start screen contains... on the programs. Let us learn, how to manage your Windows 8 Start screen. Unpin 

Java Beginners

how to create unit matrix in java of arbritary dimensions
how to create unit matrix in java of arbritary dimensions  i want to create the unit matrix of arbritary dimensions say (n*m).i m a new beginner to java.someone having the program for that? help would be appreciable 

JSP Servlet Questions

Screen shot
Screen shot  webpage screenshot source code 

General

Java Get Example
Java Get Example      ... examples to get the things fast and practice these code at your end to learn java.... Java Get Examples.. Get host name in Java: This example is going 

Mobile Applications Questions

splash screen
splash screen  What is splash screen and how can i set splash screen in iphone??   hello, if you want to launch splash screen then add... splash screen will show launching time 

General

Java Get Example
Java Get Example      ... examples to get the things fast and practice these code at your end to learn java.... Java Get Examples.. Get host name in Java: This example 

JavaScript Questions

Screen Capture
Screen Capture  Hi deepak, I am trying to take a screen shot using java script Activex object. But Iam getting Automation server cant create object exception .how can i solve 

Java Beginners

How to clear dos screen just like cls in dos - Java Beginners
How to clear dos screen just like cls in dos  You said we have to write bat bile. so every time i have to call that file in my java program am i... are waiting for this... i searched in internet.. but i didn't get the correct 

HTML Questions

Screen flashing
Screen flashing  Hey I am trying to make my screen flash (like a white flash as if from a camera). This is my code so far: <html> <... I want is that I want the screen to flash white when a link is clicked. Thanks 

Programming Tutorials

Spark Resize effect in Flex4
Spark Resize effect in Flex4: The Resize effect changes the height, width or both dimensions. There are some attribute as: widthFrom, heightFrom, widthTo, heightTo, widthBy, heightBy and hideChildrenTargets.  You can expand 

Programming Tutorials

MX Resize Effect in Flex4
MX Resize Effect in Flex4: The Resize effect changes the height, width or both dimensions. There are some attribute as: widthFrom, heightFrom, widthTo, heightTo, widthBy, heightBy and hideChildrenTargets. You can expand and shrink 

Java-Tutorials

Java Multi Dimensions Array - Java Tutorials
.style1 { text-align: center; } Multidimensional Arrays in Java In java, the grouping of same type of elements for storing under the same name...(element); } } } Output : C:\Program Files\Java\jdk1.6.0_18\bin> 

Mobile Applications Questions

difference between touch screen and non touch screen
difference between touch screen and non touch screen  code wise ,what is a difference between touch screen and non touch screen in J2ME 

Mobile Applications Questions

difference between touch screen and non touch screen
difference between touch screen and non touch screen  what is a difference between touch screen and non touch screen in J2ME (code wise 

Java-Tutorials

Setting the Dimensions of an Item in a JList Component in Java
Setting the Dimensions of an Item in a JList Component in Java       In this section, you will learn about setting the dimensions of the List component in java 

Framework Questions

Screen Flickers - Framework
Screen Flickers  One of my screen flickers. Is that is beacuse of less memory 

Java Beginners

Caputuring screen shot
Caputuring screen shot  How to to capture screen shot for a computer on internet 

Ajax Questions

Screen Scraping - Ajax
Screen Scraping  How i can do the screen scraping using java and ajax 

Java Beginners

recorder screen in java
recorder screen in java  Dear friends, how can I capture the screen in real time? best regards Riccardo Susca 

Java Beginners

recorder screen in java
recorder screen in java  Dear friends, how can I capture the screen in real time? best regards Riccardo Susca 

Java Beginners

noise during print screen
noise during print screen  hi there, i have a java program which can print screen every 1 seconds... but during the print screen, the image seems will have some noise and ends up half page of the image will be black screen 

Mobile Applications Questions

iPhone Capturing Screen SDK
iPhone Capturing Screen SDK  Creating an application to capture the screen shots from iPhone. In objective c is there any class that make it enable..?   UIGraphicsBeginImageContext(CGSizeMake(480,320)); UIImage* result 

DMCA.com