Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Arland Smith   on Oct 14 In Java Category.

  
Question Answered By: Mike Stephens   on Oct 14

try this oo way, not other po way. :)

import javax.swing.*;
import java.awt.*;
class mybutton extends JButton
{
mybutton(String name)
{
super(name); //JButton jb=new JButton(name);
setBackground(Color.red);
setForeground(Color.white);
setBorder(new javax.swing.border.CompoundBorder(new
javax.swing.border.SoftBevelBorder
(javax.swing.border.BevelBorder.RAISED), new
javax.swing.border.BevelBorder
(javax.swing.border.BevelBorder.RAISED)));
setBackground(Color.blue);
setForeground(Color.white);
}
}

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on what wrong wit it Or get search suggestion and latest updates.


Tagged: