Results 1 to 4 of 4

Thread: Question

  1. #1
    kenrocks is offline Member
    Join Date
    Dec 2008
    Posts
    2
    Rep Power
    0

    Default Question

    Is there a certain method that allows one to remove an image from a JFrame? pls.answer thx :)

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  3. #3
    kenrocks is offline Member
    Join Date
    Dec 2008
    Posts
    2
    Rep Power
    0

    Default

    The image are created on a timer and which variables are stored on a vector which make it continuously duplicating..is there a method i can use to delete a picture if it reaches a certain maximum limit?

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    I think you are using Swing timer. In that case it's possible, working on with drawImage() method in Graphic class.

    Add all images into an array, actually image names. Then read all images into an Image[] array using read() method of ImageIO class. Get the panel on the frame and repaint it with each image.

Similar Threads

  1. Question mark colon operator question
    By orchid in forum Advanced Java
    Replies: 9
    Last Post: 12-19-2010, 08:49 AM
  2. ur help on my question
    By jameela in forum New To Java
    Replies: 4
    Last Post: 10-13-2008, 12:38 PM
  3. JSP Question
    By maheshkumarjava in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 03-29-2008, 10:51 AM
  4. a question
    By slytheman in forum Java Servlet
    Replies: 0
    Last Post: 03-12-2008, 04:11 AM
  5. question about rmi
    By leonard in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 04:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •