galera como posso adicionar 2 imagens diferentes, 1 para cada JPanel nessa aplicação?
public class Principal {
private JFrame frame;
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
Principal window = new Principal();
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
public Principal() {
initialize();
}
private void initialize() {
frame = new JFrame();
frame.setBounds(100, 100, 450, 300);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);
JPanel panel = new JPanel();
panel.setBounds(23, 21, 158, 203);
frame.getContentPane().add(panel);
JPanel panel_1 = new JPanel();
panel_1.setBounds(191, 21, 158, 203);
frame.getContentPane().add(panel_1);
}
}