Example usage for javax.swing JTabbedPane JTabbedPane

List of usage examples for javax.swing JTabbedPane JTabbedPane

Introduction

In this page you can find the example usage for javax.swing JTabbedPane JTabbedPane.

Prototype

public JTabbedPane(int tabPlacement) 

Source Link

Document

Creates an empty TabbedPane with the specified tab placement of either: JTabbedPane.TOP, JTabbedPane.BOTTOM, JTabbedPane.LEFT, or JTabbedPane.RIGHT.

Usage

From source file:Main.java

public static void main(String[] args) {
    JPanel ui = new JPanel(new BorderLayout(1, 1));
    JTabbedPane jtp = new JTabbedPane(JTabbedPane.LEFT);
    jtp.addTab("Apple", new JLabel("Apple"));
    jtp.addTab("Banana", new JLabel("Banana"));
    jtp.addTab("Cherries", new JLabel("Cherries"));
    jtp.addTab("Grapes", new JLabel("Grapes"));
    ui.add(jtp, BorderLayout.CENTER);
    jtp.setPreferredSize(new Dimension(200, 200));
    jtp.addChangeListener(e -> {/*from   w  ww  . j a  v a 2s. c o  m*/
        if (e.getSource() instanceof JTabbedPane) {
            JTabbedPane pane = (JTabbedPane) e.getSource();
            System.out.println("Selected paneNo : " + pane.getSelectedIndex());
        }
    });
}

From source file:org.jfree.chart.demo.LeftPanel.java

public LeftPanel(ArrayList<ChartPanel> graphics, ArrayList<Graphic> Grafs, ArrayList<JFreeChart> charts,
        ArrayList<XYSeries> Series) {
    //setBackground(new Color(152 ,134, 202));
    //setBackground(new Color(234 ,247, 202));
    setSize(800, 530);//  ww w . j  a  v a2  s . c  om
    setLayout(null);
    setBackground(new Color(176, 199, 246));

    JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
    tabbedPane.setBackground(new Color(174, 250, 127));

    tabbedPane.setFont(new Font("Arial", 15, 16));
    tabbedPane.setOpaque(false);

    tabbedPane.setBounds(7, 6, 750, 505);
    tabbedPane.setAlignmentY(Component.TOP_ALIGNMENT);
    add(tabbedPane);

    JPanel panel = new JPanel();
    panel.setBackground(new Color(176, 199, 246));
    panel.setToolTipText("Graphic 1");
    panel.add(graphics.get(0));
    panel.add(new bottom_slider(new Color(176, 199, 246), charts, Grafs.get(0), 0));
    tabbedPane.addTab("Graphic 1", null, panel, null);
    panel.setLayout(null);

    JPanel panel_2 = new JPanel();
    panel_2.add(graphics.get(1));
    tabbedPane.addTab("Graphic 2", null, panel_2, null);
    panel_2.setLayout(null);
    panel_2.setBackground(new Color(176, 199, 246));
    panel_2.add(new bottom_slider(new Color(176, 199, 246), charts, Grafs.get(1), 1));

    JPanel panel_1 = new JPanel();
    panel_1.add(graphics.get(2));
    tabbedPane.addTab("Graphic 3", null, panel_1, null);
    panel_1.setLayout(null);
    panel_1.setBackground(new Color(176, 199, 246));
    panel_1.add(new bottom_slider(new Color(176, 199, 246), charts, Grafs.get(2), 2));
    panel_1.setBackground(new Color(176, 199, 246));

    JPanel panel_3 = new JPanel();
    panel_3.add(graphics.get(3));
    tabbedPane.addTab("Graphic 4", null, panel_3, null);
    panel_3.setLayout(null);
    panel_3.setBackground(new Color(176, 199, 246));
    panel_3.add(new bottom_slider(new Color(176, 199, 246), charts, Grafs.get(3), 3));

    JPanel panel_4 = new JPanel();
    panel_4.add(graphics.get(4));
    tabbedPane.addTab("Graphic 5 ", null, panel_4, null);
    panel_4.setLayout(null);
    panel_4.setBackground(new Color(176, 199, 246));
    panel_4.add(new bottom_slider(new Color(176, 199, 246), charts, Grafs.get(4), 4));

    JPanel panel_5 = new JPanel();
    panel_5.add(graphics.get(5));
    tabbedPane.addTab("Graphic 6", null, panel_5, null);
    panel_5.setLayout(null);
    panel_5.setBackground(new Color(176, 199, 246));
    panel_5.add(new bottom_slider(new Color(176, 199, 246), charts, Grafs.get(5), 5));

    JPanel panel_6 = new JPanel();
    panel_6.add(graphics.get(6));
    tabbedPane.addTab("Graphic 7", null, panel_6, null);
    panel_6.setLayout(null);
    panel_6.setBackground(new Color(176, 199, 246));
    panel_6.add(new bottom_slider(new Color(176, 199, 246), charts, Grafs.get(6), 6));

    JPanel panel_7 = new JPanel();
    panel_7.add(graphics.get(7));
    tabbedPane.addTab("Graphic 8", null, panel_7, null);
    panel_7.setLayout(null);
    panel_7.setBackground(new Color(176, 199, 246));
    panel_7.add(new bottom_slider(new Color(176, 199, 246), charts, Grafs.get(7), 7));

    JPanel panel_8 = new JPanel();
    panel_8.add(new Bottom_panel(Grafs, Series, 5, 390, 735, 50));
    graphics.set(8, Grafs.get(8).get_ChartPanel(740, 390));
    panel_8.add(graphics.get(8));

    tabbedPane.addTab("Graphic 9", null, panel_8, null);
    panel_8.setLayout(null);
    panel_8.setBackground(new Color(176, 199, 246));

    JPanel panel_9 = new JPanel();
    panel_9.add(graphics.get(9));
    tabbedPane.addTab("Graphic 10", null, panel_9, null);
    panel_9.setLayout(null);
    panel_9.setBackground(new Color(176, 199, 246));

}

