Hello getName(); !
My problem is this : I can`t set the look and feel decoration.
I used the "setDefaultLookAndFeel(boolean b);" method, sometimes it`s decorated, but the graphical content isn`t displayed, and sometimes it`s not. Here is what I mean :
import java.awt.Color; import java.awt.Graphics; import javax.swing.JDialog; import javax.swing.JFrame; public class Deco extends JFrame{ public Deco(){ JDialog.setDefaultLookAndFeelDecorated(true); //If setDefaultLookAndFeelDecorated(true); is here, //nothing happens... setTitle("Deco"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setSize(400, 400); setBounds(450, 220, 400, 400); setResizable(false); setVisible(true); } public static void main(String args[]) { // And if setDefaultLookAndFeelDecorated(true); is here, // the frame is decorated depending on the look and feel. new Deco(); } public void paint(Graphics g){ g.clearRect(0, 0, getWidth(), getHeight()); g.setColor(Color.LIGHT_GRAY); g.fillRect(0, 0, getWidth(), getHeight()); } }
I think it`s because of those statemenets with fill/clearRect... but I`m not sure, ...
I`m very confused ...
Thank you everyone in advance !