file://Segment int w = (g.getFontMetrics()).stringWidth("Segment"); int h = (g.getFontMetrics()).getHeight(); int d = (g.getFontMetrics()).getDescent(); g.setColor(new Color(220, 220, 220)); g.drawString("Segment", x, y); g.setColor(bg); for (int i = 0; i < h; i += 3) g.drawLine(x, y + d - i, x + w, y + d - i);
file://3D Effects Color top_color = new Color(200, 200, 0); Color side_color = new Color(100, 100, 0); for (int i = 0; i < 5; i++) { g.setColor(top_color); g.drawString("3-Dimension", ShiftEast(x, i), ShiftNorth(ShiftSouth(y, i), 1)); g.setColor(side_color); g.drawString("3-Dimension", ShiftWest(ShiftEast(x, i), 1), ShiftSouth(y, ii)); } g.setColor(Color.yellow); g.drawString("3-Dimension", ShiftEast(x, 5), ShiftSouth(y, 5));
file://Motion for (int i = 0; i < 20; i++) { font_size = 12 + i; g.setFont(new Font("TimesRoman", Font.PLAIN, font_size)); w = (g.getFontMetrics()).stringWidth("Motion"); g.setColor(new Color(0, 65 + i * 10, 0)); g.drawString("Motion", (width - w) / 2, ShiftSouth(y, speed * i)); }