More Related Content
More from Tanzila Kehkashan (17)
OOP Lecture 13-Color,Font,ImageIcon.pptx
- 2. java.awt.Color
• Color(int, int, int) // red, green, blue ranging from 0 to 255
• Color brighter()
• Color darker()
• int getRed()
• int getGreen()
• int getBlue()
• Color.BLACK • Color.BLUE • Color.CYAN • Color.DARK_GRAY • Color.GRAY
• Color.GREEN • Color.LIGHT_GRAY • Color.MAGENTA • Color.ORANGE
• Color.PINK • Color.RED • Color.WHITE • Color.YELLOW
JColorChooser class in javax.swing.JColorChooser
• Color showDialog(Component, String, Color) //component, title of dialogbox, initial color
Color
Instructor: Tanzila Kehkashan
2
- 5. Font
java.awt.Font
• Font(String, int, int) //font name, style constant, size
• boolean isBold()
• boolean isItalic()
• boolean isPlain()
Style Constants
• Font.PLAIN
• Font.BOLD
• Font.ITALIC
Instructor: Tanzila Kehkashan
5