From source file:net.chunkyhosting.Roe.computer.CHGManager.gui.panels.Server.java

public Server() {

    setLayout(new BorderLayout(0, 0));
    JTabbedPane serverFunctions = new JTabbedPane(JTabbedPane.LEFT);

    serverFunctions.setBackground(Color.WHITE);
    this.setBackground(Color.WHITE);
    serverFunctions.addTab("Display", null, null, null);
    serverFunctions.addTab("File Manager", null, null, null);
    serverFunctions.addTab("Console", null, null, null);

    add(serverFunctions, BorderLayout.CENTER);

}

From source file:com.litt.core.security.license.gui.Gui.java

/**
 * Initialize the contents of the frame.
 *//*from  w w w .  j a  v  a 2s  .co m*/
private void initialize() {
    frame_security = new JFrame();
    frame_security.setBounds(100, 100, 640, 480);
    frame_security.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame_security.getContentPane().setLayout(new BorderLayout(0, 0));
    frame_security.setTitle("???");

    JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
    frame_security.getContentPane().add(tabbedPane, BorderLayout.CENTER);

    //???
    JPanel advancedPanel = new JPanel(new BorderLayout());
    tabbedPane.addTab("???", null, advancedPanel, null);

    JTabbedPane advanced_tabbedPane = new JTabbedPane(JTabbedPane.TOP);
    advancedPanel.add(advanced_tabbedPane);

    JPanel configPanel = new ConfigPanel(this);
    advanced_tabbedPane.addTab("?", null, configPanel, null);

    JPanel productPanel = new ProductPanel();
    advanced_tabbedPane.addTab("?", null, productPanel, null);

    JPanel customerPanel = new CustomerPanel();
    advanced_tabbedPane.addTab("?", null, customerPanel, null);

    //
    JPanel basePanel = new JPanel(new BorderLayout());
    tabbedPane.addTab("", null, basePanel, null);

    JTabbedPane base_tabbedPane = new JTabbedPane(JTabbedPane.TOP);
    basePanel.add(base_tabbedPane);

    JPanel keyPanel = new KeyPanel();
    base_tabbedPane.addTab("", null, keyPanel, null);

    JPanel licensePanel = new LicensePanel();
    base_tabbedPane.addTab("?", null, licensePanel, null);

    JPanel validatePanel = new ValidatePanel();
    base_tabbedPane.addTab("?", null, validatePanel, null);

    JPanel encryptPanel = new EncryptPanel();
    base_tabbedPane.addTab("?", null, encryptPanel, null);

    JPanel decryptPanel = new DecryptPanel();
    base_tabbedPane.addTab("?", null, decryptPanel, null);

}

From source file:utybo.easypastebin.windows.MainWindow.java

