10 2011 档案

摘要:1 /** 2 * A custom EditText that draws lines between each line of text that is displayed. 3 * 这是一个自定义的EditView被画很多行再每两行的中间 4 */ 5 public static class LinedEditText extends EditText { 6 /* 7 * 一个是矩形 一个是装绘 主要显示画图的样式 8 */ 9 private Rect mRect;... 阅读全文
posted @ 2011-10-11 11:01 Acmen 阅读(662) 评论(1) 推荐(0)
摘要:/* * JPanel 边框小合集 */import java.awt.*; import java.awt.event.*; import javax.swing.border.*; import javax.swing.*; public class BorderDemo extends JFrame { private static final long serialVersionUID = 1L; public BorderDemo() { // 设置框架窗口的标题 super("使用边框的例子"); ... 阅读全文
posted @ 2011-10-06 13:53 Acmen 阅读(421) 评论(0) 推荐(0)
摘要:1 public class dsasdadsa { 2 3 /** 4 * 这个例子足以证明当参数是类的话直接改变的将是这个类的本体,也就是传递的是一个类的地址 5 * 当参数是一些基本的数据类型时传递的也只是一个值! 6 * @param args 7 */ 8 public static void main(String[] args) { 9 // TODO Auto-generated method stub10 int pp = 0;11 MM m = new MM();12... 阅读全文
posted @ 2011-10-06 08:29 Acmen 阅读(243) 评论(0) 推荐(0)
摘要:1 import java.awt.DisplayMode; 2 import java.awt.FlowLayout; 3 import java.awt.GraphicsDevice; 4 import java.awt.GraphicsEnvironment; 5 import java.awt.Insets; 6 import java.awt.event.ActionEvent; 7 import java.awt.event.ActionListener; 8 9 impor... 阅读全文
posted @ 2011-10-02 20:32 Acmen 阅读(1398) 评论(0) 推荐(0)
摘要:从硬盘读取图片Image image = null; try { // Read from a file File file = new File("image.gif"); image = ImageIO.read(file); // Read from an input stream InputStream is = new BufferedInputStream( new FileInputStream("image.gif")); image = ImageIO.re... 阅读全文
posted @ 2011-10-02 19:23 Acmen 阅读(447) 评论(0) 推荐(0)