import java.util.*;
import javax.swing.*;
import java.lang.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
public class Star extends JFrame
{
int c1;
JTextField Text;
JButton JB;
JButton JB1;
Star()
{
super("々々々々");
Container c=getContentPane();
c.setLayout(new GridLayout(2,1));
JPanel p=new JPanel();
JPanel P1=new JPanel();
JPanel P2=new JPanel();
JPanel P3=new JPanel();
Text=new JTextField("I Love you",24);
JButton JB=new JButton("确定");
JB.addActionListener(new j_Actin3());
JButton JB1=new JButton("取消");
//JB.addActionListener(new Action1);
p.add(Text);
P1.add("west",JB);
P1.add("west",JB1);
c.add(p);
c.add(P1);
setSize(300,250);
show();
}
public void a_Properties()
{
Properties ps1=new Properties();//能对文件操作的对象。
Properties ps2=new Properties();
Properties ps=new Properties();
Properties p=new Properties();
Properties PP=new Properties();
Properties qq=new Properties();
try
{
p.load(new FileInputStream("namedate.Properties"));//加在文件。。。
}
catch(Exception e)
{
}
// try
// {
// p.load( new FileInputStream("namedate.Properties") );
// ps.load(new FileInputStream("namedate.txt"));//到入("*.Properties")文件或则(*.txt)的文件。
// }
// catch(Exception e)
// {
//
// }
int s2=0,sum,num;
sum=Integer.parseInt(p.getProperty("name1"));//字符转换成INT形。
System.out.println(s2);
System.out.println(sum*10+"张");
System.out.println(p.getProperty("name11"));
System.out.println(ps.getProperty("name2"));
System.out.println(ps.getProperty("name3"));
System.out.println(ps.getProperty("name4"));
System.out.println(ps.getProperty("name5"));
System.out.println(ps.getProperty("name6"));
System.out.println("*********以******上******是*****小*****组*******成******员********************");
System.out.println("你姓名是:"+ps.getProperty("name7"));
System.out.println("你的年龄:"+ps.getProperty("name8"));
System.out.println("你在那里学习:"+ps.getProperty("name9"));
System.out.println("你的爱好:"+ps.getProperty("name10"));
}
public class j_Actin3 implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
System.out.println("aaaa");
}
}
public static void main(String args[])
{ JFrame.setDefaultLookAndFeelDecorated(true);
Zhang A=new Zhang();
A.a_Properties();
}
}