/**
 * Creates the window//  w  ww .j a  va 2  s .co m
 */
@SuppressWarnings({ "rawtypes", "unchecked" })
public MainWindow() {
    EasyPastebin.LOGGER.log("Initializing the window", SinkJLevel.INFO);
    setTitle("EasyPastebin");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setBounds(100, 100, 664, 431);
    contentPane = new JPanel();
    contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
    contentPane.setLayout(new BorderLayout(0, 0));
    setContentPane(contentPane);

    JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
    contentPane.add(tabbedPane, BorderLayout.CENTER);

    JPanel main = new JPanel();
    tabbedPane.addTab("EasyPastebin", null, main, null);
    main.setLayout(null);

    JScrollPane scrollPane = new JScrollPane();
    scrollPane.setBounds(62, 39, 312, 132);
    main.add(scrollPane);

    pasteContent = new JTextArea();
    pasteContent.setFont(new Font("Monospaced", Font.PLAIN, 11));
    pasteContent.setWrapStyleWord(true);
    pasteContent.setLineWrap(true);
    pasteContent.setToolTipText("Put your paste here!");
    scrollPane.setViewportView(pasteContent);

    JLabel titleLabel = new JLabel("Title :");
    titleLabel.setFont(new Font("Tahoma", Font.PLAIN, 12));
    titleLabel.setBounds(10, 11, 42, 21);
    main.add(titleLabel);

    pasteTitle = new JTextField();
    pasteTitle.setBounds(62, 12, 312, 20);
    main.add(pasteTitle);
    pasteTitle.setColumns(10);

    JLabel lblPaste = new JLabel("Paste :");
    lblPaste.setForeground(Color.RED);
    lblPaste.setFont(new Font("Tahoma", Font.PLAIN, 12));
    lblPaste.setBounds(10, 85, 53, 21);
    main.add(lblPaste);

    pasteExpireDate = new JComboBox();
    pasteExpireDate.setFont(new Font("Tahoma", Font.PLAIN, 12));
    pasteExpireDate.setModel(new DefaultComboBoxModel(EnumExpireDate.values()));
    pasteExpireDate.setBounds(468, 12, 155, 21);
    main.add(pasteExpireDate);

    JLabel lblExpireDate = new JLabel("Expire Date :");
    lblExpireDate.setFont(new Font("Tahoma", Font.PLAIN, 12));
    lblExpireDate.setBounds(384, 14, 81, 14);
    main.add(lblExpireDate);

    JLabel lblfieldsInRed = new JLabel("(Fields in red are required)");
    lblfieldsInRed.setBounds(72, 182, 302, 14);
    main.add(lblfieldsInRed);

    btnSubmit = new JButton("Submit!");
    btnSubmit.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent event) {
            EasyPastebin.LOGGER.log("Starting Submit script", SinkJLevel.INFO);
            btnSubmit.setEnabled(false);
            btnSubmit.setText("Please wait...");

            boolean success = true;
            String paste = pasteContent.getText();
            String title = pasteTitle.getText();
            EnumExpireDate expireDate = (EnumExpireDate) pasteExpireDate.getSelectedItem();

            if (paste.equals("") || paste.equals(" ") || paste.equals(null)) {
                pastebinUrl.setText("ERROR");
                JOptionPane.showMessageDialog(null, "You cannot send empty pastes!",
                        "Error while processing paste", JOptionPane.ERROR_MESSAGE);
            } else {
                try {
                    EasyPastebin.LOGGER.log("Setting options", SinkJLevel.INFO);
                    Map map = new HashMap<String, String>();
                    map.put("api_dev_key", HttpHelper.API_KEY);
                    map.put("api_option", "paste");
                    map.put("api_paste_code", paste);
                    if (!(expireDate.equals(null) || expireDate.equals(EnumExpireDate.NEVER)))
                        map.put("api_paste_expire_date", expireDate.getRawName());
                    if (!(title.equals("") || title.equals(" ") || title.equals(null)))
                        map.put("api_paste_name", title);

                    EasyPastebin.LOGGER.log("Sending paste", SinkJLevel.INFO);
                    String actionResult = HttpHelper.sendPost("http://pastebin.com/api/api_post.php", map)
                            .asString();
                    EasyPastebin.LOGGER.log("Paste sent, checking output", SinkJLevel.INFO);
                    // Exception handlers
                    if (actionResult.equals("Bad API request, invalid api_option")) {
                        success = false;
                        EasyPastebin.LOGGER.log(
                                "The output is an error message : " + actionResult + ". Submit script failed!",
                                SinkJLevel.ERROR);
                        JOptionPane.showMessageDialog(null,
                                "Error while processing paste. Incorrect Pastebin option!", "Error",
                                JOptionPane.ERROR_MESSAGE);
                    }
                    if (actionResult.equals("Bad API request, invalid api_dev_key")) {
                        success = false;
                        EasyPastebin.LOGGER.log(
                                "The output is an error message : " + actionResult + ". Submit script failed!",
                                SinkJLevel.ERROR);
                        JOptionPane.showMessageDialog(null,
                                "Error while processing paste. Incorrect dev key! Try again with a more recent version!",
                                "Error", JOptionPane.ERROR_MESSAGE);
                    }
                    if (actionResult.equals("Bad API request, IP blocked")) {
                        success = false;
                        EasyPastebin.LOGGER.log(
                                "The output is an error message : " + actionResult + ". Submit script failed!",
                                SinkJLevel.ERROR);
                        JOptionPane.showMessageDialog(null, "Error while processing paste. Your IP is blocked!",
                                "Error", JOptionPane.ERROR_MESSAGE);
                    }
                    if (actionResult.equals(
                            "Bad API request, maximum number of 25 unlisted pastes for your free account")) {
                        success = false;
                        EasyPastebin.LOGGER.log(
                                "The output is an error message : " + actionResult + ". Submit script failed!",
                                SinkJLevel.ERROR);
                    }
                    if (actionResult.equals(
                            "Bad API request, maximum number of 10 private pastes for your free account")) {
                        success = false;
                        EasyPastebin.LOGGER.log(
                                "The output is an error message : " + actionResult + ". Submit script failed!",
                                SinkJLevel.ERROR);
                    }
                    if (actionResult.equals("Bad API request, api_paste_code was empty")) {
                        success = false;
                        EasyPastebin.LOGGER.log(
                                "The output is an error message : " + actionResult + ". Submit script failed!",
                                SinkJLevel.ERROR);
                    }
                    if (actionResult.equals("Bad API request, maximum paste file size exceeded")) {
                        success = false;
                        EasyPastebin.LOGGER.log(
                                "The output is an error message : " + actionResult + ". Submit script failed!",
                                SinkJLevel.ERROR);
                        JOptionPane.showMessageDialog(null,
                                "Error while processing paste. Your paste is too big!", "Error",
                                JOptionPane.ERROR_MESSAGE);
                    }
                    if (actionResult.equals("Bad API request, invalid api_expire_date")) {
                        success = false;
                        EasyPastebin.LOGGER.log(
                                "The output is an error message : " + actionResult + ". Submit script failed!",
                                SinkJLevel.ERROR);
                        JOptionPane.showMessageDialog(null,
                                "Error while processing paste. Invalid expire date!", "Error",
                                JOptionPane.ERROR_MESSAGE);
                    }
                    if (actionResult.equals("Bad API request, invalid api_paste_private")) {
                        success = false;
                        EasyPastebin.LOGGER.log(
                                "The output is an error message : " + actionResult + ". Submit script failed!",
                                SinkJLevel.ERROR);
                        JOptionPane.showMessageDialog(null,
                                "Error while processing paste. Invalid privacy value!", "Error",
                                JOptionPane.ERROR_MESSAGE);
                    }
                    if (actionResult.equals("Bad API request, invalid api_paste_format")) {
                        success = false;
                        EasyPastebin.LOGGER.log(
                                "The output is an error message : " + actionResult + ". Submit script failed!",
                                SinkJLevel.ERROR);
                        JOptionPane.showMessageDialog(null, "Error while processing paste. Invalid format!",
                                "Error", JOptionPane.ERROR_MESSAGE);
                    }
                    // END

                    // Starting display stuff
                    if (success == false) {
                        EasyPastebin.LOGGER.log("Submit script failed : success == false", SinkJLevel.ERROR);
                        pastebinUrl.setText("ERROR");
                    }
                    if (success == true) {
                        EasyPastebin.LOGGER.log("Paste sent! Starting display script!", SinkJLevel.INFO);
                        pastebinUrl.setText(actionResult);
                        JOptionPane.showMessageDialog(null, "Paste successfully sent!", "Done!",
                                JOptionPane.INFORMATION_MESSAGE);
                        EasyPastebin.LOGGER.log("Display script finished! Paste URL is : " + actionResult,
                                SinkJLevel.INFO);
                    }

                } catch (ClientProtocolException e) {
                    EasyPastebin.LOGGER.log("Unexpected error! " + e, SinkJLevel.ERROR);
                    JOptionPane.showMessageDialog(null, "Error while processing paste : " + e, "Error",
                            JOptionPane.ERROR_MESSAGE);
                    e.printStackTrace();
                } catch (IOException e) {
                    EasyPastebin.LOGGER.log("Unexpected error! " + e, SinkJLevel.ERROR);
                    JOptionPane.showMessageDialog(null, "Error while processing paste : " + e, "Error",
                            JOptionPane.ERROR_MESSAGE);
                    e.printStackTrace();
                } catch (MissingParamException e) {
                    EasyPastebin.LOGGER.log("Unexpected error! " + e, SinkJLevel.ERROR);
                    JOptionPane.showMessageDialog(null, "Error while processing paste : " + e
                            + "! This is a severe programming error! Try again with a more recent version!",
                            "Error", JOptionPane.ERROR_MESSAGE);
                    e.printStackTrace();
                }
            }

            EasyPastebin.LOGGER.log("Re-enabling the Submit button ", SinkJLevel.INFO);
            btnSubmit.setEnabled(true);
            btnSubmit.setText("Submit another paste!");
            EasyPastebin.LOGGER.log("Finished submit script! Success : " + success, SinkJLevel.INFO);
        }
    });
    btnSubmit.setBounds(386, 45, 237, 44);
    main.add(btnSubmit);

    pastebinUrl = new JTextField();
    pastebinUrl.setText("The paste's URL will be shown here!");
    pastebinUrl.setEditable(false);
    pastebinUrl.setBounds(384, 198, 239, 32);
    main.add(pastebinUrl);
    pastebinUrl.setColumns(10);

    JPanel about = new JPanel();
    tabbedPane.addTab("About", null, about, null);

    JLabel label = new JLabel("EasyPastebin");
    label.setBounds(12, 12, 623, 39);
    label.setHorizontalAlignment(SwingConstants.CENTER);
    label.setFont(new Font("Dialog", Font.PLAIN, 25));

    JLabel lblTheEasiestWay = new JLabel("The easiest way to use Pastebin.com");
    lblTheEasiestWay.setBounds(12, 63, 623, 32);
    lblTheEasiestWay.setFont(new Font("Dialog", Font.PLAIN, 16));
    lblTheEasiestWay.setHorizontalAlignment(SwingConstants.CENTER);
    about.setLayout(null);
    about.add(label);
    about.add(lblTheEasiestWay);

    JButton btnForkM = new JButton("Fork me on Github!");
    btnForkM.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            goToUrl("https://github.com/utybo/EasyPastebin");
        }
    });
    btnForkM.setBounds(12, 117, 623, 25);
    about.add(btnForkM);

    JButton btnCheckOutUtybos = new JButton("Check out utybo's projects!");
    btnCheckOutUtybos.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            goToUrl("http://utybo.github.io/");
        }
    });
    btnCheckOutUtybos.setBounds(12, 154, 623, 25);
    about.add(btnCheckOutUtybos);

    JButton btnGoToPastebincom = new JButton("Go to Pastebin.com!");
    btnGoToPastebincom.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            goToUrl("http://www.pastebin.com");
        }
    });
    btnGoToPastebincom.setBounds(12, 191, 623, 25);
    about.add(btnGoToPastebincom);

    JLabel lblcUtybo = new JLabel(
            "This soft was made by utybo. It uses Apache's libraries for the interaction with Pastebin's API");
    lblcUtybo.setFont(new Font("Dialog", Font.PLAIN, 10));
    lblcUtybo.setHorizontalAlignment(SwingConstants.CENTER);
    lblcUtybo.setBounds(12, 324, 623, 15);
    about.add(lblcUtybo);

    JLabel lblClickMeTo = new JLabel("Click me to go to Apache's licence official website");
    lblClickMeTo.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseClicked(MouseEvent e) {
            goToUrl("http://www.apache.org/licenses/LICENSE-2.0");
        }
    });
    lblClickMeTo.setHorizontalAlignment(SwingConstants.CENTER);
    lblClickMeTo.setFont(new Font("Dialog", Font.PLAIN, 10));
    lblClickMeTo.setBounds(12, 342, 623, 15);
    about.add(lblClickMeTo);

    setVisible(true);

    EasyPastebin.LOGGER.log("Done!", SinkJLevel.INFO);
}

