My problem is that when adding .GIF to JPanel it shows this black square background for .GIF.
Result when adding to JPanel:

This happens when I use this line:
p2.add(loadBar);
However, when I add the same .GIF to the JFrame, there is no longer a black square. Like this:
jf.add(loadBar);
Result when added to JFrame:

Part of the class code:
String loadLink = "http://i.imgur.com/mHm6LYH.gif";
URL ajaxLoad = null;
try {
ajaxLoad = new URL(loadLink);
} catch (MalformedURLException e3) {
e3.printStackTrace();
}
ImageIcon loading = new ImageIcon(ajaxLoad);
JLabel loadBar = new JLabel(loading);
loadBar.setBounds(70, 60, 54, 55);
loadBar.setOpaque(false);
p2.add(loadBar);
Can someone explain why this is happening? Thanks for your time and reading.
EDIT:
p2 = new JPanel();
p2.setLayout(null);
p2.setBackground(new Color(0,0,0,150));
p2.setBorder(new LineBorder(Color.WHITE));
p2.setBounds(20, 20, 200, 150);
String loadLink = "http://i.imgur.com/mHm6LYH.gif";
URL ajaxLoad = null;
try {
ajaxLoad = new URL(loadLink);
} catch (MalformedURLException e3) {
e3.printStackTrace();
}
ImageIcon loading = new ImageIcon(ajaxLoad);
JLabel loadBar = new JLabel(loading);
loadBar.setBounds(70, 60, 54, 55);
loadBar.setOpaque(false);
p2.add(loadBar);
This is JPanel, which is shown in the first image without JLabel. I can not show the JFrame part in the code because it spreads throughout the class. But I don’t think the problem is with the JFrame, so this could be this JPanel: /