Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2007

Tip: Looking for answers? Try searching our database.

Display Multiple icons on a single JButton after each click

Thread view: 
arash470@googlemail.com - 14 Feb 2007 06:20 GMT
Hi all..

I have a problem with JButtons in Java Swing!!

How do u add more than one icons ( like 10 icons) in a single button,
and when we keep clicking the button it displays the different icons
one after the other and starts repeating the icons again after
completing the gifs...

If any one of you could actually write a sample code for me i would be
greatful.. i have been going crazy over this..

Thanks for your help in advance.

ARS
hiwa - 14 Feb 2007 07:58 GMT
On Feb 14, 3:20 pm, arash...@googlemail.com wrote:
> Hi all..
>
[quoted text clipped - 11 lines]
>
> ARS

Make a single Image from your original ten Images and make an
ImageIcon from the resultant Image. --(a)

Repeat (a) choosing randomly from your original Images stock, in the
action listener of the button.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.