- 浏览: 469608 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
谢谢你的祝福:
特地登陆上来感谢一下楼主,解决问题。
ORA-04098: 触发器无效且未通过重新验证问题 -
fuqiangjava:
写的不错 解决了自己的一个问题 谢谢了
ORA-00001:unique constraint (oracle 10g) -
hujinhuhujinhu:
make ...我有1.6.23
MyEclipse6.5安装自动提示功能的jQuery插件步骤 -
fool2011:
学习下,博主
JFreeChart类生成折线图的Java源代码 -
814687491:
你不是说的JQUERY吗?
MyEclipse6.5安装自动提示功能的jQuery插件步骤
双击右键才显示功能菜单。。。
import java.applet.Applet; import java.awt.BasicStroke; import java.awt.Button; import java.awt.Canvas; import java.awt.Choice; import java.awt.Color; import java.awt.Container; import java.awt.Cursor; import java.awt.Dimension; import java.awt.FileDialog; import java.awt.FlowLayout; import java.awt.Frame; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; import java.awt.Label; import java.awt.MediaTracker; import java.awt.MenuItem; import java.awt.Panel; import java.awt.PopupMenu; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionAdapter; import java.awt.event.MouseMotionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.geom.Ellipse2D; import java.awt.geom.Ellipse2D.Double; import java.awt.geom.Line2D; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.PrintStream; import java.io.Serializable; import java.util.Vector; import javax.imageio.ImageIO; import javax.swing.JColorChooser; import javax.swing.JPanel; public class DrawImage extends Applet implements ItemListener, MouseListener, MouseMotionListener, ActionListener { private static final long serialVersionUID = 1L; int count = 6; Vector v = new Vector(); Image[] img = new Image[this.count]; int myWidth = 0; int myHeight = 0; int widthcount = 0; boolean[] b = new boolean[this.count]; int[] width = new int[this.count]; int[] height = new int[this.count]; int[] w = new int[this.count]; int[] h = new int[this.count]; int[] wid = new int[this.count]; int[] hei = new int[this.count]; int[] ww = new int[this.count]; int[] hh = new int[this.count]; int startX = 0; int startY = 0; int endX = 0; int endY = 0; Canvas startObj = null; Canvas endObj = null; String drawclear = ""; int clickX = 0; int clickY = 0; int moveX = 0; int moveY = 0; DrawImage.canvas[] can = null; DrawImage.myCanvas[] mycan = new DrawImage.myCanvas[this.count]; Canvas curcan = null; Canvas curdelcan = null; Image curimg = null; JPanel jp = new JPanel(null); MediaTracker mt = new MediaTracker(this); PopupMenu popMenu2 = new PopupMenu(); MenuItem menuItem1 = null; MenuItem menuItem2 = null; MenuItem menuItem3 = null; MenuItem menuItem4 = null; MenuItem menuItem5 = null; int x = -1; int y = -1; int con = 1; int Econ = 5; int toolFlag = 0; Color c = new Color(0, 0, 0); BasicStroke size = new BasicStroke(this.con, 0, 2); DrawImage.Point cutflag = new DrawImage.Point(-1, -1, this.c, 6, this.con); Vector paintInfo = null; int n = 1; FileInputStream picIn = null; FileOutputStream picOut = null; ObjectInputStream VIn = null; ObjectOutputStream VOut = null; Panel toolPanel; Button eraser; Button drLine; Button drCircle; Button drRect; Button clear; Button pen; Choice ColChoice; Choice SizeChoice; Choice EraserChoice; Button colchooser; Label 颜色; Label 大小B; Label 大小E; Button openPic; Button savePic; FileDialog openPicture; BufferedImage bi = null; Graphics2D g2d = null; public void init() { int width2 = Toolkit.getDefaultToolkit().getScreenSize().width; int height2 = Toolkit.getDefaultToolkit().getScreenSize().height; this.bi = new BufferedImage(width2, height2, 1); this.img[0] = getImage(getCodeBase(), "image/1.gif"); this.img[1] = getImage(getCodeBase(), "image/2.gif"); this.img[2] = getImage(getCodeBase(), "image/3.gif"); this.img[3] = getImage(getCodeBase(), "4.gif"); this.img[4] = getImage(getCodeBase(), "5.gif"); this.img[5] = getImage(getCodeBase(), "6.gif"); resize(800, 600); setLayout(null); for (int i = 0; i < this.img.length; ++i) { this.mt.addImage(this.img[i], 0); } try { this.mt.waitForAll(); } catch (Exception ex) { System.err.println(ex.toString()); } add(this.jp); this.jp.setBounds(0, 0, 800, 80); for (int i = 0; i < this.img.length; ++i) { this.mycan[i] = new DrawImage.myCanvas(this.img[i]); this.width[i] = this.img[i].getWidth(this); this.height[i] = this.img[i].getHeight(this); this.jp.add(this.mycan[i]); this.mycan[i].setBounds(100 + 5 * (i + 1) + this.widthcount, 5, this.img[i].getWidth(this), this.img[i].getHeight(this)); this.widthcount += this.img[i].getWidth(this); } this.menuItem1 = new MenuItem("隐藏图像工具栏"); this.menuItem2 = new MenuItem("显示图像工具栏"); this.menuItem3 = new MenuItem("清空画面"); this.menuItem4 = new MenuItem("显示绘图工具栏"); this.menuItem5 = new MenuItem("隐藏绘图工具栏"); this.popMenu2.add(this.menuItem1); this.popMenu2.add(this.menuItem2); this.popMenu2.add(this.menuItem3); this.popMenu2.addSeparator(); this.popMenu2.add(this.menuItem4); this.popMenu2.add(this.menuItem5); add(this.popMenu2); this.menuItem1.addActionListener(this); this.menuItem2.addActionListener(this); this.menuItem3.addActionListener(this); this.menuItem4.addActionListener(this); this.menuItem5.addActionListener(this); this.toolPanel = new Panel(null); this.toolPanel.setLayout(new FlowLayout()); this.paintInfo = new Vector(); this.ColChoice = new Choice(); this.ColChoice.add("black"); this.ColChoice.add("red"); this.ColChoice.add("blue"); this.ColChoice.add("green"); this.ColChoice.addItemListener(this); this.SizeChoice = new Choice(); this.SizeChoice.add("1"); this.SizeChoice.add("3"); this.SizeChoice.add("5"); this.SizeChoice.add("7"); this.SizeChoice.add("9"); this.SizeChoice.addItemListener(this); this.EraserChoice = new Choice(); this.EraserChoice.add("5"); this.EraserChoice.add("9"); this.EraserChoice.add("13"); this.EraserChoice.add("17"); this.EraserChoice.addItemListener(this); this.clear = new Button("清除"); this.eraser = new Button("橡皮"); this.pen = new Button("画笔"); this.drLine = new Button("画直线"); this.drCircle = new Button("画圆形"); this.drRect = new Button("画矩形"); this.openPic = new Button("打开图画"); this.savePic = new Button("保存图画"); this.colchooser = new Button("显示调色板"); this.clear.addActionListener(this); this.eraser.addActionListener(this); this.pen.addActionListener(this); this.drLine.addActionListener(this); this.drCircle.addActionListener(this); this.drRect.addActionListener(this); this.openPic.addActionListener(this); this.savePic.addActionListener(this); this.colchooser.addActionListener(this); this.颜色 = new Label("画笔颜色", 1); this.大小B = new Label("画笔大小", 1); this.大小E = new Label("橡皮大小", 1); this.toolPanel.add(this.openPic); this.toolPanel.add(this.savePic); this.toolPanel.add(this.pen); this.toolPanel.add(this.drLine); this.toolPanel.add(this.drCircle); this.toolPanel.add(this.drRect); this.toolPanel.add(this.颜色); this.toolPanel.add(this.ColChoice); this.toolPanel.add(this.大小B); this.toolPanel.add(this.SizeChoice); this.toolPanel.add(this.colchooser); this.toolPanel.add(this.eraser); this.toolPanel.add(this.大小E); this.toolPanel.add(this.EraserChoice); this.toolPanel.add(this.clear); add(this.toolPanel); this.toolPanel.setBounds(0, 0, 900, 80); this.toolPanel.setBackground(Color.black); this.toolPanel.setVisible(false); addMouseListener(this); addMouseMotionListener(this); } public void itemStateChanged(ItemEvent e) { if (e.getSource() == this.ColChoice) { String name = this.ColChoice.getSelectedItem(); if (name == "black") { this.c = new Color(0, 0, 0); } else if (name == "red") { this.c = new Color(255, 0, 0); } else if (name == "green") { this.c = new Color(0, 255, 0); } else { if (name != "blue") return; this.c = new Color(0, 0, 255); } } else if (e.getSource() == this.SizeChoice) { String selected = this.SizeChoice.getSelectedItem(); if (selected == "1") { this.con = 1; } else if (selected == "3") { this.con = 3; } else if (selected == "5") { this.con = 5; } else if (selected == "7") { this.con = 7; } else if (selected == "9") { this.con = 9; } this.size = new BasicStroke(this.con, 0, 2); } else { if (e.getSource() != this.EraserChoice) return; String Esize = this.EraserChoice.getSelectedItem(); if (Esize == "5") { this.Econ = 10; } else if (Esize == "9") { this.Econ = 18; } else if (Esize == "13") { this.Econ = 26; } else { if (Esize != "17") return; this.Econ = 51; } } } public void actionPerformed(ActionEvent e) { if (e.getSource() == this.menuItem1) { this.jp.setVisible(false); this.toolPanel.setVisible(true); repaint(); } else if (e.getSource() == this.menuItem2) { this.jp.setVisible(true); this.toolPanel.setVisible(false); repaint(); } else if (e.getSource() != this.menuItem3) { if (e.getSource() == this.menuItem4) { this.toolPanel.setVisible(true); repaint(); } else if (e.getSource() == this.menuItem5) { this.toolPanel.setVisible(false); repaint(); } } if (e.getSource() == this.pen) { this.toolFlag = 0; } if (e.getSource() == this.eraser) { this.toolFlag = 1; } if (e.getSource() == this.clear) { this.toolFlag = 2; this.paintInfo.removeAllElements(); repaint(); } if (e.getSource() == this.drLine) { this.toolFlag = 3; } if (e.getSource() == this.drCircle) { this.toolFlag = 4; } if (e.getSource() == this.drRect) { this.toolFlag = 5; } if (e.getSource() == this.colchooser) { Color newColor = JColorChooser.showDialog(this, "调色板", this.c); this.c = newColor; } if (e.getSource() == this.openPic) { Frame f = new DrawImage.fileDialog("File Dialog Demo!"); f.setVisible(false); f.setSize(100, 100); FileDialog fd1 = new FileDialog(f, "File Dialog", 0); fd1.setVisible(true); try { this.curimg = ImageIO.read(new File(fd1.getDirectory(), fd1.getFile())); Canvas ca = new DrawImage.canvas(this.curimg); add(ca); ca.setBounds(100, 200, this.curimg.getWidth(this), this.curimg.getHeight(this)); validate(); this.curcan = null; } catch (IOException e1) { e1.printStackTrace(); } } if (e.getSource() != this.savePic) return; Frame f = new DrawImage.fileDialog("File Dialog Demo!"); f.setVisible(false); f.setSize(100, 100); FileDialog fd = new FileDialog(f, "File Dialog", 1); fd.setVisible(true); try { if (fd.getFile() == null) return; String pathStr = fd.getDirectory(); pathStr = pathStr.replace("\\", "\\\\"); String path = pathStr + fd.getFile(); ImageIO.write(this.bi, "jpg", new File(path)); } catch (IOException e2) { e2.printStackTrace(); } } public void mouseClicked(MouseEvent e) { clickhere(e); } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void update(Graphics g) { paint(g); } public void mousePressed(MouseEvent e) { DrawImage.Point p2; switch (this.toolFlag) { case 3: this.x = e.getX(); this.y = e.getY(); p2 = new DrawImage.Point(this.x, this.y, this.c, this.toolFlag, this.con); this.paintInfo.addElement(p2); break; case 4: this.x = e.getX(); this.y = e.getY(); p2 = new DrawImage.Point(this.x, this.y, this.c, this.toolFlag, this.con); this.paintInfo.addElement(p2); break; case 5: this.x = e.getX(); this.y = e.getY(); p2 = new DrawImage.Point(this.x, this.y, this.c, this.toolFlag, this.con); this.paintInfo.addElement(p2); } } public void mouseReleased(MouseEvent e) { if ((e.getButton() == 3) && (e.getClickCount() == 2)) { this.popMenu2.show(e.getComponent(), e.getX(), e.getY()); } DrawImage.Point p3; switch (this.toolFlag) { case 0: this.paintInfo.addElement(this.cutflag); break; case 1: this.paintInfo.addElement(this.cutflag); break; case 3: this.x = e.getX(); this.y = e.getY(); p3 = new DrawImage.Point(this.x, this.y, this.c, this.toolFlag, this.con); this.paintInfo.addElement(p3); this.paintInfo.addElement(this.cutflag); repaint(); break; case 4: this.x = e.getX(); this.y = e.getY(); p3 = new DrawImage.Point(this.x, this.y, this.c, this.toolFlag, this.con); this.paintInfo.addElement(p3); this.paintInfo.addElement(this.cutflag); repaint(); break; case 5: this.x = e.getX(); this.y = e.getY(); p3 = new DrawImage.Point(this.x, this.y, this.c, this.toolFlag, this.con); this.paintInfo.addElement(p3); this.paintInfo.addElement(this.cutflag); repaint(); case 2: } } public void mouseDragged(MouseEvent e) { DrawImage.Point p1; switch (this.toolFlag) { case 0: this.x = e.getX(); this.y = e.getY(); p1 = new DrawImage.Point(this.x, this.y, this.c, this.toolFlag, this.con); this.paintInfo.addElement(p1); repaint(); break; case 1: this.x = e.getX(); this.y = e.getY(); p1 = new DrawImage.Point(this.x, this.y, null, this.toolFlag, this.Econ); this.paintInfo.addElement(p1); repaint(); } } public void mouseMoved(MouseEvent e) { if (!(this.toolPanel.isVisible())) return; setCursor(new Cursor(1)); } public void clickhere(MouseEvent e) { if (this.curcan == null) return; if (e.getModifiers() != 4) return; Canvas ca = new DrawImage.canvas(this.curimg); add(ca); ca.setBounds(e.getX(), e.getY(), this.curimg.getWidth(this), this.curimg.getHeight(this)); validate(); this.curcan = null; } public void paint(Graphics g) { this.g2d = ((Graphics2D)g); this.g2d = ((Graphics2D)this.bi.getGraphics()); this.n = this.paintInfo.size(); if (this.toolFlag == 2) { g.clearRect(0, 0, getSize().width, getSize().height); this.g2d.clearRect(0, 0, getSize().width, getSize().height); } for (int i = 0; i < this.n - 1; ++i) { DrawImage.Point p1 = (DrawImage.Point)this.paintInfo.elementAt(i); DrawImage.Point p2 = (DrawImage.Point)this.paintInfo.elementAt(i + 1); this.size = new BasicStroke(p1.boarder, 0, 2); this.g2d.setColor(p1.col); this.g2d.setStroke(this.size); if (p1.tool != p2.tool) continue; switch (p1.tool) { case 0: Line2D line1 = new Line2D.Double(p1.x, p1.y, p2.x, p2.y); this.g2d.draw(line1); break; case 1: g.clearRect(p1.x, p1.y, p1.boarder, p1.boarder); this.g2d.clearRect(p1.x, p1.y, p1.boarder, p1.boarder); break; case 3: Line2D line2 = null; int X = Math.abs(p2.x - p1.x); int Y = Math.abs(p2.y - p1.y); if (X >= Y) { line2 = new Line2D.Double(p1.x, p1.y, p2.x, p1.y); } else { line2 = new Line2D.Double(p1.x, p1.y, p1.x, p2.y); } this.g2d.draw(line2); break; case 4: Ellipse2D ellipse = new Ellipse2D.Double(p1.x, p1.y, Math.abs(p2.x - p1.x), Math.abs(p2.y - p1.y)); this.g2d.draw(ellipse); break; case 5: Rectangle2D rect = new Rectangle2D.Double(p1.x, p1.y, Math.abs(p2.x - p1.x), Math.abs(p2.y - p1.y)); this.g2d.draw(rect); break; case 6: ++i; case 2: } } g.drawImage(this.bi, 0, 0, this); } public double radians(int degrees) { return (degrees * 3.141592653589793D / 180.0D); } class MyWindowAdapter extends WindowAdapter { DrawImage.fileDialog sf; public MyWindowAdapter(DrawImage.fileDialog paramfileDialog) { this.sf = paramfileDialog; } public void windowClosing(WindowEvent we) { this.sf.setVisible(false); } } class Point implements Serializable { int x; int y; Color col; int tool; int boarder; Point(int paramInt1, int paramInt2, Color paramColor, int paramInt3, int paramInt4) { this.x = paramInt1; this.y = paramInt2; this.col = paramColor; this.tool = paramInt3; this.boarder = paramInt4; } } class canvas extends Canvas { private static final long serialVersionUID = 1L; Image im = null; int X; int Y; int bufferX; int bufferY; int bufferWidth; int bufferHeight; public canvas(Image paramImage) { setCursor(new Cursor(13)); this.im = paramImage; addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { DrawImage.canvas.this.clickcanvas(e); } public void mouseReleased(MouseEvent e) { Canvas mcan = (Canvas)e.getSource(); int mtop = mcan.getY(); int mleft = mcan.getX(); int mwidth = mcan.getWidth(); int mheight = mcan.getHeight(); DrawImage.canvas.this.X = (mleft + e.getX() - DrawImage.this.clickX); DrawImage.canvas.this.Y = (mtop + e.getY() - DrawImage.this.clickY); DrawImage.canvas.this.bufferX = DrawImage.canvas.this.X; DrawImage.canvas.this.bufferY = DrawImage.canvas.this.Y; DrawImage.canvas.this.bufferWidth = mwidth; DrawImage.canvas.this.bufferHeight = mheight; DrawImage.canvas.this.drawBufferImage(); } }); addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent e) { if (e.getKeyCode() == 127) DrawImage.canvas.this.removecanvas(e); } }); addMouseMotionListener(new MouseMotionAdapter() { public void mouseDragged(MouseEvent e) { DrawImage.canvas.this.movecanvas(e); } }); } public void movecanvas(MouseEvent e) { Canvas mcan = (Canvas)e.getSource(); int mtop = mcan.getY(); int mleft = mcan.getX(); int mwidth = mcan.getWidth(); int mheight = mcan.getHeight(); clearImage(); mcan.setBounds(mleft + e.getX() - DrawImage.this.clickX, mtop + e.getY() - DrawImage.this.clickY, mwidth, mheight); for (int i = 0; i < DrawImage.this.v.size(); ++i) { Vector v1 = (Vector)DrawImage.this.v.elementAt(i); if (((Canvas[])v1.elementAt(0))[0].equals(mcan)) { ((int[])v1.elementAt(1))[0] = mcan.getX(); ((int[])v1.elementAt(1))[1] = mcan.getY(); ((int[])v1.elementAt(1))[2] = mcan.getWidth(); ((int[])v1.elementAt(1))[3] = mcan.getHeight(); } else { if (!(((Canvas[])v1.elementAt(0))[1].equals(mcan))) continue; ((int[])v1.elementAt(1))[4] = mcan.getX(); ((int[])v1.elementAt(1))[5] = mcan.getY(); ((int[])v1.elementAt(1))[6] = mcan.getWidth(); ((int[])v1.elementAt(1))[7] = mcan.getHeight(); } } ((DrawImage)getParent()).repaint(); } public void removecanvas(KeyEvent e) { try { Canvas mcan = (Canvas)e.getSource(); ((DrawImage)getParent()).remove(DrawImage.this.curdelcan); for (int i = DrawImage.this.v.size() - 1; i >= 0; --i) { Vector v1 = (Vector)DrawImage.this.v.elementAt(i); if ((!(((Canvas[])v1.elementAt(0))[0].equals(mcan))) && (!(((Canvas[])v1.elementAt(0))[1].equals(mcan)))) continue; DrawImage.this.v.removeElementAt(i); } ((DrawImage)getParent()).validate(); ((DrawImage)getParent()).repaint(); } catch (NullPointerException ex) { return; } } public void clickcanvas(MouseEvent e) { DrawImage.this.curdelcan = ((Canvas)e.getSource()); DrawImage.this.clickX = e.getX(); DrawImage.this.clickY = e.getY(); ((DrawImage)getParent()).repaint(); if (((DrawImage)getParent()).drawclear.equals("")) return; if ((((DrawImage)getParent()).startObj == null) && (((DrawImage)getParent()).endObj == null)) { ((DrawImage)getParent()).startObj = ((Canvas)e.getSource()); } else { if ((((DrawImage)getParent()).startObj == null) || (((DrawImage)getParent()).endObj != null) || (((DrawImage)getParent()).startObj == (Canvas) e.getSource())) return; ((DrawImage)getParent()).endObj = ((Canvas)e.getSource()); Vector v1 = new Vector(); v1.addElement(new Canvas[] { DrawImage.this.startObj, DrawImage.this.endObj }); v1.addElement(new int[] { DrawImage.this.startObj.getX(), DrawImage.this.startObj.getY(), DrawImage.this.startObj.getWidth(), DrawImage.this.startObj.getHeight(), DrawImage.this.endObj.getX(), DrawImage.this.endObj.getY(), DrawImage.this.endObj.getWidth(), DrawImage.this.endObj.getHeight() }); DrawImage.this.v.addElement(v1); ((DrawImage)getParent()).drawclear = ""; ((DrawImage)getParent()).startObj = null; ((DrawImage)getParent()).endObj = null; } } public void paint(Graphics g) { g.drawImage(this.im, 0, 0, this); } public void drawBufferImage() { Graphics2D g2 = (Graphics2D)DrawImage.this.bi.getGraphics(); g2.drawImage(this.im, this.X, this.Y, this); g2.dispose(); } public void clearImage() { Graphics2D g2 = (Graphics2D)DrawImage.this.bi.getGraphics(); g2.clearRect(this.bufferX, this.bufferY, this.bufferWidth, this.bufferHeight); } } class fileDialog extends Frame { private static final long serialVersionUID = 1L; fileDialog(String title) { super(title); DrawImage.MyWindowAdapter adapter = new DrawImage.MyWindowAdapter(this); addWindowListener(adapter); } } class myCanvas extends Canvas { private static final long serialVersionUID = 1L; Image im = null; String str = ""; public myCanvas(String paramString) { this.str = paramString; } public myCanvas(Image paramImage) { setCursor(new Cursor(12)); this.im = paramImage; addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { DrawImage.myCanvas.this.clickmyCanvas(e); } }); } public void clickmyCanvas(MouseEvent e) { ((DrawImage)getParent().getParent()).drawclear = ""; ((DrawImage)getParent().getParent()).startObj = null; ((DrawImage)getParent().getParent()).endObj = null; DrawImage.this.curcan = ((Canvas)e.getSource()); DrawImage.this.curimg = this.im; } public void paint(Graphics g) { if (this.str.equals("")) { g.drawImage(this.im, 0, 0, this); } else { g.drawString(this.str, 20, getHeight() / 2); } } } }
发表评论
-
Applet画图修改中。。。
2010-01-13 21:00 2256效果如下图: import java.applet.A ... -
Applet打印
2009-11-23 15:56 2041效果如上图: import java.awt.*; i ... -
applet数字签名实践篇三(转载)
2009-11-17 18:56 1998最近在研究applet,打算使用applet来开发一个上传文件 ... -
applet数字签名实践篇二(转载)
2009-11-17 18:45 1340【摘 要】如果你要考虑在Internet上实现这个Applet ... -
applet数字签名实践篇一(转载)
2009-11-17 18:44 1505本人在报表开发之时, ... -
Applet与Servlet通信
2009-11-13 17:42 1138在今天的多层结构的web应用程序的设计中,我们可以同时使用Ja ... -
使用 Java applet 访问远程 Web 服务
2009-11-13 10:35 1869通过浏览器提交、接收和分析 XML Web 服务消息 ... -
利用Applet进行Web打印
2009-11-07 17:45 1911一web打印常见方法: 1,一种简单的方法是在html上调用w ... -
applet应用小技巧
2009-11-06 13:29 10201。获取屏幕分辩率的宽和高: int width=To ... -
applet图像的处理
2009-11-03 16:08 2036设置呈现(RenderingHints)提示 8.2 ... -
applet绘制纹理图
2009-11-03 16:04 1137其效果如下图: import java.applet.*; ... -
applet中保存canvas中的图片
2009-11-02 15:36 1589效果图如下: import java.awt.*; ... -
applet画图板程序(画直线、画圆、画笔、画矩形、调色板)
2009-10-27 17:08 5045import java.applet.*; import j ... -
applet画图板程序
2009-10-27 17:00 2020import java.applet.Applet; imp ... -
applet的简单流程图绘制小工具
2009-10-27 16:58 1867使用说明如下: 1.在主区域的上面有一个写有"dr ... -
applet图形缩放类
2009-10-24 20:11 1295import java.awt.Image; import ... -
applet文字和图标的合成
2009-10-24 17:43 1588相信大家平时碰到过一些在JAVA中对图像进行处理的需求,比如需 ... -
运行applet时出现无法载入class的问题,以及设置codeBase
2009-08-13 17:57 2345最简单的方法就是:把它们放在同一个目录就不用设置啦。。。,但是 ... -
IE中Applet不能运行的问题
2009-08-13 17:49 2137applet程序正常没问题,在Html页面中的设置也没问题,只 ... -
Applet 双缓冲技术
2009-07-23 17:32 1542import java.applet.Applet; imp ...
相关推荐
一个Applet程序,通过鼠标监听实现鼠标随笔画线 没多大技术含量,比较简单
这是我写的一个简陋的画图版.里面还有很多可以改进的地方,简化版方便大家参考.
基于java applet的简易画图程序,简单易用,有助于理解java事件侦听响应的相关知识。
这个小程序是我自己搞的,能参数化的绘制椭圆,长方形,以及鼠标绘制多边形,有兴趣的可以研究研究,如果有什么新的思路,留言给我,以后会改进的,
Java课程设计中用Applet做的一个简单的画图程序
有applet实现画图的操作界面,有话直线,椭圆,举行,和曲线,还可以调节颜色和画笔大小
java的applet小程序实现网页画图
Java在Applet小程序中显示图片,看上去就像是网页中显示的图片,不过实现的手段是Java Applet,究竟如何做到的呢?请下载这个源码一看究竟。
主要介绍了java用applet画图用到的方法(涉及双缓冲),然后作为基础的基础的基础,必须学习如何让键盘与界面进行交互。下面就是对一个基础得不能再基础的applet程序,需要的朋友可以参考下
是一个Applet程序,用户可以调整所画圆和正方形的大小,并且是鼠标点击就实现画图功能,而且可移动所画的图形,并且所画的图形可以根据需要选择不同颜色!!
Java中用Applet画sinx,代码是比较全,使用Eclipse开发。
<APPLET CODE="Snowman.class"WIDTH=200 HEIGHT=100> </APPLET> import java.applet.*; import java.awt.*; public class Snowman extends Applet{ public void paint(Graphics g){ final int MID=150; final ...
D、paint() 答案:B applet主要方法 在Java Applet程序用户自定义的Applet子类中,一般需要重载父类的( )方法来完成一些画图操作。 A.A. start( ) B. B. stop( ) C. C. init( ) D. D. paint( ) 答案:D applet主要...
aintchat是一种靠java applet 传递数据的交互web聊天工具,拥有画图和聊天2种功能, 中文名字叫“涂鸦聊天室”或者“共同画图板“,该软件出自日本,并附有日文翻译
Java简单画图实例_画一个诺基亚手机,基于APPLET的小程序,可嵌套在网页中运行。
java 编写的画图程序,能实现基本的矢量图绘制和变形
Java画图程序 存储与读取对象 Java右键弹出菜单 用Applet显示图片 抖动文字 …… 有些例子是非常适合Java新手参考的,挺简单,有一些是平时不怎么用的小技巧,不过参考一下也是不多余的。
JFreeChartAppletDemo这个一个JFreeChart画图的例子工程,里面有N个小程序,涉及柱状图,饼图,曲线图等等
《JAVA语言程序设计》期末考试模拟试题 一、单选择题(每小题2分,共10分) 1、编译Java Application 源程序...3、在Java Applet程序用户自定义的Applet子类中,一般需要重载父类的( )方法来完成一些画图操作。。。。。
用Java画出一个诺基亚手机,你...不信就点开本页面看一下运行截图,一个诺基亚手机,用Java代码写程序画出来的,这个Java代码最终生成APPLET程序,可被网页调用所显示,不过你的浏览器需要安装支持APPLET的Java插件。