Graphics

Method or Constructor Purpose
void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle) Draws the outline of a circular or elliptical arc covering the specified rectangle.
void drawLine(int x1, int y1, int x2, int y2) Draws a line, using the current color, between the points (x1, y1) and (x2, y2) in this graphics.
void drawOval(int x, int y, int width, int height) Draws the outline of an oval.
void drawString(String str, int x, int y) Draws the text given by the specified string, using this graphics context's current font and color.
void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle) Fills a circular or elliptical arc covering the specified rectangle.
void fillOval(int x, int y, int width, int height) Fills an oval bounded by the specified rectangle with the current color.
void fillRect(int x, int y, int width, int height) Fills the specified rectangle.
Color getColor(), void setColor(Color) Gets and sets this graphics context's current color.
Font, getFont(),void setFont(Font font) Sets this graphics context's font to the specified font.

Color

Method or Constructor Purpose
Color(float r, float g, float b) , Color(int r, int g, int b) Specific the red, green, blue component.
Color brighter(), Color darker() Creates a new Color that is a brighter (or darker) version of this Color.

Font

Method or Constructor Purpose
Font(String name, int style, int size) Creates a new Font from the specified name, style and point size.
name - the font name. This can be a logical font name or a font face name.
style - the style constant for the Font The style argument is an integer bitmask that may be PLAIN, or a bitwise union of BOLD and/or ITALIC (for example, ITALIC or BOLD|ITALIC).
size - the point size of the Font.

String

Methods for changing strings

String concat(String str)
String replace(char oldChar, char newChar)
String toLowerCase()
String toUpperCase()
String trim()

Methods for searching

int indexOf(int ch)
int indexOf(int ch, int fromIndex)
int lastIndexOf(int ch)
int lastIndexOf(int ch, int fromIndex)
int indexOf(String str)
int indexOf(String str, int fromIndex)
int lastIndexOf(String str)
int lastIndexOf(String str,int fromIndex)


Methods for testing

boolean startsWith(String prefix, int toffset)
boolean startsWith(String prefix)
boolean endsWith(String suffix)
boolean equalsIgnoreCase(String anotherString)

Methods for accessing

String substring(int beginIndex)
String substring(int beginIndex, int endIndex)
char charAt(int index)
public char[] toCharArray()

JFrame

JFrame(), JFrame(String title) constructorsf
Color getForeground(), void setForeground(Color c), Color getBackground(), void setBackground(Color c) Gets and sets the background/foreground color of this component.
void setSize(int width, int height) Resizes this component so that it has width width and height.
void setVisible(boolan visible) set the JFrame visible

JLabel

JLabel(), JLabel(String text) constructors
void setText(String text), String getText(); set or get the text on the JLabel