Urgent JTabbedPane Help !!!!!!!!!!!
Hi everybody,
I have a big problem, I'm getting a line under my tab when adding the pane in a borderlayout. All I nedd is to see only tabs so I set the size so that I can only see my tabs, but it shows me a line all the way and I don't want this line to appear. Here is a piece of code for reference to compile and see the line that I want to get rid of.
# start of example
import javax.swing.event.*;
import javax.swing.*;
import javax.swing.border.Border;
import java.awt.*;
import java.awt.event.*;
public class TabbedPaneDemo extends JPanel {
public TabbedPaneDemo() {
JTabbedPane tabbedPane = new JTabbedPane();
tabbedPane.setBorder( BorderFactory.createEmptyBorder ( 0, 0, 0, 0 ) );
tabbedPane.setPreferredSize( new Dimension( 100, 23 ) );
JPanel panel1 = new JPanel();
panel1.setBorder( BorderFactory.createEmptyBorder ( 0, 0, 0, 0 ) );
tabbedPane.addTab("TAB 1", panel1);
//Add the tabbed pane to this panel.
this.setLayout(new BorderLayout());
this.add(tabbedPane, BorderLayout.NORTH);
}
public static void main(String[] args) {
JFrame frame = new JFrame("TabbedPaneDemo");
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {System.exit(0);}
});
frame.getContentPane().add(new TabbedPaneDemo(),
BorderLayout.CENTER);
frame.setSize(400, 125);
frame.setVisible(true);
}
}
# end of the example
if you compile and run the above example you'll see what line I am talking about. I'll really appreciate for any help I am stuck with this for a week now and no luck so far. Any help is appreciated. Thanks

