java简单源代码百度盘 java编程源码

求《第一行代码Java视频讲解版》全文免费下载百度网盘资源,谢谢~《第一行代码Java视频讲解版》百度网盘pdf最新全集下载:
链接:
?pwd=t7i1 提取码: t7i1
简介:第一行代码 Java 视频讲解版从初学者的角度 , 以丰富的例子、通俗易懂的语言、简单的图示,详细地介绍了Java开发中重点用到的多种技术 。全书分为15章 , 包括Java简介、程序基本概念、面向对象基本概念、面向对象高级知识、包及访问控制权限、异常的捕获及处理、Eclipse开发工具、Java新特性、多线程、Java常用类库、Java IO编程、Java网络编程、Java类集框架、Java数据库编程、DAO设计模式等内容 。
求编写一个超级简单的Java的程序源代码import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class ConstructFrame extends JFrame
{
private static final long serialVersionUID = 1L;
String value1="",result,value2="";
int flag=0,fix=0,sum=1;
Booleanhappy;
JTextField text=new JTextField(30);
int flagsum=0;
Container c=getContentPane();
JButton buttonx;
ConstructFrame()
{super("计算器");
c.setLayout(null);
c.setBackground(Color.blue);
this.setSize(400, 400);
c.add(text);
text.setHorizontalAlignment(JTextField.RIGHT);
final JButton buttonx=new JButton("BackSpace");
c.add(buttonx);
buttonx.addMouseListener(new MouseAdapter()
{
public void mousePressed(MouseEvent e)
{
int count=0;
String temp;
if(flag==0)
{
count=value1.length();
if(count!=1)
temp=value1.substring(0, count-1);
else
temp="0";
value1=temp;
}
else
{
count=value2.length();
if(count!=1)
temp=value2.substring(0, count-1);
else
temp="0";
value2=temp;
}
text.setText(temp);
}
});
final JButton buttony=new JButton("CE");
c.add(buttony);
buttony.addMouseListener(new MouseAdapter()
{
public void mousePressed(MouseEvent e)
{
value1="";
value2="";
flag=0;
text.setText("0");
}
});
final JButton button1=new JButton("1");
c.add(button1);
button1.addMouseListener(new MouseAdapter()
{
public void mousePressed(MouseEvent e)
{
String temp;
if(flag==0)
{
value1=value1+1;
temp=value1;
}
else
{
value2=value2+1;
temp=value2;
}
text.setText(temp);
}
});
final JButton button2=new JButton(" 2 ");
c.add(button2);
button2.addMouseListener(new MouseAdapter()
{
public void mousePressed(MouseEvent e)
{
String temp;
if(flag==0)
{
value1=value1+2;
temp=value1;
}
else
{
value2=value2+2;
temp=value2;
}
text.setText(temp);
}
});
final JButton button3=new JButton("3");
c.add(button3);
button3.addMouseListener(new MouseAdapter()
{
public void mousePressed(MouseEvent e)
{
String temp;
if(flag==0)
{
value1=value1+3;
temp=value1;
}
else
{
value2=value2+3;
temp=value2;
}
text.setText(temp);
}
});
final JButton button4=new JButton("4");
c.add(button4);
button4.addMouseListener(new MouseAdapter()
{
public void mousePressed(MouseEvent e)
{
String temp;
if(flag==0)
{
value1=value1+4;
temp=value1;
}
else
{
value2=value2+4;
temp=value2;
}
text.setText(temp);
}
});
final JButton button5=new JButton("5");
c.add(button5);
button5.addMouseListener(new MouseAdapter()

推荐阅读