From source file:de.speedprog.lantools.modules.about.AboutPanel.java

private void initialize() {
    setLayout(new FormLayout(
            new ColumnSpec[] { FormFactory.LABEL_COMPONENT_GAP_COLSPEC, ColumnSpec.decode("default:grow"), },
            new RowSpec[] { FormFactory.LINE_GAP_ROWSPEC, RowSpec.decode("default:grow"), }));
    tabbedPane = new JTabbedPane(JTabbedPane.TOP);
    tabbedPane.setPreferredSize(new Dimension(5, 200));
    tabbedPane.setMaximumSize(new Dimension(32767, 300));
    add(tabbedPane, "2, 2, fill, fill");
    panelAppInfo = new JPanel();
    tabbedPane.addTab("Application Info", null, panelAppInfo, null);
    panelAppInfo.setLayout(new FormLayout(new ColumnSpec[] { ColumnSpec.decode("168px:grow"), },
            new RowSpec[] { FormFactory.LINE_GAP_ROWSPEC, RowSpec.decode("default:grow"), }));
    scrollPaneAppInfo = new JScrollPane();
    panelAppInfo.add(scrollPaneAppInfo, "1, 2, fill, fill");
    textPaneAppInfo = new JTextPane();
    textPaneAppInfo.setEditable(false);/*from  ww  w .jav  a  2s. c  o  m*/
    textPaneAppInfo.setText(APP_INFO);
    scrollPaneAppInfo.setViewportView(textPaneAppInfo);
    panelDepInfo = new JPanel();
    tabbedPane.addTab("Dependency Information", null, panelDepInfo, null);
    panelDepInfo.setLayout(new FormLayout(
            new ColumnSpec[] { FormFactory.LABEL_COMPONENT_GAP_COLSPEC, ColumnSpec.decode("default:grow"), },
            new RowSpec[] { FormFactory.LINE_GAP_ROWSPEC, RowSpec.decode("default:grow"), }));
    scrollPaneDepInfo = new JScrollPane();
    panelDepInfo.add(scrollPaneDepInfo, "2, 2, fill, fill");
    textPaneDepInfo = new JTextPane();
    textPaneDepInfo.setEditable(false);
    textPaneDepInfo.setContentType("text/html");
    textPaneDepInfo.setText(DEP_INFO);
    scrollPaneDepInfo.setViewportView(textPaneDepInfo);
}

