Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #1199
| From | "lrantisi" <lrantisi@THRWHITE.remove-dii-this> |
|---|---|
| Subject | How to run this method |
| Message-ID | <1174075441.966246.160050@b75g2000hsg.googlegroups.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| Date | 2011-04-27 15:31 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui
I went to a website at this link http://www.exampledepot.com/egs/java.awt/DrawBasic.html
and I found the following code
================================================
public void paint(Graphics g) {
Graphics2D g2d = (Graphics2D)g;
g2d.drawLine(x1, y1, x2, y2);
g2d.drawOval(x, y, w, h);
g2d.drawRect(x, y, w, h);
// A start angle of 0 represents a 3 o'clock position, 90
represents a 12 o'clock position,
// and -90 (or 270) represents a 6 o'clock position
int startAngle = 45;
int arcAngle = -60;
g2d.drawArc(x, y, w, h, startAngle, arcAngle);
g2d.drawRoundRect(x, y, w, h, arcWidth, arcHeight);
Polygon polygon = new Polygon();
polygon.addPoint(x, y);
// Add more points...
g2d.drawPolygon(polygon);
================================================
The question is "How can I run this method", just by calling paint,,
or how ????
---
* Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next — Next in thread | Find similar | Unroll thread
How to run this method "lrantisi" <lrantisi@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000 Re: How to run this metho "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
csiph-web