- 博客(37)
- 资源 (3)
- 收藏
- 关注
转载 投票|输出文本|画图|求最大数
import java.awt.*;import java.awt.event.*;import java.io.BufferedWriter;import java.io.FileWriter;import java.io.IOException;import javax.swing.*;public class SelectionDemo extends JFr
2009-12-21 18:02:00
439
原创 GUI简单例子
import java.awt.*;import java.awt.event.*;import javax.swing.*;public class TestDemo { private JFrame frame=new JFrame("GUI_XB"); private JLabel label1,label2; private JPanel panel1,panel2
2009-11-19 20:38:00
593
原创 JComboBoxDemo
import java.awt.*;import java.awt.event.*;import javax.swing.*;public class JComboBoxDemo { private JFrame frame=new JFrame("组合框"); private JComboBox jcb; private JPanel panel1,panel2;
2009-11-19 20:35:00
418
原创 作业(1)
import java.awt.*;import java.awt.event.*;import javax.swing.*; public class MiniCalculator extends JFrame implements WindowListener { private JPanel jp; private JButton b0, b1, b2, b3, b
2009-11-17 22:41:00
355
原创 我的作业展示
import java.awt.*;import java.awt.event.*;import javax.swing.*;public class TestA implements MouseMotionListener,KeyListener{ private JFrame frame; private JLabel tf; private String s; p
2009-11-17 19:30:00
510
原创 SQL_学生-课程数据库(下)
第二部分1.所有男生的姓名、年龄:Select Sname,SageFrom student;2.所有年龄大于20,计算机科学系学生名单:SELECT SnameFROM StudentWHERE Sage>20 AND Sdept=CS;3.成绩大于60的学生学号:SELECT SnoFROM SC WHERE Grade>60;4.成
2009-11-14 22:23:00
1908
原创 SQL_学生-课程数据库(上)
第一部分单表查询例一:查询全体学生的学号与姓名SELECT Sno,SnameFROM Student;例二:查询全体学生的姓名、学号、所在系SELECT Sname,Sno,SdeptFROM Student;例三:查询全体学生的详细记录SELECT *FROM Student;等价于:SELECT *FROM Student;例四
2009-11-14 22:11:00
4659
原创 一次强烈的对比_差距(关于电话界面的学习)在此一并表示给出此代码的那位朋友的感谢
import java.awt.*;import java.awt.event.*;import javax.swing.*;import javax.swing.border.*;public class PhoneDemo1 extends JFrame implements ActionListener{ private JButton [] jbAry = {new J
2009-11-11 19:52:00
557
原创 I/O
import java.io.*;public class JavaObjectSerializator { public static void main(String args[]) { String path = "F://文件//"; String file = "object.txt"; Student s=new Student();
2009-11-05 19:37:00
353
原创 关于线程的综合应用示例
//SyncTest.javapublic class SyncTest { public static void main(String args[]){ SyncStack stack=new SyncStack(); Runnable source=new Producer(stack); Runnable sink=new Consumer(stack);
2009-11-05 19:07:00
439
原创 同步问题
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.io.PipedInputStream;import java.io.PipedOutputStream;import java.io.PrintStream;cl
2009-11-05 07:20:00
372
原创 死锁(for learning)
class classA { public classB b; synchronized void methoda() { String name=Thread.currentThread().getName(); System.out.println(name +"entered classA.methoda."); try{ Thread.sleep(100
2009-11-04 22:32:00
409
原创 创建线程的方法二:实现 Runnable 接口
import java.awt.*;import java.awt.event.*;import java.applet.*;public class BallThread extends Applet implements Runnable { Thread red,blue; Graphics redPen,bluePen; int t=0; public void
2009-11-02 19:17:00
485
原创 创建线程的方法一:继承Thread类
class Lefthand extends Thread { public void run() { for(int i=0;i<=5;i++) { System.out.println("You are Students!"); try{ sleep(500); }catch(InterruptedException e){} } }}
2009-11-02 18:51:00
549
原创 ubuntu 9.10 .
10.29日ubuntu9.10正式版发布,30日就在官网下载了镜像,在windows server 2003基础上硬盘安装了ubuntu,下载了语言包,紧接着汉化了操作系统; 重启后进入不了windows server 了,在网上搜了帖子,终端中输入命令后问题迎刃而解,重启就可以引导双系统了,感觉很高兴,很好用的Linux操作
2009-11-01 19:52:00
352
原创 FileToUnicode
import java.io.*;public class FileToUnicode { public static void main(String args[]) { try{ FileInputStream fis=new FileInputStream("file1.txt"); InputStreamReader dis=new InputStreamRe
2009-10-30 22:38:00
317
原创 CharInput
import java.io.*;public class CharInput { public static void main(String args[]) throws IOException { String s; InputStreamReader ir; BufferedReader in; ir=new InputStreamReader(System
2009-10-30 22:37:00
718
原创 PrintWriterTest
import java.io.*;class BankAccount{ String ownerName; int accountNumber; float balance; String getOwnerName(){ return ownerName; } void setOwnerName(String ownerName){ this.ownerNa
2009-10-30 22:36:00
314
原创 BufferedReaderTest
import java.io.*;class BankAccount{ String ownerName; int accountNumber; float balance; String getOwnerName(){ return ownerName; } void setOwnerName(String ownerName){ this.owner
2009-10-30 22:35:00
395
原创 //文件的处理
//文件的处理import java.io.*;public class UseFile { public static void main(String args[]) { File f=new File("/export/home/d.java"); System.out.println("The file is exists?--->" +f.exists());
2009-10-30 22:31:00
337
原创 对象流_测试未通过的.
import java.io.*;import java.util.Date;public class ObjectOutputStream { public static void main(String args) { Date d=new Date(); FileOutputStream f=new FileOutputStream("Date.ser"); O
2009-10-27 17:41:00
287
原创 FileInput/OutputStreamTest
import java.io.*;public class FileOutputStreamTest { public static void main(String args[]) { try { FileOutputStream out=new FileOutputStream("myFile.dat"); out.write(H); out.writ
2009-10-26 22:48:00
511
原创 PipedStreamDemo
import java.io.*;public class PipedStreamDemo { public static void main(String args[]) throws IOException { //对可能发生的异常交由系统处理 PipedOutputStream pos=new PipedOutputStream(); PipedInputStrea
2009-10-26 22:46:00
289
原创 applet
import java.awt.*;import java.applet.Applet;public class HwAudio1 extends Applet { Image flower; public void init(){ flower=getImage(getDocumentBase(),"flower.gif"); } public void paint(Graphics g) {
2009-10-24 21:38:00
230
原创 AppletApp
import java.applet.Applet;import java.awt.*;import java.awt.event.*;public class AppletApp extends Applet { public static void main(String args[]) { Frame frame=new Frame("Applicati
2009-10-24 21:11:00
314
原创 HwMouse
import java.awt.*;import java.awt.event.*;import java.applet.Applet;public class HwMouse extends Applet implements MouseListener { int mouseX=25; int mouseY=25; //注册鼠标事件监听程序 public void init(){ addMo
2009-10-24 21:10:00
266
原创 AppletApp_不太清楚.
import java.applet.Applet;import java.awt.*;import java.awt.event.*;public class AppletApp extends Applet { public static void main(String args[]) { Frame frame=new Frame("Application"); //创建本类(Appl
2009-10-24 20:43:00
382
原创 DrawingExample
import java.awt.*;import java.awt.event.*;import javax.swing.*;public class DrawingExample implements ActionListener { JFrame frame; MyButton button; MyPanel panel; int tag=1; public s
2009-10-22 19:28:00
302
原创 Example
import java.awt.*;import java.awt.event.*;import javax.swing.*;public class Example implements ActionListener { JFrame f; JButton b; JTextArea ta; JScrollPane sp; public static void ma
2009-10-22 18:57:00
440
原创 JFileChooserDemo
import java.awt.*;import java.awt.event.*;import javax.swing.*;import java.io.*;public class JFileChooserDemo implements ActionListener { JFrame frame=new JFrame("JFileChooser Demo"); JFil
2009-10-22 18:27:00
592
原创 JOptionPanelDemo
import java.awt.*;import java.awt.event.*;import javax.swing.*;public class JOptionPanelDemo implements ActionListener { JFrame frame=new JFrame("JOptionPane Demo"); JTextField tf=new JTextF
2009-10-21 21:51:00
389
原创 PopupMenuDemo
import java.awt.*;import java.awt.event.*;import javax.swing.*;public class PopupMenuDemo extends MouseAdapter implements ActionListener { JFrame frame=new JFrame("Popup Menu Demo"); JPopupM
2009-10-21 19:18:00
376
原创 JDialogDemo
import java.awt.*;import java.awt.event.*;import javax.swing.*;public class JDialogDemo implements ActionListener { JFrame frame; JDialog dialog; JButton button; public static void ma
2009-10-21 19:16:00
388
原创 MenuDemo
import java.awt.*;import java.awt.event.*;import javax.swing.*;public class MenuDemo implements ItemListener,ActionListener { JFrame frame=new JFrame("Menu Demo"); JTextField tf=new JTextFie
2009-10-20 22:16:00
443
原创 JTextAreaDemo
import java.awt.*;import java.awt.event.*;import javax.swing.*;import javax.swing.border.*;public class JTextAreaDemo { JFrame frame=new JFrame("JTextArea Demo"); JTextArea ta1,ta2; JBut
2009-10-20 20:23:00
329
原创 JTextFieldDemo
import java.awt.*;import java.awt.event.*;import javax.swing.*;import javax.swing.text.*;public class JTextFieldDemo2 { JFrame frame=new JFrame("JTextField Demo 2"); JLabel nameLabel=new
2009-10-20 19:39:00
383
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人