java
1 | switch(整形变量|blean){ |
数值时switch语句
区间时:if语句;
循环结构
1 | public class h { |
java JFrame 画乌龟简要:
`
java
public class window extends JFrame{
public stadic void main(String args[]){
JFrame MyJFrame= new JFrame(“乌龟”);
MyJFrame.setBounds(200,200,400,400);//设置位置
MyJFrame.setVisible(ture);
MyJFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//设置默认关闭
}
}
class Mypaint extends Jpanel{
public void paint(Graphics g){
super.paint(g);
setBackground(Color.Ligte);
g.fillOval()
}
}