• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JCheckBox

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
anyone can help me to change the icon in check box..?

// jCheckBox1.setDisabledIcon(new ImageIcon("E:\\TestTrials\\checkboxchecked.png"));
// jCheckBox1.setDisabledSelectedIcon(new ImageIcon("E:\\TestTrials\\checkboxchecked.png"));
// jCheckBox1.setRolloverIcon(new ImageIcon("E:\\TestTrials\\checkboxchecked.png"));
// jCheckBox1.setRolloverSelectedIcon(new ImageIcon("E:\\TestTrials\\checkboxchecked.png"));

// jCheckBox1.setIcon(new ImageIcon("E:\\TestTrials\\checkboxchecked.png"));

// jCheckBox1.setSelectedIcon(new ImageIcon("E:\\TestTrials\\checkboxchecked.png") );
// jCheckBox1.setPressedIcon(new ImageIcon("E:\\TestTrials\\checkboxchecked.png") );
//


i tried all this ways. but only

jCheckBox1.setIcon(new ImageIcon("E:\\TestTrials\\checkboxchecked.png"));

this method is working. others are not make change in the UI.

regards.
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
> anyone can help me to change the icon in check box..?
...
> ... but only ... this method is working.

if it's working, do you still have a problem?
if so, try setting the icon in the JCheckBox constructor

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic