java.awt.Rectangle : Rectangle « 2D Graphics « Java Tutorial

Java Tutorial
1. Language
2. Data Type
3. Operators
4. Statement Control
5. Class Definition
6. Development
7. Reflection
8. Regular Expressions
9. Collections
10. Thread
11. File
12. Generics
13. I18N
14. Swing
15. Swing Event
16. 2D Graphics
17. SWT
18. SWT 2D Graphics
19. Network
20. Database
21. JSP
22. JSTL
23. Servlet
24. Web Services SOA
25. Email
26. J2ME
27. J2EE Application
28. XML
29. Design Pattern
30. Log
31. Security
32. Apache Common
Java
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Tutorial » 2D Graphics » Rectangle 
16. 34. 1. java.awt.Rectangle
  1. A Rectange object specifics a rectangular area in the coordinate system.
  2. Its x and y fields specify the top-left corner coordinate.
  3. Its width and height fields specify the width and height of the rectangle, respectively.

Here are some of the constructors of the Rectangle class.

public Rectangle ()
public Rectangle (Dimension d)
public Rectangle (int width, int height)
public Rectangle (int x, int y, int width, int height)

A zero value for a field is assumed if the field is missing from a constructor's argument list.

16. 34. Rectangle
16. 34. 1. java.awt.Rectangle
16. 34. 2. Draw RectangleDraw Rectangle
16. 34. 3. drawRect (int, int, int, int) to draw a rectangle outline
16. 34. 4. drawRoundRect (int, int, int, int, int, int) to draw a rounded rectangle outline
16. 34. 5. Draw a three-dimensional rectangle outline
16. 34. 6. How do I...Fill shapes?How do I...Fill shapes?
16. 34. 7. Fill 3D RectangleFill 3D Rectangle
16. 34. 8. Draw Rectangle with Rectangle2D.Float
16. 34. 9. Draw RoundRectangle2D.Float
w__w_w___.___ja_v__a___2__s.___c___o___m_ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.