![]() |
|||||||||||
|
|||||||||||
blade2k
» articles & tutorials
Custom Java Button
> 3 image files for your button >> 1 default button (\"b_up.png\") >> 1 pressed button (\"b_down.png\") >> 1 disabled button (\"b_disabled.png\") > Java compiler > Text editor > Java program ready for button Put the image files into the folder where the program will run.
Now take this and add an ActionListener to it and you\'ve got a custom JButton! If you want to make this an extended class from JButton, that\'d make it easier, but don\'t expect the icons to change by themselves. You have to make a separate one for each button unless you make an overloaded constructor with a switch ... If you need more help, email me at ddukki@gmail.com ~xtremedrummerguy |
|
||||||||||
|
©2002-2010 blade2k.net - parsed in 0.002 seconds - view active users
[19924 members][newest member: DevinSP]
Active Users (0)
|
|||||||||||