CS3135/CS2135
Object Oriented Programming (Java)
BSCS-3 / MCS-3
Lecture # 21
Graphics
Audio
Graphics
java.awt.Graphics
• void getColor(Color)
• void setColor(Color)
• void drawString(String, int, int) //text to display, x, y
• void drawLine(int, int, int, int) //x1, y1, x2, y2
• void drawRect(int, int, int, int) //x, y, width, height
• void fillRect(int, int, int, int) //x, y, width, height
• void drawRoundRect(int, int, int, int, int, int) //x, y, width, height, arcWidth, int arcHeight
• void fillRoundRect(int, int, int, int, int, int) //x, y, width, height, arcWidth, int arcHeight
• void drawOval(int, int, int, int) //x, y, width, height
• void fillOval(int, int, int, int) //x, y, width, height
• void clearRect(int, int, int, int) //x, y, width, height
Instructor: Tanzila Kehkashan
2
Instructor: Tanzila Kehkashan
3

OOP Lecture 21-Graphics, Audio.pptx

  • 1.
    CS3135/CS2135 Object Oriented Programming(Java) BSCS-3 / MCS-3 Lecture # 21 Graphics Audio
  • 2.
    Graphics java.awt.Graphics • void getColor(Color) •void setColor(Color) • void drawString(String, int, int) //text to display, x, y • void drawLine(int, int, int, int) //x1, y1, x2, y2 • void drawRect(int, int, int, int) //x, y, width, height • void fillRect(int, int, int, int) //x, y, width, height • void drawRoundRect(int, int, int, int, int, int) //x, y, width, height, arcWidth, int arcHeight • void fillRoundRect(int, int, int, int, int, int) //x, y, width, height, arcWidth, int arcHeight • void drawOval(int, int, int, int) //x, y, width, height • void fillOval(int, int, int, int) //x, y, width, height • void clearRect(int, int, int, int) //x, y, width, height Instructor: Tanzila Kehkashan 2
  • 3.