change wallpaper in j2me

Discussion in 'Java' started by acannell@wwc.com, Dec 17, 2005.

  1. Guest

    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?
    , Dec 17, 2005
    #1
    1. Advertising

  2. <> wrote in message
    news:...
    > 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.

    --
    LTP

    :)
    Luc The Perverse, Dec 17, 2005
    #2
    1. Advertising

  3. Rhino Guest

    "Luc The Perverse" <> wrote in message
    news:43a38e48$0$7739$...
    > <> wrote in message
    > news:...
    >> 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.
    >

    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
    Rhino, Dec 17, 2005
    #3
  4. "Rhino" <> wrote in message
    news:lwMof.5836$...
    >
    > "Luc The Perverse" <> wrote in message
    > news:43a38e48$0$7739$...
    >> <> wrote in message
    >> news:...
    >>> 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.
    >>

    > 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 :(

    --
    LTP

    :)
    Luc The Perverse, Dec 17, 2005
    #4
  5. 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.

    --
    Andrew Thompson
    physci, javasaver, 1point1c, lensescapes - athompson.info/andrew
    Andrew Thompson, Dec 17, 2005
    #5
  6. Guest

    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 Thompson wrote:
    > 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.
    >
    > --
    > Andrew Thompson
    > physci, javasaver, 1point1c, lensescapes - athompson.info/andrew
    , Dec 17, 2005
    #6
    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. Nikos 'paranic' Parastatidis

    Change Wallpaper Application

    Nikos 'paranic' Parastatidis, Jun 11, 2004, in forum: C++
    Replies:
    3
    Views:
    4,902
    John Carson
    Jun 13, 2004
  2. Terrance N. Phillip

    System Independent Wallpaper Changer

    Terrance N. Phillip, Jul 6, 2005, in forum: Python
    Replies:
    4
    Views:
    472
    Terrance N. Phillip
    Jul 6, 2005
  3. Stewart Berman

    Change Wallpaper In Linux Using Java

    Stewart Berman, Jun 3, 2008, in forum: Java
    Replies:
    0
    Views:
    582
    Stewart Berman
    Jun 3, 2008
  4. Stewart Berman

    Change Wallpaper In Linux Using Java

    Stewart Berman, Jun 3, 2008, in forum: Java
    Replies:
    14
    Views:
    790
    Arne Vajhøj
    Jun 19, 2008
  5. Andrew Valkenburg

    wallpaper

    Andrew Valkenburg, Jan 11, 2004, in forum: Javascript
    Replies:
    2
    Views:
    83
Loading...

Share This Page