package moo.foo.ca;
import org.swixml.SwingEngine;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.io.File;
public class Tp3Gui extends JPanel {
/**
*
*/
private static final long serialVersionUID = 1L;
public JFrame ecran;
public JTextArea searchStr;
public JTextArea resultat;
public JButton quit;
public static void main( String[] args ) throws Exception {
new Tp3Gui();
}
public Tp3Gui() throws Exception {
new SwingEngine( this ).render( new File( "xml/tp3gui.xml" ) );
this.ecran.setVisible( true );
}
public Action doHelloWorld = new AbstractAction() {
private static final long serialVersionUID = -8484249421113665155L;
public void actionPerformed( ActionEvent event ) {
try {
resultat.setText("moo foo");
} catch ( Exception ex ) {
resultat.setText( "Erreur ! : " + ex.getMessage() );
}
}
};
}
//------------------------------------------------------------------the xml