import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
public class CalFrame
extends Frame {
//http://www.2cto.com/kf/201405/298165.html
public void launchFrame() {
this.setTitle("test");
this.setBounds(20, 20, 300, 450);
this.setMaximumSize(null);
this.setVisible(true);
this.setResizable(false);
@Override
}
});
menu.add(file);
menu.add(edit);
menu.add(source);
menu.add(refa);
this.setMenuBar(menu);
p.
setBackground(Color.
LIGHT_GRAY);
this.add(p);
t.setEditable(false);
System.
out.
println(t.
getWidth() + "----" + t.
getHeight());
sub.
setBackground(Color.
GRAY);
sub.
setBounds(new Rectangle(280,
(p.
getHeight() - t.
getHeight())));
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 6; j++) {
int width = sub.getWidth() / 5;
int height = sub.getHeight() / 6;
b.setSize(width, height);
b.
setBackground(Color.
LIGHT_GRAY);
sub.add(b);
}
}
}
public static void main
(String[] args
) {
new CalFrame().launchFrame();
}
}