• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Changing gifs - newbie question

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

This is a real newbie question. I have a gui on which there are eight LED's (figure of 8's). I have been able to get the gifs to look like 'figure of 8' led's with border layouts etc. My problem is that i can't find a good explanation of how to change / repaint them. The LED's should display letters/numbers depending on input from the user, but i'm not sure how i get the gif's to change from being 'off' to 'on' in order to display these characters.

Can someone give me a good explanation of an easy way to change which gif i use depending on user input?

Thanks,

Celine
 
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bitwise manipulation is one way. Here's a demo using graphics. The BasicStroke class has constructor options for different kinds of line–end decoration.
 
celine mcgowan
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a million for this Craig! I'll try that now.

Cheers,
Celine
 
You ridiculous clown, did you think you could get away with it? This is my favorite tiny ad!
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!