Markdown学习
标题
三级标题
四级标题
字体
Helloworld!
helloworld!
helloworld!
helloworld
引用
你在那边好吗?
分割线
图片
超链接
列表
- 有序列表
- b
- c
- 无序列表
- S
- D
表格
姓名 | 年纪 | 出生日期 | 性别 |
---|---|---|---|
张三 | 12 | 2009.2.22 | 男 |
代码
import java.awt.*;
public class CenterPanel {
public static void main(String[] args) {
Con f1 = new Con("Frame with Panel",100,200,400,400,Color.yellow);
}
}
class Con extends Frame {
private Panel p1;
Con(String s,int x,int y,int w,int h,Color c) {
super(s);
setLayout(null);
setBounds(x,y,w,h);
setBackground(Color.blue);
p1 = new Panel(null);
p1.setBounds(w/4,h/4,w/2,h/2);
p1.setBackground(c);
add(p1);
setVisible(true);
}
}