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;...
阅读全文
摘要:/* * 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("使用边框的例子"); ...
阅读全文
摘要: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...
阅读全文
摘要: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...
阅读全文
摘要:从硬盘读取图片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...
阅读全文
浙公网安备 33010602011771号