StringDemo

作者在 2011-09-08 15:14:55 发布以下内容
import  java.swing.*;
import  java.awt.*;
class   StringDemo  extends  JFrame{
          String key1  ="郑州标牌厂家";
          String  key2 ="郑州路牌厂家";
          String  key3 ="郑州停车场设施";
          String  key4  ="国通标牌";
          String  key5 ="郑州国通交通设施有限公司";
          Label l1,l2,l3,l4,l5;
         JPanel  jp;
       public   StringDemo(){
                 setTitle("国通标牌");
                 setSize(800,800);
                 setLocation(400,400);
                 setVisible(true);
                 jp = new  JPanel();
                 l1  =  new  Label(key1);
                 l2  =  new  Label(key2);
                 l3  = new Label(key3);
                 l4  = new Label(key4);
                 l5  =  new Label(key5);
                 jp.setLayout(new  Layout());
                 l1.setBounds(200,200,50,50);
                 l2.setBounds(200,400,50,50);
                 l3.setBounds(300,200,50,50);
                 l4.setBounds(300,400,50,50);
                 l5.setBounds(100,100,80,80);
                 jp.add(l1,new Layout());
                 jp.add(l2,new Layout());
                 jp.add(l3,new  Layout());
                 jp.add(l4,new Layout());
                 jp.add(l5,new  Layout());
                 this.getContentPane().add(jp);
           }
       public  static  void  main(String args[]){
                  new StringDemo();
       }
}
 
java | 阅读 1132 次
文章评论,共0条
游客请输入验证码
浏览59278次
最新评论