|
SpringGUI
introduction download reference examples faq
Reference
Name
|
setForeground(), setBackground()
|
Examples
|
// Create a button named "myButton" at coordinates 10,10 with width 200px and height 25px...
gui.addButton("myButton", "I am a button", 10, 10, 200, 25);
// Set the foreground and background color of the Button.
gui.setForeground("myButton", 255,255,255);
gui.setBackground("myButton", 0,0,0);
|
Description
|
set the foreground and background colors of an element, respectively.
|
Syntax
|
gui.setForeground(name, r, g, b);
gui.setForeground(name, c);
gui.setBackground(name, r, g, b);
gui.setBackground(name, c);
|
Parameters
|
String name
|
The name of the element.
|
int r, int g, int b
|
The new RGB color for the element.
|
color c
|
The new color for the element.
|
|
Returns
|
true if the element could be found.
|
Related
|
setAllForegrounds(), setAllBackgrounds()
|
back to the top of the page
|
| |
| | |