From source file:org.jfree.chart.demo.Display.java

/**
 * Initialize the contents of the frame.
 *///from  w w  w . j  a v a 2  s. c  o  m
private void initialize() {
    frame = new JFrame();
    frame.setBounds(100, 100, frameW, frameH);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().setLayout(null);

    tabbedPane = new JTabbedPane(JTabbedPane.TOP);
    tabbedPane.setBounds(12, 5, 1200, 700);
    frame.getContentPane().add(tabbedPane);

    panel = new JPanel();
    tabbedPane.addTab("Parameters", null, panel, null);
    panel.setLayout(null);

    txtMass = new JTextField();
    txtMass.setText("0.0");
    txtMass.setBounds(307, 63, 114, 19);
    panel.add(txtMass);
    txtMass.setColumns(10);

    txtLength = new JTextField();
    txtLength.setText("0.0");
    txtLength.setBounds(307, 94, 114, 19);
    panel.add(txtLength);
    txtLength.setColumns(10);

    txtZenith = new JTextField();
    txtZenith.setText("0.0");
    txtZenith.setBounds(307, 125, 114, 19);
    panel.add(txtZenith);
    txtZenith.setColumns(10);

    JLabel lblInitialConditions = new JLabel("Initial Conditions");
    lblInitialConditions.setBounds(307, 36, 120, 15);
    panel.add(lblInitialConditions);

    JButton btnSetParam = new JButton("Set Param");
    btnSetParam.setBounds(445, 31, 107, 25);
    panel.add(btnSetParam);

    JLabel lblMass = new JLabel("Mass");
    lblMass.setBounds(438, 65, 70, 15);
    panel.add(lblMass);

    JLabel lblLength = new JLabel("Length");
    lblLength.setBounds(439, 96, 70, 15);
    panel.add(lblLength);

    JLabel lblZenithAngle = new JLabel("Zenith Angle");
    lblZenithAngle.setBounds(439, 122, 114, 25);
    panel.add(lblZenithAngle);

    RAzimuth = new JTextField();
    RAzimuth.setText("0.0");
    RAzimuth.setBounds(307, 156, 114, 19);
    panel.add(RAzimuth);
    RAzimuth.setColumns(10);

    JLabel lblReleaseAzimuth = new JLabel("Release Azimuth");
    lblReleaseAzimuth.setBounds(438, 158, 131, 15);
    panel.add(lblReleaseAzimuth);

    TAzimuth = new JTextField();
    TAzimuth.setText("0.0");
    TAzimuth.setBounds(307, 187, 114, 19);
    panel.add(TAzimuth);
    TAzimuth.setColumns(10);

    JLabel lblTabletAzimuth = new JLabel("Tablet Azimuth");
    lblTabletAzimuth.setBounds(438, 189, 124, 15);
    panel.add(lblTabletAzimuth);

    TimeElapsed = new JTextField();
    TimeElapsed.setBounds(719, 63, 114, 19);
    panel.add(TimeElapsed);
    TimeElapsed.setColumns(10);

    JLabel lblTimeElapsed = new JLabel("Time Elapsed");
    lblTimeElapsed.setBounds(863, 65, 147, 15);
    panel.add(lblTimeElapsed);

    AzDisp = new JTextField();
    AzDisp.setBounds(719, 125, 114, 19);
    panel.add(AzDisp);
    AzDisp.setColumns(10);

    JLabel lblAzimuthalDisplacement = new JLabel("Azimuthal Displacement");
    lblAzimuthalDisplacement.setBounds(863, 127, 182, 15);
    panel.add(lblAzimuthalDisplacement);

    Lat = new JTextField();
    Lat.setBounds(719, 187, 114, 19);
    panel.add(Lat);
    Lat.setColumns(10);

    JLabel lblLatitude = new JLabel("Latitude");
    lblLatitude.setBounds(866, 189, 70, 15);
    panel.add(lblLatitude);

    JLabel lblCalculations = new JLabel("Calculations");
    lblCalculations.setBounds(719, 36, 114, 15);
    panel.add(lblCalculations);

    EffXInput = new JTextField();
    EffXInput.setText("15240");
    EffXInput.setBounds(307, 303, 114, 19);
    panel.add(EffXInput);
    EffXInput.setColumns(10);

    EffYInput = new JTextField();
    EffYInput.setText("9298");
    EffYInput.setBounds(307, 340, 114, 19);
    panel.add(EffYInput);
    EffYInput.setColumns(10);

    JLabel lblTabletSettings = new JLabel("Tablet Settings");
    lblTabletSettings.setBounds(326, 270, 114, 15);
    panel.add(lblTabletSettings);

    JLabel lblNumberOfEffective = new JLabel("Number of Effective Lines in X Area");
    lblNumberOfEffective.setBounds(438, 305, 270, 15);
    panel.add(lblNumberOfEffective);

    JLabel lblNumberOfEffective_1 = new JLabel("Number of Effective Lines in Y Area");
    lblNumberOfEffective_1.setBounds(438, 342, 251, 15);
    panel.add(lblNumberOfEffective_1);

    JButton btnApplySettings = new JButton("Apply Settings");
    btnApplySettings.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            effectiveX = Integer.parseInt(EffXInput.getText());
            effectiveY = Integer.parseInt(EffYInput.getText());
        }
    });
    btnApplySettings.setBounds(452, 265, 153, 25);
    panel.add(btnApplySettings);

    JButton startbtn = new JButton("Begin Data Collection");
    startbtn.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            enabled = true;
        }
    });
    startbtn.setBounds(826, 300, 219, 25);
    panel.add(startbtn);

    JButton endbtn = new JButton("End Data Collection");
    endbtn.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            enabled = false;
        }
    });
    endbtn.setBounds(826, 352, 219, 25);
    panel.add(endbtn);

    btnSetParam.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
            analysis.setZenith(Double.parseDouble(txtZenith.getText()));
            analysis.setLength(Double.parseDouble(txtLength.getText()));
            analysis.setMass(Double.parseDouble(txtMass.getText()));
            analysis.setRAzimuth(Double.parseDouble(RAzimuth.getText()));
            analysis.setTAzimuth(Double.parseDouble(TAzimuth.getText()));

        }
    });

    panel_1 = new ScatterCanvas(frameW, frameH, effectiveX, effectiveY);
    tabbedPane.addTab("Position", null, panel_1, null);

    //panel_2 = new ScatterCanvas();
    tabbedPane.addTab("Angular Displacement", null, panel_2, null);
}

