bertyhell 0 Newbie Poster

is this a bug in nimbus or am i doing something wrong?

i make this jframe:

package nimbus_bug;

import java.awt.BorderLayout;
import java.awt.Dimension;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.UIManager;

public class Main extends JFrame{

    public Main() {
	try {
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
        } catch (Exception e) {}
	this.setLayout(new BorderLayout());
	JTabbedPane tabbed = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT);
	this.add(tabbed,BorderLayout.CENTER);
	ImageIcon ico = new ImageIcon(getClass().getResource("/ico.png"));
	JPanel panel = new JPanel();
	panel.setPreferredSize(new Dimension(500,500));
	tabbed.addTab("tab1", ico, panel);
	pack();
    }



    public static void main(String[] args) {
        new Main().setVisible(true);
    }
}

the icon is in the wrong position:
http://i77.photobucket.com/albums/j74/bertyhell/nimbus_bug.png

does anyone know a work around?
can you reproduce this bug?

here is the netbeans project:
http://berty.110mb.com/files/nimbus_bug.rar

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.