Clear Screen???

Discussion in 'Java' started by zeus, Sep 12, 2005.

  1. zeus

    zeus Guest

    How can i clear the screen in java?
     
    zeus, Sep 12, 2005
    #1
    1. Advertising

  2. On 11 Sep 2005 19:29:04 -0700, zeus wrote:

    > How can i clear the screen in java?


    Java is better suited to working within the current
    screen environment, rather than clearing it.

    What do you intend to happen to the 'task bar' and
    other opened programs when this action happens?

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    "Seen you on Aldebaran, safe on the green desert sand"
    The Rolling Stones '2000 Light Years From Home'
     
    Andrew Thompson, Sep 12, 2005
    #2
    1. Advertising

  3. Andrew Thompson wrote:
    > On 11 Sep 2005 19:29:04 -0700, zeus wrote:
    >
    >
    >>How can i clear the screen in java?

    >
    >
    > Java is better suited to working within the current
    > screen environment, rather than clearing it.
    >
    > What do you intend to happen to the 'task bar' and
    > other opened programs when this action happens?


    i wanted it turn black

    import java.awt.*;

    class ClearScreen {
    public static void main(String[] args) {
    try {
    for (
    GraphicsDevice device :
    GraphicsEnvironment
    .getLocalGraphicsEnvironment()
    .getScreenDevices()
    ) {
    if (device.isFullScreenSupported()) {
    Window window = new Window(null);
    window.setBackground(Color.BLACK);
    device.setFullScreenWindow(window);
    }
    }
    Thread.sleep(10000);
    } catch (java.lang.InterruptedException exc) {
    // Ignore.
    } finally {
    System.exit(0);
    }
    }
    }


    --
    Unemployed English Java programmer
    http://jroller.com/page/tackline/
     
    Thomas Hawtin, Sep 12, 2005
    #3
  4. zeus

    Roedy Green Guest

    On 11 Sep 2005 19:29:04 -0700, "zeus" <> wrote or
    quoted :

    >How can i clear the screen in java?

    to clear the console log see http://mindprod.com/jgloss/console.html

    It is not your real estate. At best you can close frames to reveal
    what was under them.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
     
    Roedy Green, Sep 12, 2005
    #4
  5. zeus

    Roedy Green Guest

    On Mon, 12 Sep 2005 04:14:36 +0100, Thomas Hawtin
    <> wrote or quoted :

    >i wanted it turn black


    IF you want the screensaver hook to temporarily draw something else,
    then later restore the original screen, you would do that in C/C++ and
    link to it via JNI.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
     
    Roedy Green, Sep 12, 2005
    #5
  6. zeus

    Steve Sobol Guest

    Roedy Green wrote:
    > On Mon, 12 Sep 2005 04:14:36 +0100, Thomas Hawtin
    > <> wrote or quoted :
    >
    >
    >>i wanted it turn black

    >
    >
    > IF you want the screensaver hook to temporarily draw something else,
    > then later restore the original screen, you would do that in C/C++ and
    > link to it via JNI.


    Google for saverbeans - I believe it's part of the Java Desktop Integration
    Components project. It allows you to write native screensavers in Java. That
    approach will work much better...

    Of course, I'm assuming that the OP wants to create a screensaver, which
    wasn't clear from the original post.

    --
    Steve Sobol, Professional Geek 888-480-4638 PGP: 0xE3AE35ED
    Company website: http://JustThe.net/
    Personal blog, resume, portfolio: http://SteveSobol.com/
    E: Snail: 22674 Motnocab Road, Apple Valley, CA 92307
     
    Steve Sobol, Sep 12, 2005
    #6
  7. On Sun, 11 Sep 2005 20:58:42 -0700, Steve Sobol wrote:

    > Google for saverbeans -


    <https://screensavers.dev.java.net/>

    E.G.s
    <http://www.javasaver.com/testjs/xsl/03/starzoom.xml>
    <http://www.javasaver.com/testjs/xsl/03/globespinner.xml>
    <http://www.javasaver.com/testjs/xsl/03/firesaver.xml>

    >...I believe it's part of the Java Desktop Integration
    > Components project.


    As I understand, it might *become* part of that, but as an
    incubator project, it is not yet part of it.

    Further, it supports Win and Unix, but not Mac.,
    and cannot become part of the integration components
    until/unless it does support Mac.

    >..It allows you to write native screensavers in Java.


    It actually just provides the 'native hooks' into the
    OS' own screensaver system. The code you write for the
    savers can still be plain ole' Java.

    [ And I am not sure if what I said was functionally
    different from what you wrote. ]

    >..That
    > approach will work much better...
    >
    > Of course, I'm assuming that the OP wants to create a screensaver, which
    > wasn't clear from the original post.


    Same here. (not clear what OP wants)

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    "My legs are aching, my eyes are sore. I haven't washed my jeans in 3
    months or more.."
    Magic Dirt 'Dirty Jeans (Single Version)'
     
    Andrew Thompson, Sep 12, 2005
    #7
  8. zeus

    Guest

    , Sep 13, 2005
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tshad

    Clear all fields on a screen

    tshad, May 19, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    2,313
    tshad
    May 20, 2005
  2. Boki
    Replies:
    5
    Views:
    11,746
    Darryl Pierce
    Apr 16, 2005
  3. owl
    Replies:
    2
    Views:
    908
  4. David

    Response.Clear() doesn't clear

    David, Jan 31, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    1,119
    Mark Fitzpatrick
    Jan 31, 2008
  5. InvalidLastName

    Unrecognized element 'add' after <clear></clear>

    InvalidLastName, Feb 26, 2007, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    1,070
    Steven Cheng[MSFT]
    Mar 6, 2007
Loading...

Share This Page