From source file:org.fhaes.FHRecorder.FireHistoryRecorder.java

private void initComponents() {

    addWindowListener(new WindowAdapter() {

        public void windowClosing(WindowEvent e) {

            closeAfterRunningChecks();/*from   w ww  .j  a v  a 2  s .co m*/

        }

    });

    setMinimumSize(new java.awt.Dimension(950, 675));
    setResizable(true);

    getContentPane().setLayout(new MigLayout("", "[810px,grow]", "[466.00,grow][42.00]"));

    tabbedPane = new JTabbedPane(JTabbedPane.TOP);
    getContentPane().add(tabbedPane, "cell 0 0,grow");

    sampleInputHolder = new JPanel();
    siteInfoHolder = new JPanel();

    sampleInputHolder.setLayout(new BorderLayout());
    siteInfoHolder.setLayout(new BorderLayout());

    tabbedPane.addTab("Data", null, sampleInputHolder, null);
    tabbedPane.addTab("Metadata", null, siteInfoHolder, null);

    summaryHolder = new JPanel();
    tabbedPane.addTab("Summary", null, summaryHolder, null);

    graphicsHolder = new JPanel();
    tabbedPane.addTab("Graphics", null, graphicsHolder, null);
    graphicsHolder.setLayout(new BorderLayout(0, 0));

    chartScrollBar = new JScrollBar();
    chartScrollBar.setMaximum(110);
    chartScrollBar.addAdjustmentListener(new AdjustmentListener() {
        public void adjustmentValueChanged(AdjustmentEvent arg0) {
            if (graphicsPanel != null) {
                graphicsPanel.updateVisibleYears(chartScrollBar.getValue());
            }
        }
    });
    chartScrollBar.setOrientation(JScrollBar.HORIZONTAL);
    graphicsHolder.add(chartScrollBar, BorderLayout.SOUTH);

    fileErrorHolder = new JPanel();
    tabbedPane.addTab("File Errors", null, fileErrorHolder, null);

    panelButtonBar = new JPanel();
    getContentPane().add(panelButtonBar, "cell 0 1,alignx right,growy");

    useLimitsCheckBox = new JCheckBox("Keep FHX2 Limitations");
    panelButtonBar.add(useLimitsCheckBox);
    useLimitsCheckBox.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            siteInfo.setLimitRestriction(useLimitsCheckBox.isSelected());
        }
    });

    btnSave = new JButton("Save");
    panelButtonBar.add(btnSave);
    btnSave.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent e) {
            saveMenuItemActionPerformed(e);
        }

    });

    btnClose = new JButton("Close");
    btnClose.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent arg0) {
            closeAfterRunningChecks();
        }

    });
    panelButtonBar.add(btnClose);

    btnCancel = new JButton("Discard changes");
    panelButtonBar.add(btnCancel);
    btnCancel.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent arg0) {
            Controller.filePath = null;
            setVisible(false);

        }

    });

    pack();
}

From source file:gdt.jgui.tool.JEntityEditor.java

/**
 * The default consturctor.//from  ww w.j  a  v  a 2  s  .c o  m
 */
public JEntityEditor() {
    setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
    tabbedPane = new JTabbedPane(JTabbedPane.TOP);
    add(tabbedPane);
}

From source file:com.eviware.soapui.impl.wsdl.panels.teststeps.WsdlTestRequestDesktopPanel.java

private Component buildLogPanel() {
    JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.RIGHT);
    tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);

    logArea = new JTextArea();
    logArea.setEditable(false);/*from  w  ww  . j a  v a 2s.co m*/
    logArea.setToolTipText("Request Log");

    JPanel panel = new JPanel(new BorderLayout());
    panel.add(new JScrollPane(logArea), BorderLayout.CENTER);

    tabbedPane.addTab("Assertions", buildAssertionsPanel());
    tabbedPane.addTab("Request Log", panel);
    return UISupport.createTabPanel(tabbedPane, true);
}