blob: d97e122c978b4f44ac5d6aff4de2f3d54060a301 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package NET.worlds.console;
import java.awt.Dimension;
import java.awt.LayoutManager;
import java.awt.Panel;
class FixedWidthPanel extends Panel {
private static final long serialVersionUID = 1256222162739133960L;
private int width;
public FixedWidthPanel(LayoutManager layout, int width) {
super(layout);
this.width = width;
}
@Override
public Dimension preferredSize() {
Dimension d = super.preferredSize();
d.width = this.width;
return d;
}
}
|