Get Resolution Screen in Java

I want to know what the resolution is of the people using my application. Can I maximize my window? Or can I get the users screen-resolution? In case it is a simple command, could you please give me a sample code?
Greetz and thanks in advance,
Kanarip

private void init() throws java.lang.Exception{
frmDisplay = new javax.swing.JFrame();
frmDisplay.setDefaultCloseOperation(javax.swing.JFrame.DISPOSE_ON_CLOSE);
frmDisplay.setCursor(curWait);
frmDisplay.setName("frmDisplay");
frmDisplay.setTitle("Cost Report Imaging version 2.0");
frmDisplay.setBounds(0, 0, (int)(java.awt.Toolkit.getDefaultToolkit().getScreenSize().getWidth() * fScaleFactor), java.awt.Toolkit.getDefaultToolkit().getScreenSize().height);
java.awt.Container cp = frmDisplay.getContentPane();
// cp.setLayout(null);
jtpDisplay = new javax.swing.JTabbedPane();
cp.add(jtpDisplay);
// jtpDisplay.setLayout(null);
// jtpDisplay.setSize(cp.getWidth(), cp.getHeight() - 80);
}//end init()

Similar Messages

  • Satellite L650: Is it possible to get higher resolution screen?

    L650-1CH 15.6", 1366x768.
    ATI HD5650 1GB
    Hardware enthusiast, so please don't feel expected to dumb things down for me.
    Is it possible to get a higher resolution screen than the stock one, or one with better colour / contrast?
    I've always been annoyed at how washed out the stock screen on my Toshiba looked. Recently the screen cracked, so I figure now is the best time to look at options.
    Google has given me very little information so far. I've checked up pricing on screen replacement, with the part being around 60 and the part + service averaging 120, but that most likely leaves me with the same or inferior screen quality.
    I would hope to find something more suited to movies / games and in 1600x900 if possible.
    Any pointers as to where I should begin my search?

    Hi
    > Is it possible to get a higher resolution screen than the stock one, or one with better colour / contrast?
    Yes this should be possible since the graphic card should support higher resolution.
    The notebook supports the 15.6" (HD) TFT display.
    You need definitely the same size display.
    Found some spare parts on +pchub.com+ page

  • Forum oddity, w.r.t high resolution screen.

    I started a thread on Windows/ Photoshop entitled "CS4 with a high resolution screen". People have replied to this, according to e-mail direct response. However, it is not on the list of forums, and neither does it appear on 'search'.
    To repeat: we have a high resolution HP LP 3065 screen, which supports up to 2560 x 1600 pixels. At this resolution, images are still less than print size, but CS4 is essentially unusable because the menu text and other icons do not scale. Does anyone know if it is possible to manage this silly interface to allow the user to see what they are doing? Is there even a visual disability option? Even MS Office 2000 - ten years old - allows "large icons".
    If not, I think this is another way in which CS4 is in fact worse than CS3, which (mostly) used the Windows UI and which was therefore considerably more flexible. The screen in question is supported by dual DVI connections to an Nvidia FX3700 card - a CUDA multiprocessor device optimised for 2D images and CAD - and an eight processor, 3 GHz machine. With all of this processor power, CS4 is still much slower than CS3 on a single processor laptop. The paint follows the pen by several centimetres, like early Photoshop on a pre-Pentium processor.

    I started this by saying that through an oddity of this forum software, my original thread had vanished from the list. Exactly the same thing happened to this one, which i had to find through searching the forum list. The previous one vanished completely. One appears to get a different list if one comes in via a direct URL or via support > Forums > windows: an .asp error, presumably, but Adobe please note.
    Someone asked why use a high res screen. If you work on a large image, you either operate at the pixel level - a plate on a table top if you are at 1020 x 768 and working with a 20 megapixel image - or you shrink the thing down to fit. In the latter case, each pixel that you see is, depending on the native image size, an average of a large number of adjacent pixels. In the case of a 24Meg image and the above screen size, each visible pixel is an average (or however Adobe calculate it) of a bit over 20 pixels from the native image. If you look at 2560 x 1600 you are still seeing a composite, but of a quarter fewer source pixels per point. If you look at the natve image as 'actual pixels', the 'dinner plate' is four time bigger in proportion to that of the SVGA image.
    That said, imagine the layers pallet in which one layer has, let's say, a football set against an group of players , P/shop users will expect to see a black blob representing its position in the layer. At high resolution, however, the blob is represented on the screen by a patch that is smaller than a full stop on a page of type, and essentially invisible from 150 cm from the screen. Thus: squint, lean forward, mutter angrily.
    Why can one not set the icons and the ephemeral facilities such as the layers pallet to be any size you want? It is really very silly.

  • Apple TV remote no longer working, unpairing is giving me resolution screen, lost Remote app control as well.

    I've been trying to sort this out for a while; somehow my Apple TV is no longer homesharing with the rest of my network.  I had hoped to use my apple TV remote to re-activate the Remote Apps I have on my iPod, but the remote isn't responding.  I've tried unpairing, but if I press menu-rewind for six seconds, it sends me to the resolution screen instead, and the white light flashes repeatedly - I can't get the remote to accept the resolution settings, or get the cursor to even so much as move.  Extremely frustrating as I've been unable to make this work for a week and I don't drive (I'm disabled and housebound) so just popping into a shop somewhere to get it fixed is a slim-to-none chance of possibility.
    I really hope there's a better solution!

    all apple remotes work out of the box
    borrow the remote from the neighbors kid Eric that he got with his appletv or imac or macbook or the likes it works
    or buy a new remote it works
    borrow Erics remote and use it to setup remote app on an ios device that works too

  • Creating login screens in java

    hello.
    this is james mcfadden. i am trying to create a login screen in java. the problem i have is this: i am completely new to GUI programming. i know that i have to use strings. the code shown below is incomplete and when i try to compile it i get the following errors. how do i go about fixing these errors?
    ----jGRASP exec: javac -g X:\CP4B Project\LogOn.java
    LogOn.java:11: ']' expected
    username[0]="Administrator";
    ^
    LogOn.java:11: <identifier> expected
    username[0]="Administrator";
    ^
    LogOn.java:12: ']' expected
    username[1]="Ann Smyth";
    ^
    LogOn.java:12: <identifier> expected
    username[1]="Ann Smyth";
    ^
    LogOn.java:13: ']' expected
    username[2]="John Murphy";
    ^
    LogOn.java:13: <identifier> expected
    username[2]="John Murphy";
    ^
    LogOn.java:14: ']' expected
    username[3]="James McFadden";
    ^
    LogOn.java:14: <identifier> expected
    username[3]="James McFadden";
    ^
    LogOn.java:15: ']' expected
    username[4]="Frankie Ferry";
    ^
    LogOn.java:15: <identifier> expected
    username[4]="Frankie Ferry";
    ^
    LogOn.java:16: ']' expected
    username[5]="Daniel McKimm";
    ^
    LogOn.java:16: <identifier> expected
    username[5]="Daniel McKimm";
    ^
    LogOn.java:17: ']' expected
    username[6]="Stephen Doohan";
    ^
    LogOn.java:17: <identifier> expected
    username[6]="Stephen Doohan";
    ^
    LogOn.java:18: ']' expected
    username[7]="James Ferry";
    ^
    LogOn.java:18: <identifier> expected
    username[7]="James Ferry";
    ^
    LogOn.java:19: ']' expected
    username[8]="Liam Cannon";
    ^
    LogOn.java:19: <identifier> expected
    username[8]="Liam Cannon";
    ^
    LogOn.java:20: ']' expected
    username[9]="Ciaran Ferry";
    ^
    LogOn.java:20: <identifier> expected
    username[9]="Ciaran Ferry";
    ^
    LogOn.java:21: ']' expected
    username[10]="Ciaran McGee";
    ^
    LogOn.java:21: <identifier> expected
    username[10]="Ciaran McGee";
    ^
    LogOn.java:23: ']' expected
    password[0]="0";
    ^
    LogOn.java:23: <identifier> expected
    password[0]="0";
    ^
    LogOn.java:24: ']' expected
    password[1]="1";
    ^
    LogOn.java:24: <identifier> expected
    password[1]="1";
    ^
    LogOn.java:25: ']' expected
    password[2]="2";
    ^
    LogOn.java:25: <identifier> expected
    password[2]="2";
    ^
    LogOn.java:26: ']' expected
    password[3]="3";
    ^
    LogOn.java:26: <identifier> expected
    password[3]="3";
    ^
    LogOn.java:27: ']' expected
    password[4]="4";
    ^
    LogOn.java:27: <identifier> expected
    password[4]="4";
    ^
    LogOn.java:28: ']' expected
    password[5]="5";
    ^
    LogOn.java:28: <identifier> expected
    password[5]="5";
    ^
    LogOn.java:29: ']' expected
    password[6]="6";
    ^
    LogOn.java:29: <identifier> expected
    password[6]="6";
    ^
    LogOn.java:30: ']' expected
    password[7]="7";
    ^
    LogOn.java:30: <identifier> expected
    password[7]="7";
    ^
    LogOn.java:31: ']' expected
    password[8]="8";
    ^
    LogOn.java:31: <identifier> expected
    password[8]="8";
    ^
    LogOn.java:32: ']' expected
    password[9]="9";
    ^
    LogOn.java:32: <identifier> expected
    password[9]="9";
    ^
    LogOn.java:33: ']' expected
    password[10]="10";
    ^
    LogOn.java:33: <identifier> expected
    password[10]="10";
    ^
    LogOn.java:57: <identifier> expected
         button1.addActionListener(new ActionListener(){
    ^
    LogOn.java:72: ';' expected
    ^
    46 errors
    ----jGRASP wedge2: exit code for process is 1.
    ----jGRASP: operation complete.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class LogOn extends JPanel{
         private static JTextField username=null;
         private static JPasswordField password=null;
         private static JButton button1=null;
       private static JButton button2=null;
         String[] username=new String[11];
       username[0]="Administrator";
       username[1]="Ann Smyth";
       username[2]="John Murphy";
       username[3]="James McFadden";
       username[4]="Frankie Ferry";
       username[5]="Daniel McKimm";
       username[6]="Stephen Doohan";
       username[7]="James Ferry";
       username[8]="Liam Cannon";
       username[9]="Ciaran Ferry";
       username[10]="Ciaran McGee";
       String[] password=new String[11];
       password[0]="0";
       password[1]="1";
       password[2]="2";
       password[3]="3";
       password[4]="4";
       password[5]="5";
       password[6]="6";
       password[7]="7";
       password[8]="8";
       password[9]="9";
       password[10]="10";
       public LogOn(){
              setSize(260,160);
              username=new JTextField(15);
            password=new JPasswordField(15);
              JLabel usernameLabel=new JLabel("Username: ");
              JLabel passwordLabel=new JLabel("Password: ");
              add(usernameLabel);
              add(username);
              add(passwordLabel);
              add(password);
              setVisible(true);
              button1=new JButton("Ok");
              add(button1);
            button2=new JButton("Cancel");
              add(button2);
              JFrame frame=new JFrame("Welcome to Home Entertainment");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.add(this);
            frame.pack();
            frame.setVisible(true);
         button1.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent e){
                 try{
                        Demo d = new Demo();
                        d.getChoice();
                   catch(Exception ex){}
         button2.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent e){
                 System.exit(0);
    }

    1. You initialize your array before your constructor.
    2. You have the same names for your arrays as for your TextFields
    3. You did not close your anon Listeners.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class MyLogOnScreen extends JPanel{
         private static JTextField username=null;
         private static JPasswordField password=null;
         private static JButton button1=null;
        private static JButton button2=null;
         String[] usernameArray=new String[11];
        String[] passwordArray=new String[11];
       public MyLogOnScreen(){
            usernameArray[0]="Administrator";
            usernameArray[1]="Ann Smyth";
            usernameArray[2]="John Murphy";
            usernameArray[3]="James McFadden";
            usernameArray[4]="Frankie Ferry";
            usernameArray[5]="Daniel McKimm";
            usernameArray[6]="Stephen Doohan";
            usernameArray[7]="James Ferry";
            usernameArray[8]="Liam Cannon";
            usernameArray[9]="Ciaran Ferry";
            usernameArray[10]="Ciaran McGee";
            passwordArray[0]="0";
            passwordArray[1]="1";
            passwordArray[2]="2";
            passwordArray[3]="3";
            passwordArray[4]="4";
            passwordArray[5]="5";
            passwordArray[6]="6";
            passwordArray[7]="7";
            passwordArray[8]="8";
            passwordArray[9]="9";
            passwordArray[10]="10";
              setSize(260,160);
              username=new JTextField(15);
            password=new JPasswordField(15);
              JLabel usernameLabel=new JLabel("Username: ");
              JLabel passwordLabel=new JLabel("Password: ");
              add(usernameLabel);
              add(username);
              add(passwordLabel);
              add(password);
              setVisible(true);
              button1=new JButton("Ok");
              add(button1);
            button2=new JButton("Cancel");
              add(button2);
              JFrame frame=new JFrame("Welcome to Home Entertainment");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.add(this);
            frame.pack();
            frame.setVisible(true);
         button1.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent e){
                 try{
                        Demo d = new Demo();
                        d.getChoice();
                   catch(Exception ex){}
         button2.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent e){
                 System.exit(0);
    }

  • 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 pringing

    Mac'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

  • How can I open raw images in Camera RAW on a small / low resolution screen?

    When traveling, I use Photoshop Elements 8 on a small netbook.  RAW files open directly in Elements editor, bypassing the Camera RAW utility.  Is this because of the size and resolution of my computer (1024 x 600 max)?  Is there a way to use the RAW editor on this netbook (aside from connecting it to a larger monitor)?

    Yes, that's why and  no, sorry, there isn't a workaround unless you can get your screen res higher, which you probably can't. The window won't open because it can't fit.

  • Will I get full screen view using my Samsung LED TV (UE46D5500

    will I get full screen view using my Samsung LED TV (UE46D5500)

    Ah, Ok...
    Video Card:
    HD Graphics 4000
    VRAM Type:
    Integrated
    Details:
    This model has an Intel HD Graphics 4000 graphics processor that shares memory with the system. Also see: What type of video system is provided by the Aluminum Mac mini models? Which are integrated and which are dedicated? Can the video be upgraded?
    Standard VRAM:
    512 MB*
    Maximum VRAM:
    768 MB*
    Details:
    *With 4 GB of RAM installed, this model uses 512 MB of RAM for graphics. With additional RAM installed, more RAM is reserved for graphics use.
    Display Support:
    Dual Displays
    Resolution Support:
    1920x1200*
    Details:
    *This model simultaneously supports 1920x1200 on an HDMI display or a DVI display using the included HDMI-to-DVI adapter and 2560x1600 on a Thunderbolt or Mini DisplayPort display or even a VGA display (with an optional Mini DisplayPort-to-VGA adapter, which is compatible with the Thunderbolt port).
    2nd Display Support:
    Dual/Mirroring*
    2nd Max. Resolution:
    2560x1600*
    Details:
    *This model simultaneously supports 1920x1200 on an HDMI or a DVI display (using the included HDMI-to-DVI adapter) and 2560x1600 on a Thunderbolt or Mini DisplayPort display or even a VGA display (with an optional Mini DisplayPort-to-VGA adapter, which is compatible with the Thunderbolt port).
    http://www.everymac.com/systems/apple/mac_mini/specs/mac-mini-core-i7-2.3-late-2 012-specs.html

  • Satellite A300-1LT PSAGCE - Cant get resolution higher than 1280x800 on external monitor

    I have toshiba Satellite A300-1LT PSAGCE, and I connected additional profeccional monitor LP3065, but I cant get resolution higher than 1280x800, and this only works over HDMI, via VGA output i get only black screen.
    Any suggestions?

    Hi
    As far as I know the internal LCD supports this resolution:
    800x600 16bit/32bit(Clean stretch)
    1024x768 16bit/32bit(Clean stretch)
    1280x800(W) 16bit/32bit
    For _external_ monitor these resolutions are supported:
    800x600 16bit/32bit colors(Depending on CRT)
    1024x768 16bit/32bit colors(Depending on CRT)
    1280x1024 16bit/32bit colors(Depending on CRT)
    1440x900(W) 16bit/32bit colors(Depending on CRT)
    1600x1200 16bit/32bit colors(Depending on CRT)
    1680x1050 16bit/32bit colors(Depending on CRT)
    1920x1200(W) 16bit/32bit colors(Depending on CRT)
    1920x1440 16bit/32bit colors(Depending on CRT)
    2048x1536 16bit/32bit colors(Depending on CRT)
    Note: the vertical refresh rate is also limited to the each resolution:
    800x600 85Hz (Depending on CRT)
    1024x768 85Hz (Depending on CRT)
    1280x1024 85Hz (Depending on CRT)
    1440x900(W) 60Hz (Depending on CRT)
    1600x1200 85Hz (Depending on CRT)
    1680x1050 60Hz (Depending on CRT)
    1920x1200(W) 60Hz (Depending on CRT)
    1920x1440 75Hz(Depending on CRT)
    2048x1536 60Hz(Depending on CRT)

  • How to connect iseries green screen from java program

    how to connect iseries green screen from java program to get the data in the DB files ,here the DB is DB2/400

    Just some Friday fun. Use the telnet program that comes with Windows and supports VT escape sequences.
    import java.io.*;
    import java.net.*;
    public class AutoTelnet {
         private static Socket s;
         public static void main(String[] args) throws Exception {
              Thread t = new Thread() {
                   @Override public void run() {
                        try {
                             s = new ServerSocket(5555).accept();
                        } catch (IOException ex) {
                             ex.printStackTrace();
              t.start();
              Process p = new ProcessBuilder("cmd", "/C", "start", "telnet", "127.0.0.1", "5555").redirectErrorStream(true).start();
              t.join();
              PrintStream ps = new PrintStream(s.getOutputStream());
              ps.println("Screen will be cleared in 5 seconds");
              ps.println("5");
              Thread.sleep(1000);
              ps.println("4");
              Thread.sleep(1000);
              ps.println("3");
              Thread.sleep(1000);
              ps.println("2");
              Thread.sleep(1000);
              ps.println("1");
              Thread.sleep(1000);
              ps.println("\u001b[2J");
              Thread.sleep(5000);
    }

  • How to make a high resolution screen capture?

    Hye,
    I'm trying to make high resolution screen captures in Maverics.
    On earlier systems, one could use Quartz Debug which had a slider that could alter resolution of the capture app.
    Now on Mavericks this option is gone, it only allows Retina-like screen resolution for non-retina macs, but on my 27" imac, images look really blurry...
    So any way to get the job done?

    Hye,
    I'm trying to make high resolution screen captures in Maverics.
    On earlier systems, one could use Quartz Debug which had a slider that could alter resolution of the capture app.
    Now on Mavericks this option is gone, it only allows Retina-like screen resolution for non-retina macs, but on my 27" imac, images look really blurry...
    So any way to get the job done?

  • How to get absolute screen position for component in borderlayout?

    I am trying to get the screen location for a point in a component in a panel. The panel has a borderlayout(). The component is currently in the CENTER position of the layout. When I use the getBounds() method for this component I can get the <x,y> coordinates relative to the client area of the panel. But that does not include the frame. I
    Does anyone know how I can do this?

    There is a convertPointToScreen method in SwingUtilities:
    http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/SwingUtilities.html

  • Getting Blank Screen

    Hi Experts,
    We has a custom java application which was deployed on Weblogic 8 in 2 JVM Cluster. Recently we have upgraded the Weblogic to version 10MP3. But sometime users are getting blank screens and once they hit F5 the screen comes back. Users are using IE7 and IE8. We are not able to test on any other browser as that is not certified within the orgnization. Any help will be greatly appreciated.
    Issue is intermittent so very hard to troubleshoot/reproduce.
    Regards
    Shashi

    You can check the logging, to see if there are any messages related to the issue.
    Maybe this discussion can help (http://social.msdn.microsoft.com/forums/en-US/iewebdevelopment/thread/48e60100-1a28-44ca-b382-774b1b7fb65d)

  • Black screen on java

    when i try to enter some irc channels which are using java, i get black screen instead the chat screen. it's not like the script doesn't work at all, but all i can see is some of the words. it works perfect on my desktop pc, but not on my macbook pro. my java is up to date. what should i do?

    Performing a plug-in check and updating to the latest version of Adobe Shockwave should fix the problem.

  • I have purchased a movie and it has downloaded.   Next, I get a screen the says Terms and Conditions. It says to click Agree but I. Can not find Agree anywhere in the document.  how do I move forward and access the movie?

    I have purchased a movie and downloaded it. Next I get a screen that says Terms and Conditions and tells me to read and click on Agree. I cannot find the Agree anywhere in the document.  How do I move on and view the movie?

    Go to Settings>General>Usage. How much space does it show you have?
    If you connect your phone to your computer, what does iTunes say is on your phone? Do you see a large amount of "Other"? If so, you may have a corrupted database. You'll need to sync your phone then restore it as NEW (not from back up) then re-sync your data).

Maybe you are looking for

  • Print quality terrible, may not be the printer - how can I fix it?

    I've been cleaning and replacing cartridges in my printer lots but no improvement of print quality, in fact a deteriation so that now only magenta and a tiny bit of black print. I just used someone else's printer and same problem (different colour er

  • How to transfer data off HD of old iMac running OS 10.5.8 onto new iMac running yosemite

    my older brother's 24" iMac  running Leopard 10.5.8  is having issues and shuts itself off without notice so we got him a new 27" iMac off the apple website.  We also bought the Apple Extended warranty due to his & my computer skills are limited plus

  • Transferring DAQ acquisition data via TCP/IP

    Hi all. I am trying to write a program which shares the raw data acquired from a DAQ acquisition device to several computers at the same time. I am using a NI-USB DAQ 6251 to acquire 2 channels of data at 200kS/s on each channel. I need to send this

  • Default stock type QI stock in Purchase order

    Dear Experts        I want set default stock type as Quality inspection stock for QM related materials, while doing MIGO against purchase order.. Means whenever MIGO carried out system should display QI stock   for QM related materials. (Please note

  • ITunes cannot recognize iPod Touch

    When I updated my Snow Lepord to Lion my iTunes cannot recognize my iPod Touch anymore. Is there anything I can do?