JBorder question


2003-12-23 08:44:27 PM
jbuilder0
Hi , I have a jpanel were i put some buttons on it ,
when using the application in jdk 1.2 the border is gone but weh using the
application i'll get an border wich is very annoying
because the panel height is equal to buttons heigt and with the border
around the buttons are half smaller
what can be the problem??
i'm using jbuilder 3
public class VideoControllPanel extends JToolBar {
JButton menubarplayButton = new JButton();
ResourceBundle recources ;
ResourceBundle images ;
public VideoControllPanel() {
try {
jbInit();
}
catch(Exception ex) {
ex.printStackTrace();
}
}
private void jbInit() throws Exception {
loopinimage = new ImageIcon(images.getString("LOOPIN"));
loopimage = new ImageIcon(images.getString("LOOP"));
setBackground(new java.awt.Color(76, 90, 109));
setForeground(new java.awt.Color(76, 90, 109));
setAlignmentX((float) 0.0);
//setBorder(null);
this.setOpaque(false);
setBorderPainted(false);
this.setBorder(null);
setFloatable(false);
this.setMargin(new Insets(0, 0, 0, 0));
menubarplayButton.setBackground(Color.white);
menubarplayButton.setMaximumSize(new Dimension(50, 20));
menubarplayButton.setMinimumSize(new Dimension(50, 20));
menubarplayButton.setPreferredSize(new Dimension(50, 20));
menubarplayButton.setMargin(new Insets(0, 0, 0, 0));
menubarplayButton.setIcon(new ImageIcon(images.getString("PLAY")));
menubarplayButton.setPressedIcon(new
ImageIcon(images.getString("PLAY_IN")));
menubarplayButton.setRolloverIcon(new
ImageIcon(images.getString("PLAY_OUT")));
menubarplayButton.setBorderPainted(false);
menubarplayButton.setBorder(null);
menubarplayButton.setFocusPainted(false);
this.setAlignmentX((float) 0.0);
this.setAlignmentY((float) 0.0);
.....
greetings Sven