private JDialog dialog;
private JTextArea text;
private JPanel buttons, filler;
private JRadioButton questions, list;
private ButtonGroup group;
private JButton confirm;
dialog = new JDialog(Main.masterWindow, lang.getString("newTitle"), true);
dialog.getContentPane().setLayout(new BoxLayout(dialog.getContentPane(), BoxLayout.Y_AXIS));
dialog.setResizable(false);
text = new JTextArea();
//this works
text.setBackground(Color.RED);
//this both don't
text.setBackground((Color)UIManager.get("control");
text.setBackground(dialog.getContentPane().getBackground());
dialog.setVisible(true);
I am using Nimbus L&F, and "control" is the background color of my dialog. If I set any other color (red in this example) it shows, but if I set it to this one, it's stays white.
I don't have tis problem on default (metal) L&F...
What's the problem?