change wallpaper in j2me

A

acannell

I'm wondering if there is a way to change the wallpaper from a java
program, and/or refresh the wallpaper somehow, or maybe overwrite the
wallpaper .gif or .jpg through the filesystem in order to modify the
wallpaper?
 
L

Luc The Perverse

I'm wondering if there is a way to change the wallpaper from a java
program, and/or refresh the wallpaper somehow, or maybe overwrite the
wallpaper .gif or .jpg through the filesystem in order to modify the
wallpaper?

Keep in mind that there is not going to be any native Java functions for
setting wallpaper since this is system specific.

All of the following is assuming you are referring to a Win32 OS:

If this is a personal project, you could just make it replace your wallpaper
file - but this would not instantly update your screen (it would need to
reboot - and sometimes Windows cache's the image somehow, making file
replacement unpredictable even across boots!)

Google searches quickly turned up Visual Basic and C++ examples.

If I were you I would create a small DLL file with a function for setting
the wallpaper from the examples of the C++ code found on the web, and then
use JNI to integrate it with Java.
 
R

Rhino

Luc The Perverse said:
Keep in mind that there is not going to be any native Java functions for
setting wallpaper since this is system specific.

All of the following is assuming you are referring to a Win32 OS:

If this is a personal project, you could just make it replace your
wallpaper file - but this would not instantly update your screen (it would
need to reboot - and sometimes Windows cache's the image somehow, making
file replacement unpredictable even across boots!)

Google searches quickly turned up Visual Basic and C++ examples.

If I were you I would create a small DLL file with a function for setting
the wallpaper from the examples of the C++ code found on the web, and then
use JNI to integrate it with Java.
Uhh, J2ME is the version of Java that runs on PDAs, like the Palms and the
other devices running the PDA version of Windows....

Rhino
 
L

Luc The Perverse

Rhino said:
Uhh, J2ME is the version of Java that runs on PDAs, like the Palms and the
other devices running the PDA version of Windows....

Ah yes - the old "hiding part of the question in the subject line trick" :)

I have no experience in this matter :(
 
A

acannell

Yes sorry about that, its for a J2ME devices, specifically a cell
phone. Basically I'm trying to write a j2me program that can run in the
background but update the screen with information without interfering
with normal cell phone operation. The phone I have cant do this
directly, but I thought if I modify the wallpaper, which is user
selectable, I could indirectly update the display while the phone is
still in "phone mode" and not "java mode".

And yes java programs can run in the background. So I was thinking I
could somehow write to the wallpaper .gif file via the filesystem and
then somehow update the wallpaper, or maybe the wall paper updates
itself every time the phone flip is opened or something, and that would
be perfect.

Asa

Andrew said:
Luc The Perverse wrote:

[snip..]
Ah yes - the old "hiding part of the question in the subject line trick" :)

In case the OP has not already got it.

It is a good idea to repeat the subject line of your
post, probably in the first sentence of the body.

A post like this ..
<http://groups.google.com/group/comp.lang.java.programmer/msg/620dda1c935cb2b0>
..gets everybody on the 'same page', so to speak.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,831
Latest member
HealthSmartketoReviews

Latest Threads

Top