Methods Summary |
---|
public void | addActionListener(java.awt.event.ActionListener l)
if(actionListener != null)
throw new TooManyListenersException();
actionListener = l;
|
public java.lang.String | getBangText() return text;
|
public int | getCircleSize() return cSize;
|
public int | getFontSize() return fontSize;
|
public java.awt.Dimension | getPreferredSize()
return new Dimension(200, 200);
|
public java.awt.Color | getTextColor() return tColor;
|
public static void | main(java.lang.String[] args)
BangBean bb = new BangBean();
try {
bb.addActionListener(new BBL());
} catch(TooManyListenersException e) {}
Frame aFrame = new Frame("BangBean Test");
aFrame.addWindowListener(
new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
aFrame.add(bb, BorderLayout.CENTER);
aFrame.setSize(300,300);
aFrame.setVisible(true);
|
public void | paint(java.awt.Graphics g)
g.setColor(Color.black);
g.drawOval(xm - cSize/2, ym - cSize/2,
cSize, cSize);
|
public void | removeActionListener(java.awt.event.ActionListener l)
actionListener = null;
|
public void | setBangText(java.lang.String newText)
text = newText;
|
public void | setCircleSize(int newSize)
cSize = newSize;
|
public void | setFontSize(int newSize)
fontSize = newSize;
|
public void | setTextColor(java.awt.Color newColor)
tColor = newColor;
|