![]() |
|
|
|
#1 |
|
How can i clear the screen in java?
zeus |
|
|
|
|
#2 |
|
Posts: n/a
|
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' |
|
|
|
#3 |
|
Posts: n/a
|
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/ |
|
|
|
#4 |
|
Posts: n/a
|
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. |
|
|
|
#5 |
|
Posts: n/a
|
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. |
|
|
|
#6 |
|
Posts: n/a
|
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 |
|
|
|
#7 |
|
Posts: n/a
|
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)' |
|
|
|
#8 |
|
Posts: n/a
|
zeus wrote:
> How can i clear the screen in java? > If this is a console application (clear the screen), then check out this article: http://www.javaworld.com/javaworld/j...html#resources and these curses libraries: http://sourceforge.net/projects/javacurses/ http://www.pitman.co.za/projects/charva/ |
|