- 浏览: 26643 次
- 性别:
- 来自: 广州
最新评论
-
Ken艹小哲:
可以啊,试下:BufferedImage buffImg = ...
Image对象与 BufferedImage -
ganky:
有没有BufferedImage提取Image的方法啊?
Image对象与 BufferedImage
文章列表
<script type="text/javascript">
var newObject=new Array("red","green","blue");
document.write(newObject); //output red,green,blue
//Array拥有栈结构的特征
newObject.pop();
document.write("<br>"+newObject); //output red,green
newObject.push ...
标题打字效果(摘录)
- 博客分类:
- javascript
<script language="javascript">
var message="标题栏打字效果"
var message=message+""
i="0"
var temp=""
var speed="150"
function titler(){
if(!document.all && !document.getElementById)
return
document.title=temp+message.charAt(i)
temptit ...
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
public class ReadUrlToTxt {
private URL url = null;
public R ...
由一个Imge转化成BufferedImage,源码如下:
//covert Image object to BufferedImage object
//pic (Image type)
private BufferedImage convertImageToBuffer(){
BufferedImage bufferedImage = new BufferedImage(pic
.getWidth(null), pic.getHeight(null),
BufferedImage.TYPE_INT_RGB);
Graphics g = buffered ...
- 2009-12-07 19:14
- 浏览 9264
- 评论(2)
public class ShowImage extends JPanel implements ActionListener {
private JButton open ;
private String filePath;
private BufferedImage image;
private static ShowImage show;
public static ShowImage singleton(){
if(show==null)
show=new ShowImage();
return show;
}
privat ...
- 2009-12-06 23:22
- 浏览 2888
- 评论(0)
Filter滤镜
参数:
Alpha(Opacity-? ,FinishOpacity=? ,Style=?,StartX=?,StartY=?(渐变透明效果的开始坐
标),FinishX,FinishY)
BlendTrans(Duration=?)
Blur(Add=?,Direction(值45的整数倍,0表示垂直向上),Strength)
Chroma(Color=(要过滤掉的某种颜色)
DropShadow(Color,Offx,OffY,Positive,)
FilpH FlipV Gray Invert Light(光源在物体上的投影效果) Xray
Glow(Color Str ...
- 2009-11-19 21:12
- 浏览 961
- 评论(0)
设置css的几种方式
1.内联样式表(INLINE STYLES)
<meta http-equiv="Content-Style-Type" content="text/css">
2.嵌入样式表(Embeded style sheets)
<head>
<style type="text/css" media="screen,projection">
<!--(注释标签,支持style标签的浏览器会自动忽略,否则相反)
P{FONT-SIZE:20pt;COLOR:bl ...
- 2009-11-18 10:23
- 浏览 1032
- 评论(0)
import java.awt.*;
import java.util.*;
import javax.swing.*;
public class GenerateBmp extends JFrame {
public GenerateBmp(){
init();
}
private void init(){
JPanel panel=new JPanel();
setContentPane(panel);
panel.setLayout(new GridLayout(2,1));
// ImageIcon icon= ...
- 2009-11-18 10:06
- 浏览 3209
- 评论(0)
html全局架构标签:
<html>
<head>
<title>….</title>
</head>
<body>
……..
</body>
<html>
注释:<!- -
- ->
格式标签:
段落:<p> </p>
换行:<br>
空格:
无序列表:<ul
<li> </li>
</ul>
有序列表:<ol
& ...
- 2009-11-09 10:50
- 浏览 899
- 评论(0)
public class Node {
int id; // 索引值
int data;
Node leftNode;
Node rightNode;
Node(){
}
}
package tree;
public class BiTree {
private static Node root;
public BiTree(){
root=null;
}
public Node insertNode(int index,int val){
Node newNode=new Nod ...
归并排序
- 博客分类:
- java dataStructure
package sort;
public class MergeSortDemo {
private int[] arr1={1,2,3,4};
private int[] arr2={0,6,7,8};
private int[] arr3=new int[8];
public MergeSortDemo(){
}
public void mergeSort(){
int a1=0;
int a2=0;
int a3=0;
while(a1<4&&a2<4){
if(arr1[ ...
- 2009-10-27 18:47
- 浏览 988
- 评论(0)
public class NodeDemo {
int data;
public NodeDemo next;
NodeDemo(){
}
public NodeDemo(int data){
this.data=data;
next=null;
}
}
public class LinkListDemo {
private NodeDemo p;
LinkListDemo(){
p=null;
}
public void showList(){
NodeDemo p ...
- 2009-10-26 10:50
- 浏览 825
- 评论(0)
public class SortDemo{
private int[] sortArray;
public SortDemo(){
sortArray=new int[8];
}
public void swap(int i,int j){
int t=sortArray[i];
sortArray[i]=sortArray[j];
sortArray[j]=t;
}
public void insertArray(int pos,int val){
sortArray[pos]=val;
...
读取和在JTextArea显示文件:
// read file
public File readFileTxt(){
String str=String.valueOf(DevideText.singleObject().text.getText());
try{
if(str==null) throw new Exception();
file=new File(str);
}
catch (Exception e){
e.printStackTrace();
}
return file;
}
//show the f ...
- 2009-10-16 19:10
- 浏览 1034
- 评论(0)