2014年7月6日
摘要: ylbtech_javareplace(oldStr,newStr) //把oldStr替换成newStr 阅读全文
posted @ 2014-07-06 23:50 ylbtech 阅读(180) 评论(0) 推荐(0) 编辑
摘要: ylbtech_javajava是在1995年正式发布,前身Oak语言。 java是一种面向对象的网络编程语言。 java的特点:面向对象,与平台无关。java开发环境JDK1.6 jdk的主要组成 java虚拟机 java编译器 java的类库5 输入语句 i... 阅读全文
posted @ 2014-07-06 23:48 ylbtech 阅读(391) 评论(0) 推荐(0) 编辑
摘要: ylbtech_javapackage dos;public class MyDemo{ public static void main(String args[]) { try { Runtime r = Runtime.getRunt... 阅读全文
posted @ 2014-07-06 23:44 ylbtech 阅读(111) 评论(0) 推荐(0) 编辑
摘要: ? 构造方法 Vector():构造一个空向量。 Vector(int initialCapacity):用指定的初始化容量构造一个空向量。 Vector(int initialCapacity, int capacityIncrement):用指定的初始化容量和容量增量构造一个空向量。 ? 常用的... 阅读全文
posted @ 2014-07-06 23:43 ylbtech 阅读(244) 评论(0) 推荐(0) 编辑
摘要: ylbtech_javaJProgressBar pb = new JProgressBar();//进度条 //JProgressBarFile f1 = new File(txt1.getText()); File f2 = new File(txt2.get... 阅读全文
posted @ 2014-07-06 23:42 ylbtech 阅读(122) 评论(0) 推荐(0) 编辑
摘要: list.setSelectedValue(bg,true);//默认选中的值 阅读全文
posted @ 2014-07-06 23:42 ylbtech 阅读(139) 评论(0) 推荐(0) 编辑
摘要: ylbtech_javatry { //url网络资源地址 URL url = new URL("http://localhost/appserv/flag-english.png"); //打开url连接 ... 阅读全文
posted @ 2014-07-06 23:41 ylbtech 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 1 数据库管理 create database 数据库名 drop database 数据库名 create database 数据库名 on ( name='文件名', filename='路径\文件名.mdf' ) log on ( name='文件名', ... 阅读全文
posted @ 2014-07-06 23:40 ylbtech 阅读(134) 评论(0) 推荐(0) 编辑
摘要: int getClickCount():得到鼠标点击的次数:鼠标单击,返回整数值1;鼠标双击,返回整数值2。 阅读全文
posted @ 2014-07-06 23:39 ylbtech 阅读(125) 评论(0) 推荐(0) 编辑
摘要: ylbtech_sqlserver--1、定义三个变量分别保存你的姓名,年龄和身高,然后赋值并且输出--DECLARE @name varchar(10) , @age int , @height floatDECLARE @name varchar(10)DECLARE @age intDECL... 阅读全文
posted @ 2014-07-06 23:34 ylbtech 阅读(349) 评论(0) 推荐(0) 编辑
摘要: ylbtech_sqlservercreate database bankgouse bankgocreate table users( uid int primary key identity(1,1), uname varchar(10) not null, balance f... 阅读全文
posted @ 2014-07-06 23:11 ylbtech 阅读(269) 评论(0) 推荐(0) 编辑
摘要: Date d = new Date();SimpleDateFormat adf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");String s = adf.format(d);txt.insert(s,txt.getSelectionStart());... 阅读全文
posted @ 2014-07-06 23:00 ylbtech 阅读(105) 评论(0) 推荐(0) 编辑
摘要: ? 数字变为字符串用如下方法转换相应类型的数字:Double.toString(double);Float.toString(float);Long.toString(float);Integer.toString(float);Short.toString(float);Byte.toString... 阅读全文
posted @ 2014-07-06 22:59 ylbtech 阅读(188) 评论(0) 推荐(0) 编辑
摘要: package aaa;import java.awt.*;import java.awt.event.*;import javax.swing.*;public class PolyLine extends FreeShape{ public PolyLine(Color c,Stroke ... 阅读全文
posted @ 2014-07-06 22:58 ylbtech 阅读(218) 评论(0) 推荐(0) 编辑
摘要: mu1.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,InputEvent.CTRL_DOWN_MASK));(KeyStroke.getKeyStroke(KeyEvent.VK_F5,InputEvent.BUTTON1_MASK)); 阅读全文
posted @ 2014-07-06 22:57 ylbtech 阅读(199) 评论(0) 推荐(0) 编辑
摘要: GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); String[] strName = env.getAvailableFontFamilyNames(); 阅读全文
posted @ 2014-07-06 22:56 ylbtech 阅读(131) 评论(0) 推荐(0) 编辑
摘要: ? 构造方法Hashtable():用默认的容量和加载因数构造一个新的空散列表。 Hashtable(int itialCapacity):用指定的初始的容量和默认的加载因数构造一个新的空散列表。 Hashtable(int itialCapacity, float loadFactory):用指定... 阅读全文
posted @ 2014-07-06 22:55 ylbtech 阅读(201) 评论(0) 推荐(0) 编辑
摘要: package sam;import java.awt.*;import javax.swing.*;import java.awt.event.*;import java.beans.PropertyChangeListener;class MyFrame extends JFrame{ i... 阅读全文
posted @ 2014-07-06 22:54 ylbtech 阅读(176) 评论(0) 推荐(0) 编辑
摘要: RuntimeException java.lang包中多数异常的基类 ArithmeticException 算术错误,如除以 0 IllegalArgumentException 方法收到非法参数 ArrayIndexOutOfBoundsException 数组下标出界 NullPoin... 阅读全文
posted @ 2014-07-06 22:53 ylbtech 阅读(169) 评论(0) 推荐(0) 编辑
摘要: public Image ImageChangeSize(String imageName,int width,int height) { Image img = null; try { File f = new File("sr... 阅读全文
posted @ 2014-07-06 22:52 ylbtech 阅读(141) 评论(0) 推荐(0) 编辑