In Java How do you program a graphic or jpeg into an applet

ok heres my problem. I have an applet with options. What I want to do is when you click an option a graphic shows up on the bottom half of the applet.


Comments

  • : ok heres my problem. I have an applet with options. What I want to do is when you click an option a graphic shows up on the bottom half of the applet.
    :
    :
    :

    http://java.sun.com/docs/books/tutorial/uiswing/components/applet.html#images

    [italic][blue]Just my 2 bits[/blue][/italic]

  • : : ok heres my problem. I have an applet with options. What I want to do is when you click an option a graphic shows up on the bottom half of the applet.
    : :
    : :
    : :
    :
    : http://java.sun.com/docs/books/tutorial/uiswing/components/applet.html#images
    :
    : [italic][blue]Just my 2 bits[/blue][/italic]
    :
    :
    This does not really help much
    I Want it to show a pic for the choice that I chose
  • : : : ok heres my problem. I have an applet with options. What I want to do is when you click an option a graphic shows up on the bottom half of the applet.
    : : :
    : : :
    : : :
    : :
    : : http://java.sun.com/docs/books/tutorial/uiswing/components/applet.html#images
    : :
    : : [italic][blue]Just my 2 bits[/blue][/italic]
    : :
    : :
    : This does not really help much
    : I Want it to show a pic for the choice that I chose
    :

    That will take a little independant thinking about the logic of that. The link showed how to add a graphic, it shouldn't be too hard to extend that to what you need, even with the restrictions of an applet.

    1. The program will need to know what pictures are available and where. The should be on the client machine or it will be an annoyance to change it.

    2. There needs to be some sort of graphical element that the user can use to choose which one.

    3. repaint();

    If all you want is code for it, Google for it. If you want to do it yourself, it should not be all that difficult once you get one picture to show up.
    [italic][blue]Just my 2 bits[/blue][/italic]

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories