hey everyone,
I have the following code in the constructor of my JFrame class.
The problem is i want to color the JPanel so I can see it when I add other panels (to help me w/doing layout stuff).Code:{ super(); mainPanel.setForeground(Color.red); contentPane.add(mainPanel); this.setResizable(false); this.setTitle("Find..."); this.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent anEvent) { doDispose(); } }); this.setSize(300, 200); this.show(); }
Why wont the panel color turn red?????


Reply With Quote



Bookmarks