Results 1 to 3 of 3
  1. #1
    Habib is offline Member
    Join Date
    Feb 2011
    Posts
    3
    Rep Power
    0

    Default image on a JButton...how??

    i want to set multiple image on a button in swing. How can i do it??? :confused:

    Like: [image] label [image] label on a button.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    One possible way: You could create a BufferedImage, draw images and your label string to it, add it to an ImageIcon and make this your JButton's icon.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,243
    Rep Power
    19

Similar Threads

  1. changing JButton image upon clicking
    By Logical in forum AWT / Swing
    Replies: 2
    Last Post: 12-21-2010, 02:53 AM
  2. Replies: 1
    Last Post: 04-17-2009, 12:44 AM
  3. Replies: 14
    Last Post: 04-10-2009, 08:46 AM
  4. adding Image to JButton
    By mayhewj7 in forum New To Java
    Replies: 3
    Last Post: 03-31-2009, 03:39 AM
  5. Replies: 0
    Last Post: 01-08-2008, 05:29 PM

Posting Permissions

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