try {
jmfSecurity = JMFSecurityManager.getJMFSecurity();
securityPrivelege = true;
} catch (SecurityException e) {
}
GridBagLayout gbl;
GridBagConstraints gbc = new GridBagConstraints();
this.gain = gain;
gain.addGainChangeListener(this);
setLayout(gbl = new GridBagLayout());
if (canChangeVolume()) {
gbc.insets = new Insets(0, 0, 0, 0);
gbc.gridheight = 2;
muteButton = new MuteButton();
add(muteButton);
gbl.setConstraints(muteButton, gbc);
gbc.gridx = 1;
gbc.gridheight = 1;
upButton = new VolumeButton("volumeUp.gif",
"volumeUp-active.gif",
"volumeUp-pressed.gif",
"volumeUp-disabled.gif",
"Increase volume",
VolumeIncrement);
add(upButton);
gbl.setConstraints(upButton, gbc);
gbc.gridy = 1;
downButton = new VolumeButton("volumeDown.gif",
"volumeDown-active.gif",
"volumeDown-pressed.gif",
"volumeDown-disabled.gif",
"Decrease volume",
-VolumeIncrement);
add(downButton);
gbl.setConstraints(downButton, gbc);
} else {
fUseVolumeControl=false;
muteButton = new MuteButton();
add(muteButton);
}