SetLookAndFeel in a JFileChooser
i made my JFileChooser class in order to change the LookAndFeel of my form for the choice of file... this is the simple code of my personal class for jFileChooser
Code:
public class SdoJFileChooser extends JFileChooser{
public SdoJFileChooser(){
super();
try {[COLOR="Blue"]UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());[/COLOR]
}
[COLOR="Red"]catch (UnsupportedLookAndFeelException ex) {[/COLOR]
Logger.getLogger(SdoJFileChooser.class.getName()).log(Level.SEVERE, null, ex);}
[COLOR="Red"]catch (ClassNotFoundException ex) [/COLOR]{
Logger.getLogger(SdoJFileChooser.class.getName()).log(Level.SEVERE, null, ex);
} [COLOR="Red"]catch (InstantiationException ex)[/COLOR] {
Logger.getLogger(SdoJFileChooser.class.getName()).log(Level.SEVERE, null, ex);
} [COLOR="Red"]catch (IllegalAccessException ex)[/COLOR] {
Logger.getLogger(SdoJFileChooser.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
and in my main class i write:
Code:
SdoJFileChooser chooser = new SdoJFileChooser();
int option = chooser.showSaveDialog(this);
if (option == JFileChooser.APPROVE_OPTION) {
// my code
}
now, why do i have the Java LookAndFeel in my jFileChooser instead of the windows one? ..no Exception returned everything alright.. but different look n feel... why?