The Artima Developer Community
Sponsored Link

Java Answers Forum
Question abt java and windows

10 replies on 1 page. Most recent reply: Aug 8, 2003 7:14 AM by shon

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 10 replies on 1 page
shon

Posts: 42
Nickname: shon
Registered: Apr, 2003

Question abt java and windows Posted: Aug 5, 2003 7:46 AM
Reply to this message Reply
Advertisement
how to used java code to adjust brightness of the windows .. i mean graphic setting of the OS ..
Thanks


Charles Bell

Posts: 519
Nickname: charles
Registered: Feb, 2002

Re: Question abt java and windows Posted: Aug 5, 2003 10:19 AM
Reply to this message Reply
If you know the system specific command, you can invoke it through java with the Runtime class.

Runtime runtime = Runtime.getRuntime();
Process process = runtime.exec("command");


Example use of using Runtime is at:
http://www.quantumhyperspace.com/SourceBank/viewCode.jsp?javaFile=RuntimeDemo.java

shon

Posts: 42
Nickname: shon
Registered: Apr, 2003

Re: Question abt java and windows Posted: Aug 6, 2003 12:43 AM
Reply to this message Reply
Thank you for your help

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Question abt java and windows Posted: Aug 6, 2003 9:56 AM
Reply to this message Reply
What version of Windows?

Executing "Control %windir%\\system32\\desk.cpl" (%windir% being the environment variable that tells you where windows is installed) on a recent version of windows, that should pop up the display settings control panel.

shon

Posts: 42
Nickname: shon
Registered: Apr, 2003

Re: Question abt java and windows Posted: Aug 6, 2003 7:38 PM
Reply to this message Reply
i am using windows xp .... wat is the % represent ?
Thanks for ur help

shon

Posts: 42
Nickname: shon
Registered: Apr, 2003

Re: Question abt java and windows Posted: Aug 6, 2003 7:40 PM
Reply to this message Reply
I just want to ask whether can straightly changing the gamma setting or display setting of the windows? no need to call up the display panel

Thanks for answering

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Question abt java and windows Posted: Aug 7, 2003 11:04 AM
Reply to this message Reply
> I just want to ask whether can straightly changing the
> gamma setting or display setting of the windows? no need
> to call up the display panel

Essentially, the answer is no if you are not already a Windows expert. Messing with video and monitor settings is a very complicated and tricky thing and would all need to be done in C/C++ via JNI. See this post: http://www.artima.com/forums/flat.jsp?forum=1&thread=9405

shon

Posts: 42
Nickname: shon
Registered: Apr, 2003

Re: Question abt java and windows Posted: Aug 7, 2003 11:49 PM
Reply to this message Reply
Thank YOu for your help

shon

Posts: 42
Nickname: shon
Registered: Apr, 2003

Re: Question abt java and windows Posted: Aug 8, 2003 12:03 AM
Reply to this message Reply
I still want to get into the display setting programatically, this is to make my app to be more itelligent and user friendly, i would appretiate that you tell me the way to do it.
Thanks for your help

David

Posts: 150
Nickname: archangel
Registered: Jul, 2003

Re: Question abt java and windows Posted: Aug 8, 2003 4:18 AM
Reply to this message Reply
I really think this is much more hassle than it's worth and I can't think of any app that I've installed that does these things for me. They usually say - should run at 1024x768 etc. If you start trying to set it programmatically, you're really opening a can of worms (video, driver and monitor capability, support, compatibility etc).

shon

Posts: 42
Nickname: shon
Registered: Apr, 2003

Re: Question abt java and windows Posted: Aug 8, 2003 7:14 AM
Reply to this message Reply
hrmm ... is not that i want to get into the hassle situation ... but i just want to set up a AI that can do this things, so i juz want to ask" is there any way ?"
Thanks

Flat View: This topic has 10 replies on 1 page
Topic: Timer problem Previous Topic   Next Topic Topic: Forms

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use