Galera já achei alguns topicos sobre isso, tentei fazer do jeito que eles falaram mas mesmo assim não deu certo.
É o seguinte não consigo carregar imagem na minha janela queria que vcs dessem uma olhada para ver o que eu estou errando vlwww!
package temperatura;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
/**
*
* @author Diego
*/
public class BorderDemo2 extends JFrame {
private JButton bAbrir, bSalvar, bFechar;
private JTextArea taEditor;
private JLabel jLabel1 ;
public BorderDemo2(){
super("BorderDemo2");
setSize(300,200);
setBackground(SystemColor.control);
setLocation(300,300);
Container cp=getContentPane();
//painel topo
JPanel p1 = new JPanel(new FlowLayout(FlowLayout.LEFT));
for(int i=0; i<3; i++){
p1.add(new JLabel(new ImageIcon("link1.gif")));
}
//painel lateral
p1 = new JPanel();
JPanel p2 = new JPanel(new GridLayout(3, 1, 5, 5));
p2.add(bAbrir = new JButton("Abrir"));
p2.add(bSalvar = new JButton("Salvar"));
p2.add(bFechar = new JButton("Fechar"));
p1.add(p2);
cp.add("East",p1);
//componente central
cp.add(new JScrollPane(taEditor=new JTextArea()),"Center");//colocando rolagem no textarea
//listener
bFechar.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
bFecharClick();
}
});
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
private void bFecharClick(){
System.exit(0);
}
}