MyLabelpublic class MyLabel extends JLabel Dummy Canvas class, to represent the real main part of an application * |
Fields Summary |
---|
int | width | int | height | int | pad |
Constructors Summary |
---|
MyLabel(int w, int h)
this("", w, h);
| MyLabel(String l, int w, int h)
super(l, JLabel.CENTER);
width = w; height = h;
| MyLabel(String l, int w, int h, Color c)
this(l, w, h);
setBackground(c);
|
Methods Summary |
---|
public java.awt.Dimension | getMinimumSize()
return new Dimension(width, height);
| public java.awt.Dimension | getPreferredSize()
return new Dimension(width+pad, height+pad);
|
|