Results 1 to 2 of 2
  1. #1
    cecily is offline Member
    Join Date
    Jul 2007
    Posts
    33
    Rep Power
    0

    Default how to remove an image icon

    I created a JButton, and I used the method setIcon(Icon im) to add an Image on it.

    I would like to know if it exists one method in java API which can be used to remove that Icon from the JButton.

  2. #2
    paty is offline Member
    Join Date
    Jul 2007
    Posts
    41
    Rep Power
    0

    Default

    apparently, removeIcon() doesnt exist, try with button.setIcon(null);

Similar Threads

  1. how can we remove blank lines from a .txt
    By Camden in forum New To Java
    Replies: 12
    Last Post: 07-29-2011, 01:38 PM
  2. Replies: 0
    Last Post: 01-08-2008, 05:29 PM
  3. how to remove whitespaces in a text
    By christina in forum New To Java
    Replies: 2
    Last Post: 08-03-2007, 05:24 PM
  4. Is there a way to remove an option from optionsCollection?
    By schu777 in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 08-02-2007, 09:47 PM
  5. how to remove an old version of JDK
    By tommy in forum New To Java
    Replies: 2
    Last Post: 07-30-2007, 08:59 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
  •