J
Jenny
Hi,
How should I use setBackground(Color.cyan)? It does not change the color.
import javax.swing.*;
import java.awt.*;
public class Windows {
public static void main(String[] args) {
JFrame f = new JFrame("hello");
f.setSize(200, 300);
f.setLocation(100, 100);
f.setForeground(Color.pink);
f.setVisible(true);
JWindow w = new JWindow();
w.setSize(200, 300);
w.setLocation(400, 100);
w.setBackground(Color.cyan);
w.setVisible(true);
}}
Thank you
How should I use setBackground(Color.cyan)? It does not change the color.
import javax.swing.*;
import java.awt.*;
public class Windows {
public static void main(String[] args) {
JFrame f = new JFrame("hello");
f.setSize(200, 300);
f.setLocation(100, 100);
f.setForeground(Color.pink);
f.setVisible(true);
JWindow w = new JWindow();
w.setSize(200, 300);
w.setLocation(400, 100);
w.setBackground(Color.cyan);
w.setVisible(true);
}}
Thank you