public class CS10Display
Provides static methods to display results of CS 10 assignments.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Method Summary | |
|---|---|
static void |
print(Color... color)
Prints color values to standard output. |
static void |
show(Color... color)
Displays color(s). |
static void |
showGrid(Color[][] grid)
Displays color grid. |
| Method Detail |
|---|
public static void print(Color... color)
color - the color(s) to print. Can be a single Color, a comma-separated
list of Colors, or an array of Colors.public static void show(Color... color)
color - the color(s) to display. Can be a single Color, a comma-separated
list of Colors, or an array of Colors.public static void showGrid(Color[][] grid)
grid - the array of colors to show - both dimensions must be <= 400.public void paintComponent(Graphics g)
paintComponent in class JComponentg - the graphics object passed by the windowing system.