Link to home
Start Free TrialLog in
Avatar of dvd99
dvd99

asked on

Makick a button?

Hello in AWT to add a button you add this code :
Button b = new Button("Button");
add(b); // and in swing you add a J before the Button.
This makes a very boaring button but you can change the buttons background by setting a background color to it.
The question i have is , is there a way I can make my own button called say OButton and when ever i add the code obutton = o new obutton("Orange") it will have a orange background?
Thanks!! This would have to have all the same events as a Button (Everything the same but different bg color)
Thanks!
Avatar of amitd
amitd

ya u can do it boss
but what about the previous question u asked didnot allot points?
for answer?
ASKER CERTIFIED SOLUTION
Avatar of rjackman
rjackman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dvd99

ASKER

Adjusted points to 40
thanx
RickyJackman