I'm making a project for school and having a little problem. I used frames with setUndecorated
and added code to make it movable using this: Making a java swing frame movable and setUndecorated
It works fine except for one frame where I am using a tabbedpane.
Here's an image explaining it better:
Here is my code where I make the tappedpane:
public Main() {
icon = new ImageIcon(getClass().getResource("usericon.png"));
icon2 = new ImageIcon(getClass().getResource("aboicon.png"));
icon3 = new ImageIcon(getClass().getResource("iconcoin.png"));
icon4 = new ImageIcon(getClass().getResource("icongewicht2.png"));
JTabbedPane jtbExample = new JTabbedPane();
JPanel Paneel1 = new Paneel1();
jtbExample.addTab("Klanten",icon , Paneel1);
jtbExample.setSelectedIndex(0);
JPanel Paneel2 = new Paneel2();
jtbExample.addTab("Abonnement",icon2, Paneel2);
JPanel Paneel3 = new Paneel3();
jtbExample.addTab("Geld opladen",icon3, Paneel3);
JPanel Paneel4 = new Paneel4();
jtbExample.addTab("Schema's",icon4, Paneel4);
// Add the tabbed pane to this panel.
setLayout(new BorderLayout());
add(jtbExample);
}
}
Thanks in advance