desculpa a demorar para responder
mas estava resolvendo outros problemas aqui no trabalho.
Então os erros que aparecem sao os seguintes:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Substance delegate used when Substance is not the current LAF [component SubstanceTitlePane in window Validador:'Validador de TXT' under Liquid]
at org.jvnet.substance.utils.SubstanceCoreUtilities.traceSubstanceApiUsage(SubstanceCoreUtilities.java:2401)
at org.jvnet.substance.utils.SubstanceTitlePane.paintComponent(SubstanceTitlePane.java:1164)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JLayeredPane.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
conforme a opção de tema q o usuario escolhe no menu ele manda para esta função para entao ser feita a troca do tema:
isso em tempo real de execução do aplicativo.
void opcaoSource(final int source){
Validador.setDefaultLookAndFeelDecorated(true);
SwingUtilities.invokeLater(new Runnable() {
public void run(){
try {
if(source == 1){
UIManager.setLookAndFeel(new SubstanceSaharaLookAndFeel());
}else if(source == 2){
UIManager.setLookAndFeel("com.jtattoo.plaf.smart.SmartLookAndFeel");
}else if(source == 3){
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); //Windows
}else if(source == 4){
UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel"); //Motif
}else if(source == 5){
UIManager.setLookAndFeel(new SubstanceRavenLookAndFeel());
}else if(source == 6){
UIManager.setLookAndFeel(new SubstanceBusinessBlueSteelLookAndFeel());
}else if(source == 7){
UIManager.setLookAndFeel("com.birosoft.liquid.LiquidLookAndFeel");
}
}catch (Exception e) {
e.printStackTrace();
}
}
});
}
Aqui é onde inicio o meu aplicativo chamando ele no main
public static void main(String[] args) throws java.text.ParseException{
Validador.setDefaultLookAndFeelDecorated(true);
SwingUtilities.invokeLater(new Runnable() {
public void run(){
try {
UIManager.setLookAndFeel(new SubstanceSaharaLookAndFeel());
}catch (Exception e) {
e.printStackTrace();
}
new Validador();
}
});
}
Agora acho q vai ficar mais facil para me ajudarem, hehehehe
redr4gon, por curiosidade como que eu poderia criar meu proprio JFileChooser?
OBS: estava lendo a respeito do runnable no java, que fala a respeito de thread, eu sou iniciante em java, faz poucos meses q estou trabalhando nele e ainda nao sei os conceitos que englobam thread… provavelmente deve estar ai o problema, devo estar iniciando varias durante o tempo q o aplicativo esta aberto e nao estou fechando elas, sei la, algo assim, se puderem me explicar, ou passar alguns materiais para ler a respeito…
Enfim, agradeço desde já