import javax.swing.*;
import java.awt.*;
public class TabbedDemo {
public static void main(String[] args) {
String str;
JFrame frame = new JFrame("TESSTING");
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.setSize(500, 500);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
JTabbedPane tabbedPane = new JTabbedPane();
JPanel addPanel = new JPanel();
addPanel.add(new JLabel("KOKO"));
addPanel.add(new JButton("KOKO"));
addPanel.add(new JTextField("KOKO"));
JPanel updatePanel = new JPanel();
JPanel deletePanel = new JPanel();
JPanel showPanel = new JPanel();
tabbedPane.addTab("ADD", addPanel);
tabbedPane.addTab("UPDATE",updatePanel);
tabbedPane.addTab("DELETE",deletePanel);
tabbedPane.addTab("SHOW",showPanel);
frame.add(tabbedPane);
}
}
Добавить комментарий
|