Maximized Screen in Linux Java (GraphicsEnvironment)

How do I maximized my Frame in Linux Environment??? Since there is no GraphicsEnvironment class available... Please Help me in this problem...

Hi ,
I have checked this will not work on Linux.
i.e. the call
setMaximizedState(Frame.MAXIMIZED_BOTH);
does NOT work in Linux(RHEL 4.X).
Can you please help me how to achieve the "MaximizedScreen" during the coming up of the UI in Linux?
Thanks,
-Bhaskar.

Similar Messages

  • Screen resolution in Java

    Hi, I am trying to determine the current resolution om my monitor. I remember there was a function waaaaaay back when I programmed with Borland C++, which was getWidth, or getScreenWidth... how can I get the screen resolution in Java? Does anyone know?

    You can get the screen dimensions using the toolkit.
    Eg.
    Toolkit kit = Toolkit.getDefaultToolkit();
    Dimension screenSize = kit.getScreenSize();
    int screenHeight = screenSize.height;
    int screenWidth = screenSize.width;
    The toolkit is in java.awt package.
    Hope this helps
    Regards
    Graham Humphries

  • Black Background in Maximized Screen Mode

    I am having a recurring problem with the background going black rather than 50% gray when using Photoshop in Maximized Screen Mode.  I am currently running CS3 on Mac Pro 8-core with latest OS 10.5.8. 
    I had the same problem before on my PowerMac Dual Core. 
    On installation it operates normally with the gray background.  Trashing preferences resolves the problem but it comes back.  Might I be inadvertently hitting some keyboard command that is causing this to occur?  Other thoughts on a solution?  I have searched documentation to no avail.
    Thanks,
    Alan Karchmer

    Yes!!! This works.  Thank you.  I hope it does not continue to recur.  I would like to know what caused this in the first place.  I never use the paint bucket tool.  I often use the fill tool, though, sometimes with black as the foreground color.

  • Screen Scraping in Java

    Anybody help me on java screen scrapping.

    Svk wrote:
    I am asking the best way to screen Scrapping in java !!If you want to scrap your screen, take it to an electronics recycling.
    If you want to do screen scraping, you could provide some more detail about what you actually are trying to accomplish. Note: exclamation points aren't details.
    I'll bet what you want to do isn't even screen scraping. It's becoming increasingly rare these days.

  • Screen Savers in java

    Is anyone aware of the basic method for creating screen savers in java?
    I wrote some code that displays falling matrix code in a window, but I would like to convert the graphic window into a full screen graphic installable as a screen saver.
    Thanks...

    deAppel wrote:
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); to get your screensize.Then how would you make it full-screen, with no frame around it?

  • Screen saver in java

    I would like to make a screen saver in java. But i do not find in the appropriate documentation classes.
    Can you help me.
    My screen saver may ask a password when the user want to exit it.

    1. start thread, start timer for 2 minutes. (search forum )
    2. put flag variable in key listener, set true if pressed.
    3. after timer goes off, check flag you created for keypress, if still false, show login.

  • I would like to make a screen saver in java.

    I would like to make a screen saver in java. But i do not find in the appropriate documentation classes.
    Can you help me.
    My screen saver may ask a password when the user want to exit it.

    https://jdic.dev.java.net/documentation/incubator/screensaver/
    "The SaverBeans Screensaver SDK (Early Access) is a Java screensaver development kit, enabling developers to create cross-platform screensavers. The developer writes a set of Java classes along with an XML description of the screensaver settings, and uses the tools in this development kit to produce a screensaver for any Java-supported OS. The resulting screensavers behave just like a native screensaver (i.e. with preview capabilities and control over settings)."
    This was found as the first result of a simple google search. You should try it sometime.

  • CS3 Maximized Screen Mode - Reposition-Bug Workarounds

    In Photoshop CS3, when you use Maximized Screen Mode (image window maximized to the PS workspace) with an image window that's zoomed to a level where scroll bars exist, and you switch to another image window in the PS workspace and then switch back to the original image window (let's say using Ctrl-F6 or Ctrl-Tab) Photoshop will reposition the view to the upper left corner of the image rather than leaving it where it was.
    For me, this bug is 100% reproducible.
    This bug is also referenced in these forums at the following topics:
    http://www.adobeforums.com/webx/.3bc3bd89
    http://www.adobeforums.com/webx/.3bca160f
    http://www.adobeforums.com/webx/.3c0561ea
    I often carefully position 100% zoom-level images & alternate between windows for detailed comparison. It's extremely frustrating to toggle back only to be at a completely different location on the image window. I found this bug so maddening that I almost abandoned CS3 for an earlier version. It's still maddening, but at least I've found workarounds which I'll share with you here:
    1) after opening an image and zooming to the extent that the above bug exists (scroll-bars available), press F and then shift-F (or vice versa) to switch to a different Screen Mode and back (problem goes away *for this image only* until the Zoom level is changed significantly - at which time you must repeat the workaround.) Repeat for every image for which you'd like the position to remain stationary when alternating to other windows and back.
    2) click on Screen Mode button at the bottom of PS Toolbar and choose Maximized, (even if you were already on Maximized.) This has the same corrective effect as 1), above.
    3) On a "fixed" image, if you forget to "reset" the fix after changing the zoom level significantly & you "lose your place" after alternating between windows (jumps to upper left corner), you can "recover" the previously "fixed" position by returning to the previous zoom level and switching to another window and back. It returns to the previously "fixed" location instead of the bug-altered PS chosen location of upper left corner!
    4) Use a Screen Mode other than Maximized & this issue never occurs.
    Adobe, this *really* should be addressed and corrected. I'd think this is much more serious than the "sticky menus" bug of CS2 that was fixed.
    Reported to Adobe using their Bug Report form...

    Yes!!! This works.  Thank you.  I hope it does not continue to recur.  I would like to know what caused this in the first place.  I never use the paint bucket tool.  I often use the fill tool, though, sometimes with black as the foreground color.

  • Colour of the screen in SSHR (Java pages)

    Hi All.
    Please let me know how to change the colour of the screen in SSHR (Java pages)?
    Thanks

    You will need to create a custom cascading style sheet to do this. Pl see the App Framework Personalization Guide for 11i and 12 on how to do this.
    HTH
    Srini Chavali
    http://download.oracle.com/docs/cd/B25516_18/current/acrobat/115fwkpg.pdf

  • How Can I Take Print Screen With in java Application

    Hello Every One,
    Hope U all r fine.
    How can i take print screen with in java code,
    Please Help me out

    http://search.java.sun.com/search/java/index.jsp?qp=&nh=10&qt=%2Btitle%3A%22print+screen%22&col=javaforums

  • Linux, java.lang.Process.getOutputStream() funniness

    Hi,
    I'm using RedHat 7.1, and Sun JDK 1.3.0_02 (on Intel).
    From my Java app, I'm trying to launch another process, and redirect my
    console in/out to the slave process's in/out.
    After launching the process (using Runtime.exec), I launch three
    background threads:
    1. Monitor the slave process's getInputStream and write all incoming
    bytes to my System.out
    2. Monitor the slave process's getErrorStream and write all incoming
    bytes to my System.out
    3. Monitor my System.in and write all incoming bytes to the slave
    process's getOutputStream
    The funniness I'm experiencing is in step 3 -- it seems that I have to
    press each keystroke TWICE, for it to register into the slave process.
    For example, as a test, I am launching "lynx http://www.cnn.com", and
    the lynx options "H" and "O" I have to press twice (H-H or O-O) to get
    the appropriate screen to pop up. In fact, the first keystroke I enter
    doesn't matter; it's as if every other keystroke is looked at.
    Here is my code for thread #3:
    // -------- Begin code fragment
    // Start an input thread
    Thread inThread = new Thread() {
       public void run() {
          OutputStream out = slaveProcess.getOutputStream();
          byte[] buffer = new byte[1024];
          int len;
          while (true) {
             try {
                len = System.in.read(buffer);
                if (len == -1) break;
                //System.out.println("Bytes read from keyboard: " + len);
                out.write(buffer, 0, len);
                out.flush();
             } catch (Exception e) {
                break;
          System.out.println("inThread exiting");
    inThread.start();
    // -------- end code fragment In reference to some older JVM bugs, I've tried inserting
    Thread.currentThread().sleep(1) at various points (in case there is a
    scheduler problem), but to no avail.
    Any help would be appreciated!
    Thank you,
    Bryan

    I would test it buy using three FileIn/OutputStreams
    instead of Syatem.in/out/err and if it worked at that
    point it would be the synchronization/blocking problem.
    Because I have used Process.getInputStream on linux on
    several occasions and never anything like you are
    talking about happened.

  • Why do I get Flicker on screen with Linux Standalone Flash Player ?

    Hello,
    I have a problem with the standalone Linux Flash player. The thing is that when I have a video playing in background and over it I make some tweens, it flickers all the time and it is an annoying flicker. It happens only on Linux Flash Player (it works on Windows Flash Player). The flicker appears when I have a video on background, only when the tween is made and on the portion of the screen where the tween is made. I have Ubuntu 9.04 installed and the latest version of standalone Flash Player (from 2/24/09). I've tried this on several LCD and on all it does the same. My video card has the Intel G31 Express Chipset (the drivers for the video card are the one from Ubuntu). I have generated the swf file from Flash CS3. Any help would be appreciated. Thanks in advance.

    See http://kb.mozillazine.org/Error_loading_websites

  • Upgrading Linux java 1.4.2 AMD 64 bit edition with Daylight Saving Time

    I am running 64 bit version of Java 1.4.2 It is the linux blackdown version because at the time Sun did not support a 64 bit version. Now I would like to upgrade java to fix the possible problems with the Daylight Savings Time change.
    I have tried the tzupdater tool released by Sun but it did not work on my 64 bit machine, stating it could not find any tzone data to update.
    Next I looked into updating the JRE itself but it appears that Sun still does not offer a AMD 64 bit version for 1.4.2 linux. They only seem to have support for 64 bit in Java 5 and 6.
    Any ideas as to my best migration path? Should I consider taking the plunge and upgrading straight to Java 6 - although this will require updating Tomcat also and possibly breaking many of the 3rd party jar files we have in use.
    Message was edited by:
    Hatton

    My OS configuration is identical to your (save for the graphics card) and I do not experience these issues at all. I run pop-up blockers, firewalls, etc., etc., myself, and even mess around extensively with my browser settings (for debugging my own development), and have only EVER experienced an apparent lock-up under one condition:
    If an applet is signed, and pops up and dialog, OR if there is any other condition under which the PLUGIN displays a dialog box, and during this time your browser is no longer in focus, when you reactive the browser window, the dialog box does not appear in the front. What I'm saying is that there might be an active MODAL DIALOG box, but which is not being seen. These dialog boxes do not appear on the taskbar under windows (just like the calendar doesn't) but you can active it by using the Alt+Tab function of Windows. When I've experienced support calls regarding this sort of problem, I get the user to check Alt+Tab to check if there is a hidden dialog box (which is most often the case, since we used signed applets).
    I'm also a little confused by your reference to http://www.giga-byte.com - this site doesn't even load an applet when I open it.

  • Need to communicate c server on linux & java client on windows

    Hi!! I am new to socket programing in both C and Java.
    From let I downloaded some client server example for c and java and tried that to link !! (I allways learn this way , and I need to do that little urget )
    though cient server in linux is working perfectly fine and same for java. But problem is when I tried to communicate C server on linux and java client on windows, I end up with getting some junk characters. Though they are connected successfully.
    Here goes code for java client:
    package whatever;
    import java.io.*;
    import java.net.*;
    public class Requester{
         Socket requestSocket;
         ObjectOutputStream out;
         ObjectInputStream in;
         String message;
         Requester(){}
         void run()
              try{
                   //1. creating a socket to connect to the server
                   requestSocket = new Socket("192.168.72.128", 2006);
                   System.out.println("Connected to localhost in port 2004");
                   //2. get Input and Output streams
                   out = new ObjectOutputStream(requestSocket.getOutputStream());
                   out.flush();
                   in = new ObjectInputStream(requestSocket.getInputStream());
                   System.out.println("above do");
                   //3: Communicating with the server
                   do{
                        try{
                             System.out.println("in do");
                             //message = (String)in.readObject();
                             System.out.println("in try");
                             //System.out.println("server>" + message);
                             System.out.println("server>" + "message");
                             sendMessage("Hi my server");
                             message = "bye";
                             sendMessage(message);
                             System.out.println("try completed");
                        catch(Exception e){
                             e.printStackTrace();
                   }while(!message.equals("bye"));
              catch(UnknownHostException unknownHost){
                   System.err.println("You are trying to connect to an unknown host!");
              catch(IOException ioException){
                   ioException.printStackTrace();
              finally{
                   //4: Closing connection
                   try{
                        in.close();
                        out.close();
                        requestSocket.close();
                   catch(IOException ioException){
                        ioException.printStackTrace();
         void sendMessage(String msg)
              try{
                   String stringToConvert= "hello world";
                   byte[] theByteArray = stringToConvert.getBytes();
                      System.out.println(theByteArray.length);
                   out.writeObject(theByteArray);
                   out.flush();
                   System.out.println("client>" + msg);
              catch(IOException ioException){
                   ioException.printStackTrace();
              catch(Exception ex){
                   ex.printStackTrace();
         public static void main(String args[])
              Requester client = new Requester();
              client.run();
    And for C server
    / server
        #include <stdio.h>
            #include <sys/socket.h>
            #include <arpa/inet.h>
            #include <stdlib.h>
            #include <string.h>
            #include <unistd.h>
            #include <netinet/in.h>
            #define MAXPENDING 5    /* Max connection requests */
            #define BUFFSIZE 32
            void Die(char *mess) { perror(mess); exit(1); }
        void HandleClient(int sock) {
                char buffer[BUFFSIZE];
                int received = -1;
                /* Receive message */
                if ((received = recv(sock, buffer, BUFFSIZE, 0)) < 0) {
                    Die("Failed to receive initial bytes from client");
                /* Send bytes and check for more incoming data in loop */
                while (received > 0) {
                /* Send back received data */
                    if (send(sock, buffer, received, 0) != received) {
                        Die("Failed to send bytes to client");
    //            fprintf("%s",buffer);
                fprintf(stdout, "message Recieved: %s\n", buffer);
                    //Die("was not able to echo socket message");               
                /* Check for more data */
                    if ((received = recv(sock, buffer, BUFFSIZE, 0)) < 0) {
                        Die("Failed to receive additional bytes from client");
                close(sock);
        //     A TCP ECHO SERVER
        int main(int argc, char *argv[]) {
                int serversock, clientsock;
                    struct sockaddr_in echoserver, echoclient;
                    if (argc != 2) {
                      fprintf(stderr, "USAGE: echoserver <port>\n");
                    exit(1);
                /* Create the TCP socket */
                    if ((serversock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) {
                      Die("Failed to create socket");
                /* Construct the server sockaddr_in structure */
                    memset(&echoserver, 0, sizeof(echoserver));      /* Clear struct */
                    echoserver.sin_family = AF_INET;                  /* Internet/IP */
                    echoserver.sin_addr.s_addr = htonl(INADDR_ANY);  /* Incoming addr */
                    echoserver.sin_port = htons(atoi(argv[1]));      /* server port */
        // A TCP ECHO SERVER ENDS
        // A TCP ECHO SERVER BINDING AND LISTNING
      /* Bind the server socket */
                  if (bind(serversock, (struct sockaddr *) &echoserver, sizeof(echoserver)) < 0) {
                        Die("Failed to bind the server socket");
              /* Listen on the server socket */
                  if (listen(serversock, MAXPENDING) < 0) {
                  Die("Failed to listen on server socket");
        // A TCP ECHO SERVER BINDING AND LISTNING
        // SOCKET FACTORY
    /* Run until cancelled */
                while (1) {
                        unsigned int clientlen = sizeof(echoclient);
                          /* Wait for client connection */
                        if ((clientsock =
                          accept(serversock, (struct sockaddr *) &echoclient, &clientlen)) < 0) {
                            Die("Failed to accept client connection");
                          fprintf(stdout, "Client connected: %s\n", inet_ntoa(echoclient.sin_addr));
                          HandleClient(clientsock);
        // SOCKET FACTORY ENDSI know that it is not C forum but I found no better place to post it
    Thanks

    kajbj wrote:
    ManMohanVyas wrote:
    hii!! just trying to make it a little more explinatory
    1) what I am trying to accomplish by the above code is: - just need to echo/print from the Server , message send by the Client. I know code is not that good but should be able to perform this basic operation( according to me ).You are wrong. I told you that it won't work as long as you are using ObjectOutputStream and ObjectInputStream. You shouldn't write objects.
    2) Message sent by the client is "hello world"(hard coded).No, it's not. You are writing a serialized byte array.
    3) what I am getting at the client end is "*message recieved: ur*" (before that It shows the Ip of client machine)
    It should print "hello world ".See above.
    You are having a problem, and I have told you what the problem is.hey I dont know what went wrong but . I posted all this just next to my first post ...before you posted !!
    And hard coded byte array includes "hello world"...may be I am not able to explain properly.

  • Linux Java server

    I'm creating a socket server in java language on Linux System, and I would like to launch it as a demon; it means that I want my server to start automatically after a reboot and to be launched in a script localised in the /etc/rc.d/init.d directory
    I've already done that with a socket server written in C language (using fork() and dup() functions to "daemonize" my server), but I don't find equivalence in Java. I've tried to use the function "SetDaemon", but my server don't become a son of the init process ...
    Is it possible or not ?
    PS: sorry for my english ...

    Java can't demonize itself the same way as C programs do. Usually a shell script does that job. It sets all required variables (classpath & co) and starts the java process in the background (using &). Look at the way Tomcat does it for some hints.

Maybe you are looking for