Pessoal, sera q alguem consegue fazer funciona ???
Essa classe abre um aruivo do excel, mas n to conseguino fazer funciona, sera q alguem pd me ajuda ??
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Cassolato extends JFrame {
public JDesktopPane oFundo;
public JButton botao;
public Cassolato() {
setDefaultCloseOperation( EXIT_ON_CLOSE );
setTitle( "Testando evento" );
Container c = getContentPane();
c.setLayout( null );
oFundo = new JDesktopPane();
c.setBackground( new Color( 20, 123, 201 ) );
c.add( oFundo );
botao = new JButton( "Abrir" );
botao.setBounds( 20, 20, 100, 30 );
botao.addActionListener( new ActionListener() {
public void actionPerformed( ActionEvent evento ) {
Runtime.exec( "msexcel Teste.xls" );
}
});
c.add( botao );
setSize( 400, 400 );
setVisible( true );
}
public static void main( String [] args ) {
new Cassolato();
} // fim do main
} // fim da classe
Abracao e te + :razz:
