📄 miukono5.java
字号:
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import java.io.*;
import java.awt.datatransfer.*;//用于打开文件和保存文件的一个类
import java.applet.Applet;
import java.awt.geom.*;
import sun.audio.*;
import java.sql.*;
class miukoNO5 extends Frame implements ActionListener
{
private Button b1,b2,b3,b4,b5,b6,b7;
private Image img;
static String s1,sd;
static List ls,ls1;
static TextField t1,t2;
static TextArea ta;
private Label g1,g2,g3,g4,g5,g6;
private boolean bls = true,bls1 = false;
private BufferedReader in;
private boolean bs1=true,bs2=false,bs3=false,bs4=false,bs5=false,bs6=false,bs7=false,bs8=false,bs9=false;
private boolean b11=false,b12=false,b13=false,b14=false,b15=false,b16=false,b17=false,b18=false;
private boolean bls11[];
private boolean bls12[];
Color c1,c2,c3;
miukoNO5()
{
super("~NO.5~~语法大全");
Toolkit tool = getToolkit();
img = tool.getImage("Bingo.jpg");
c1 = new Color(225,135,44);
c3 = new Color(210,44,133);
c2 = new Color(44,173,173);
setBackground(c1);
setSize(622,622);
setIconImage(img);
setLayout(null);
setLocation(300,60);
t1 = new TextField();
t1.setBounds(10,30,300,20);
t1.setBackground(c1);
t1.setForeground(Color.green);
add(t1);
t1.setVisible(true);
t2 = new TextField();
t2.setBounds(310,30,300,20);
t2.setBackground(c1);
t2.setForeground(Color.orange);
add(t2);
t2.setVisible(true);
b1 = new Button("查看词法");
b1.setBounds(10,51,100,20);
b1.addActionListener(this);
b1.setBackground(c1);
b1.setVisible(true);
add(b1);
b2 = new Button("查看句法");
b2.setBounds(10,72,100,20);
b2.addActionListener(this);
b2.setBackground(c1);
b2.setVisible(true);
add(b2);
b3 = new Button("返回主页");
b3.setBounds(10,93,100,20);
b3.addActionListener(this);
b3.setBackground(c1);
b3.setVisible(true);
add(b3);
b4 = new Button("退出软件");
b4.setBounds(10,114,100,20);
b4.setBackground(c1);
b4.addActionListener(this);
b4.setVisible(true);
add(b4);
b5 = new Button("本点练习");
b5.setBounds(10,552,100,20);
b5.addActionListener(this);
b5.setBackground(c1);
b5.setVisible(true);
add(b5);
b6 = new Button("本点修改");
b6.setBounds(10,573,100,20);
b6.addActionListener(this);
b6.setBackground(c1);
b6.setVisible(true);
add(b6);
g1 = new Label("第一步↙选择词类");
g1.setBackground(c1);
g1.setForeground(Color.green);
g1.setBounds(10,135,100,20);
g1.setVisible(true);
add(g1);
ls = new List();
ls.setBounds(10,156,100,200);
ls.setBackground(c1);
ls.setVisible(true);
ls.addActionListener(this);
ls.add("名词");
ls.add("代词");
ls.add("冠词");
ls.add("数词");
ls.add("形容词和副词");
ls.add("动词");
ls.add("介词");
ls.add("连词");
ls.add("构词法知识");
add(ls);
g2 = new Label("第二步↙选择小点");
g2.setBackground(c1);
g2.setForeground(Color.green);
g2.setBounds(10,357,100,20);
g2.setVisible(true);
add(g2);
ls1 = new List();
ls1.setBounds(10,378,100,200);
ls1.setBackground(c1);
ls1.setVisible(true);
ls1.addActionListener(this);
add(ls1);
ta = new TextArea("",100,500,1);
ta.setBounds(112,51,500,540);
ta.setVisible(true);
ta.setBackground(c1);
ta.setForeground(Color.orange);
add(ta);
g3 = new Label("");
g3.setBackground(c1);
g3.setForeground(Color.green);
g3.setBounds(10,594,300,20);
g3.setVisible(true);
add(g3);
g4 = new Label("");
g4.setBackground(c1);
g4.setForeground(Color.green);
g4.setBounds(310,594,300,20);
g4.setVisible(true);
add(g4);
setVisible(true);
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==ls&&ls.getSelectedIndex()==0&&bls==true)
{
bs1=true;
bs2=false;
bs3=false;
bs4=false;
bs5=false;
bs6=false;
bs7=false;
bs8=false;
bs9=false;
g3.setText("第一步选择了:::::名词:::::");
ls1.clear();
ls1.add("1.名词的类别");
ls1.add("2.可数与不可数");
ls1.add("3.名词的数");
ls1.add("4.名词所以格");
bls11 = new boolean[4];
}
for(int i = 0;i<4;i++)
{
if(e.getSource()==b6&&bls==true&&bs1==true&&bls11[i]==true)
{
s1 ="11"+(i+1)+".nn";
sd=ta.getText();
miukoexit gh = new miukoexit("确定要修改小点名词的类型吗?");
gh.setVisible(true);
}
}
if(e.getSource()==ls1&&ls1.getSelectedIndex()==0&&bls==true&&bs1==true)
{
t2.setText("");
bls11[0]=true;
bls11[1]=false;
bls11[2]=false;
bls11[3]=false;
g4.setText("第二步选择了:::::名词的类别::::");
t1.setText("您的位置是>>>名词>>>名词的类别");
ta.setText("");
try
{
in = new BufferedReader( new FileReader ("111.nn"));
while( in.ready())
{
ta.append(in.readLine());
}
in.close();
}
catch(Exception er){}
}
if(e.getSource()==ls1&&ls1.getSelectedIndex()==1&&bls==true&&bs1==true)
{
t2.setText("");
bls11[1]=true;
bls11[0]=false;
bls11[2]=false;
bls11[3]=false;
g4.setText("第二步选择了:::::名词可数与不可数::::");
t1.setText("您的位置是>>>名词>>>可数与不可数");
ta.setText("");
try
{
in = new BufferedReader( new FileReader ("112.nn"));
while( in.ready())
{
ta.append(in.readLine());
}
in.close();
}
catch(Exception er){}
}
if(e.getSource()==ls1&&ls1.getSelectedIndex()==2&&bls==true&&bs1==true)
{
t2.setText("");
bls11[2]=true;
bls11[1]=false;
bls11[0]=false;
bls11[3]=false;
g4.setText("第二步选择了:::::名词的数::::");
t1.setText("您的位置是>>>名词>>>名词的数");
ta.setText("");
try
{
in = new BufferedReader( new FileReader ("113.nn"));
while( in.ready())
{
ta.append(in.readLine());
}
}
catch(Exception er){}
}
if(e.getSource()==ls1&&ls1.getSelectedIndex()==3&&bls==true&&bs1==true)
{
t2.setText("");
bls11[3]=true;
bls11[1]=false;
bls11[2]=false;
bls11[0]=false;
g4.setText("第二步选择了:::::名词所以格::::");
t1.setText("您的位置是>>>名词>>>名词所以格");
ta.setText("");
try
{
in = new BufferedReader( new FileReader ("114.nn"));
while( in.ready())
{
ta.append(in.readLine());
}
in.close();
}
catch(Exception er){}
}
////////////////////////----------------------------------------------------------------------
if(e.getSource()==ls&&ls.getSelectedIndex()==1&&bls==true)
{
bs1=false;
bs2=true;
bs3=false;
bs4=false;
bs5=false;
bs6=false;
bs7=false;
bs9=false;
bs8=false;
g3.setText("第一步选择了:::::代词:::::");
ls1.clear();
ls1.add("1.人称代词");
ls1.add("2.物主代词");
ls1.add("3.指示代词");
ls1.add("4.不定代词");
ls1.add("5.疑问代词");
ls1.add("6.关系代词");
bls11 = new boolean[6];
}
for(int i = 0;i<6;i++)
{
if(e.getSource()==b6&&bls==true&&bs2==true&&bls11[i]==true)
{
s1 ="12"+(i+1)+".nn";
sd=ta.getText();
miukoexit gh = new miukoexit("确定要修改小点名词的类型吗?");
gh.setVisible(true);
}
}
if(e.getSource()==ls1&&ls1.getSelectedIndex()==0&&bls==true&&bs2==true)
{
t2.setText("");
bls11[0]=true;
bls11[1]=false;
bls11[2]=false;
bls11[3]=false;
bls11[4]=false;
bls11[5]=false;
ta.setText("");
try
{
g4.setText("第二步选择了:::::人称代词::::");
t1.setText("您的位置是>>>代词>>>人称代词");
in = new BufferedReader( new FileReader ("121.nn"));
while( in.ready())
{
ta.append(in.readLine());
}
in.close();
}
catch(Exception er){}
}
if(e.getSource()==ls1&&ls1.getSelectedIndex()==1&&bls==true&&bs2==true)
{
g4.setText("第二步选择了:::::物主代词::::");
t2.setText("");
bls11[1]=true;
bls11[0]=false;
bls11[2]=false;
bls11[3]=false;
bls11[4]=false;
bls11[5]=false;
t1.setText("您的位置是>>>代词>>>物主代词");
ta.setText("");
try
{
in = new BufferedReader( new FileReader ("122.nn"));
while( in.ready())
{
ta.append(in.readLine());
}
in.close();
}
catch(Exception er){}
}
if(e.getSource()==ls1&&ls1.getSelectedIndex()==2&&bls==true&&bs2==true)
{
t2.setText("");
bls11[2]=true;
bls11[1]=false;
bls11[0]=false;
bls11[3]=false;
bls11[4]=false;
bls11[5]=false;
g4.setText("第二步选择了:::::指示代词::::");
t1.setText("您的位置是>>>代词>>>指示代词");
ta.setText("");
try
{
in = new BufferedReader( new FileReader ("123.nn"));
while( in.ready())
{
ta.append(in.readLine());
}
}
catch(Exception er){}
}
if(e.getSource()==ls1&&ls1.getSelectedIndex()==3&&bls==true&&bs2==true)
{
t2.setText("");
bls11[3]=true;
bls11[1]=false;
bls11[2]=false;
bls11[0]=false;
bls11[4]=false;
bls11[5]=false;
g4.setText("第二步选择了:::::不定代词::::");
t1.setText("您的位置是>>>代词>>>不定代词");
ta.setText("");
try
{
in = new BufferedReader( new FileReader ("124.nn"));
while( in.ready())
{
ta.append(in.readLine());
}
in.close();
}
catch(Exception er){}
}
if(e.getSource()==ls1&&ls1.getSelectedIndex()==4&&bls==true&&bs2==true)
{
t2.setText("");
bls11[4]=true;
bls11[1]=false;
bls11[2]=false;
bls11[3]=false;
bls11[0]=false;
bls11[5]=false;
g4.setText("第二步选择了:::::疑问代词::::");
t1.setText("您的位置是>>>代词>>>疑问代词");
ta.setText("");
try
{
in = new BufferedReader( new FileReader ("125.nn"));
while( in.ready())
{
ta.append(in.readLine());
}
}
catch(Exception er){}
}
if(e.getSource()==ls1&&ls1.getSelectedIndex()==5&&bls==true&&bs2==true)
{
t2.setText("");
bls11[0]=false;
bls11[1]=false;
bls11[2]=false;
bls11[3]=false;
bls11[5]=true;
bls11[4]=false;
g4.setText("第二步选择了:::::关系代词::::");
t1.setText("您的位置是>>>代词>>>关系代词");
ta.setText("");
try
{
in = new BufferedReader( new FileReader ("126.nn"));
while( in.ready())
{
ta.append(in.readLine());
}
in.close();
}
catch(Exception er){}
}
//_______________---------------________________________----------------------------
if(e.getSource()==ls&&ls.getSelectedIndex()==2&&bls==true)
{
bs1=false;
bs2=false;
bs3=true;
bs4=false;
bs5=false;
bs6=false;
bs7=false;
bs8=false;
bs9=false;
g3.setText("第一步选择了:::::冠词:::::");
ls1.clear();
ls1.add("1.不定冠词用法");
ls1.add("2.定冠词的用法");
ls1.add("3.不定冠词情况");
bls11 = new boolean[6];
}
for(int i = 0;i<3;i++)
{
if(e.getSource()==b6&&bls==true&&bs3==true&&bls11[i]==true)
{
s1 ="13"+(i+1)+".nn";
sd=ta.getText();
miukoexit gh = new miukoexit("确定要修改小点名词的类型吗?");
gh.setVisible(true);
}
}
if(e.getSource()==ls1&&ls1.getSelectedIndex()==0&&bls==true&&bs3==true)
{
t2.setText("");
bls11[0]=true;
bls11[1]=false;
bls11[2]=false;
g4.setText("第二步选择了:::::不定冠词用法::::");
t1.setText("您的位置是>>>冠词>>>不定冠词用法");
ta.setText("");
try
{
in = new BufferedReader( new FileReader ("131.nn"));
while( in.ready())
{
ta.append(in.readLine());
}
in.close();
}
catch(Exception er){}
}
if(e.getSource()==ls1&&ls1.getSelectedIndex()==1&&bls==true&&bs3==true)
{
t2.setText("");
bls11[0]=false;
bls11[1]=true;
bls11[2]=false;
g4.setText("第二步选择了:::::定冠词的用法::::");
t1.setText("您的位置是>>>冠词>>>定冠词的用法");
ta.setText("");
try
{
in = new BufferedReader( new FileReader ("132.nn"));
while( in.ready())
{
ta.append(in.readLine());
}
in.close();
}
catch(Exception er){}
}
if(e.getSource()==ls1&&ls1.getSelectedIndex()==2&&bls==true&&bs3==true)
{
t2.setText("");
bls11[0]=false;
bls11[1]=false;
bls11[2]=true;
g4.setText("第二步选择了:::::不定冠词情况::::");
t1.setText("您的位置是>>>冠词>>>不定冠词情况");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -