Example usage for com.jgoodies.forms.layout FormLayout FormLayout

List of usage examples for com.jgoodies.forms.layout FormLayout FormLayout

Introduction

In this page you can find the example usage for com.jgoodies.forms.layout FormLayout FormLayout.

Prototype

public FormLayout(ColumnSpec[] colSpecs, RowSpec[] rowSpecs) 

Source Link

Document

Constructs a FormLayout using the given column and row specifications.

Usage

From source file:com.jhash.oimadmin.ui.EventHandlerUI.java

License:Apache License

public JPanel buildEventHandlerUI() {
    logger.debug("Trying to create New Event Handler screen");
    JPanel newEventHandlerPanel = new JPanel(new BorderLayout());
    FormLayout eventHandlerFormLayout = new FormLayout(
            "right:pref, 3dlu, pref, 7dlu, right:pref, 3dlu, pref:grow",
            "p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu");
    eventHandlerFormLayout.setColumnGroups(new int[][] { { 1, 5 } });
    CellConstraints cellConstraint = new CellConstraints();
    PanelBuilder builder = new PanelBuilder(eventHandlerFormLayout);
    builder.addLabel("Name", cellConstraint.xy(1, 1));
    builder.add(nameField, cellConstraint.xy(3, 1));
    builder.addLabel("Type", cellConstraint.xy(5, 1));
    builder.add(eventHandlerTypes, cellConstraint.xy(7, 1));

    builder.addLabel("Entity Type", cellConstraint.xy(1, 3));
    builder.add(entityType, cellConstraint.xy(3, 3));
    builder.addLabel("Operation", cellConstraint.xy(5, 3));
    builder.add(operationType, cellConstraint.xy(7, 3));

    builder.addLabel("Order", cellConstraint.xy(1, 5));
    builder.add(orderField, cellConstraint.xy(3, 5));
    builder.addLabel("Type of orchestration", cellConstraint.xy(5, 5));
    builder.add(orcTargetLabel, cellConstraint.xy(7, 5));

    builder.addLabel("Synchronous ?", cellConstraint.xy(1, 7));
    builder.add(syncCheckBox, cellConstraint.xy(3, 7));
    builder.addLabel("Internal Transaction ?", cellConstraint.xy(1, 9));
    builder.add(txCheckBox, cellConstraint.xy(3, 9));

    builder.addLabel("Stage", cellConstraint.xy(5, 7));
    builder.add(stageComboBox, cellConstraint.xy(7, 7));

    builder.addLabel("Class", cellConstraint.xy(1, 11));
    builder.add(classNameText, cellConstraint.xyw(3, 11, 5));
    // builder.addLabel("MDS Location", cellConstraint.xy(1, 13));
    // builder.add(new JGTextField("/custom/eventhandler.xml"),
    // cellConstraint.xyw(3, 13, 5));

    JideTabbedPane newEventHandlerControlPane = new JideTabbedPane();
    newEventHandlerControlPane.setTabShape(JideTabbedPane.SHAPE_ROUNDED_FLAT);
    newEventHandlerControlPane.setColorTheme(JideTabbedPane.COLOR_THEME_OFFICE2003);
    newEventHandlerControlPane.setTabResizeMode(JideTabbedPane.RESIZE_MODE_NONE);
    newEventHandlerControlPane.setUseDefaultShowCloseButtonOnTab(false);
    newEventHandlerControlPane.setBoldActiveTab(true);
    newEventHandlerControlPane.setShowCloseButtonOnTab(true);
    newEventHandlerControlPane.addTab(javaCompiler.getName(), javaCompiler.getComponent());
    newEventHandlerControlPane.addTab("Configure", configurationPanel.getComponent());
    newEventHandlerControlPane.addTab("Package", packagePanel.getComponent());

    JideSplitPane eventHandlerSplitPane = new JideSplitPane(JideSplitPane.VERTICAL_SPLIT);
    eventHandlerSplitPane.add(builder.build(), 0);
    eventHandlerSplitPane.add(newEventHandlerControlPane, 1);
    eventHandlerSplitPane.setProportionalLayout(true);
    eventHandlerSplitPane.setProportions(new double[] { 0.3 });
    newEventHandlerPanel.add(eventHandlerSplitPane);
    logger.debug("Completed creation of New Event Handler screen");
    return newEventHandlerPanel;
}

From source file:com.l2fprod.skinbuilder.cmd.BuildStylePanel.java

License:Apache License

public BuildStylePanel() {
    super();//w  w  w.j a va2 s . co  m
    setLayout(new FormLayout(
            new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC,
                    new ColumnSpec("default:grow(1.0)") },
            new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
                    FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, new RowSpec("default") }));

    themeJarFileLabel = new JLabel();
    themeJarFileLabel.setText("Theme Jar File:");
    add(themeJarFileLabel, new CellConstraints());

    themeClassnameLabel = new JLabel();
    themeClassnameLabel.setText("Theme Classname:");
    add(themeClassnameLabel, new CellConstraints(1, 3));

    themeJarFileEditor = new FilePropertyEditor(false);
    themeJarFile = themeJarFileEditor.getCustomEditor();
    add(themeJarFile, new CellConstraints(3, 1));

    themeClassname = new JTextField();
    themeClassname.setText("com.l2fprod.synth.Theme");
    add(themeClassname, new CellConstraints(3, 3));

    exampleComacmecorpthemesfirstthemeLabel = new JLabel();
    exampleComacmecorpthemesfirstthemeLabel.setFont(new Font("", Font.ITALIC, 10));
    exampleComacmecorpthemesfirstthemeLabel.setText("example: com.acmecorp.themes.FirstTheme");
    add(exampleComacmecorpthemesfirstthemeLabel, new CellConstraints(3, 5));

    themeClassname.setName("BuildStyle.classname");
    UserPreferences.track(themeClassname);
}

From source file:com.luxsoft.siipap.swing.views.WelcomeView.java

License:Open Source License

/**
 * Builds and returns the panel.//w  w  w.  jav a 2s  .com
 */
protected JComponent buildContent() {
    initComponents();

    FormLayout layout = new FormLayout("9dlu, left:pref:grow",
            "b:pref, c:pref, t:pref, 9dlu, pref, 6dlu, pref");
    PanelBuilder builder = new PanelBuilder(layout, new GradientBackgroundPanel(false));
    builder.getPanel().setOpaque(false);
    builder.setBorder(Borders.DLU14_BORDER);

    CellConstraints cc = new CellConstraints();

    builder.add(welcomeLabel, cc.xyw(1, 1, 2));
    builder.add(logoLabel, cc.xyw(1, 2, 2, "left, center"));
    builder.add(selectLabel, cc.xyw(1, 3, 2));

    return builder.getPanel();
}

From source file:com.lyndir.lhunath.opal.gui.template.shade.AbstractUi.java

License:Apache License

/**
 * Override this method if you have stuff that needs to be initialized before or after the UI building.<br> <br> Don't forget to call
 * super.buildUi() as well.//from   w  w  w. ja  v  a 2 s. c  om
 */
protected void buildUi() {

    /* Container. */
    contentPane = new JPanel(new BorderLayout());
    contentPane.add(contentPanel = PaintPanel.gradientPanel());
    FormLayout layout = new FormLayout("0dlu, 0dlu, 0dlu:g, 0dlu, r:p", "t:m, f:0dlu:g, 4dlu, m");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout, contentPanel);
    layout.setColumnGroups(new int[][] { { 1, 5 } });
    builder.setDefaultDialogBorder();

    /* Prepare the look and feel. */
    execute(BasicRequest.THEME, false);

    /* Header */
    logo = new JLabel();
    logo.setHorizontalAlignment(SwingConstants.CENTER);
    logo.addMouseListener(new MouseAdapter() {

        @Override
        public void mouseClicked(MouseEvent e) {

            if (e.getButton() == MouseEvent.BUTTON3)
                BaseConfig.dump();
            else
                toggleOverlay();
        }
    });

    titleBar = new JPanel(new FlowLayout(FlowLayout.RIGHT));
    titleBar.setLayout(new BoxLayout(titleBar, BoxLayout.X_AXIS));
    titleBar.setOpaque(false);

    windowedTitleButton = new JButton(UIUtils.getIcon("windowed-sss.png"));
    windowedTitleButton.setActionCommand("windowed");
    windowedTitleButton.addActionListener(this);
    windowedTitleButton.setBorderPainted(false);
    windowedTitleButton.setContentAreaFilled(false);
    fullscreenTitleButton = new JButton(UIUtils.getIcon("fullscreen-sss.png"));
    fullscreenTitleButton.setActionCommand("fullscreen");
    fullscreenTitleButton.addActionListener(this);
    fullscreenTitleButton.setBorderPainted(false);
    fullscreenTitleButton.setContentAreaFilled(false);
    closeTitleButton = new JButton(UIUtils.getIcon("close-sss.png"));
    closeTitleButton.setActionCommand("close");
    closeTitleButton.addActionListener(this);
    closeTitleButton.setBorderPainted(false);
    closeTitleButton.setContentAreaFilled(false);
    titleBar.add(closeTitleButton);

    builder.nextColumn(2);
    builder.append(logo);
    builder.append(titleBar);

    /* Panels */
    window = new SimpleInternalFrame(null, new JToolBar(), null, true);
    window.setSelected(true);
    window.setOpaque(false);

    /* Tabs */
    List<Tab> tabs = appendCustomTabs();
    tabs.addAll(buildTabs());
    for (Plugin plugin : plugins) {
        List<? extends Tab> pluginTabs = plugin.buildTabs();
        if (pluginTabs != null)
            tabs.addAll(pluginTabs);
    }
    for (Tab tab : tabs)
        tab.setAction(addPanelButton(tab));
    if (showingTab == null)
        showingTab = tabs.get(0);
    execute(BasicRequest.PANEL, false);
    builder.append(window, 5);
    builder.nextLine(2);

    progress = new JProgressBar() {

        @Override
        public void repaint(long tm, int x, int y, int width, int height) {

            setOpaque(getValue() != 0 || isIndeterminate());

            if (getParent() != null)
                getParent().repaint(tm, x, y, width, height);
            super.repaint(tm, x, y, width, height);
        }

        @Override
        protected void paintComponent(Graphics g) {

            super.paintComponent(g);

            if (isOpaque()) {
                ((Graphics2D) g).setPaint(getBackground());
                g.drawRect(0, 0, getWidth() - 1, getHeight() - 1);
            }
        }
    };

    progress.setString("");
    progress.setStringPainted(true);
    progress.setBorderPainted(false);
    progress.setBackground(UIUtils.setAlpha(progress.getBackground(), 100));

    for (int level = 0; level <= 5; ++level) {
        messageStack.add(new Stack<String>());
        progressStack.add(0d);
    }

    builder.append(progress, 5);

    /* Frame. */
    execute(BasicRequest.LOGO, false);
    execute(BasicRequest.FULLSCREEN, false);
}

From source file:com.lyndir.lhunath.opal.gui.template.shade.AbstractUi.java

License:Apache License

private JComponent getOperationsPane() {

    FormLayout layout = new FormLayout("10dlu, 15dlu, p:g, 10dlu, p:g, 15dlu, 10dlu", //$NON-NLS-1$
            "0dlu, f:1dlu:g, 5dlu, p, 10dlu"); //$NON-NLS-1$
    layout.setColumnGroups(new int[][] { { 3, 5 } });

    JButton button;//from   w ww  . j a v  a  2  s.  c  o m
    PanelBuilder builder = new PanelBuilder(layout, new ScrollPanel());
    CellConstraints constraints = new CellConstraints();

    log = new JEditorPane("text/html", "");
    log.setOpaque(false);
    log.setEditable(false);

    JScrollPane pane = new JScrollPane(log);
    pane.setBorder(Borders.EMPTY_BORDER);
    pane.setOpaque(false);
    pane.getViewport().setOpaque(false);
    builder.add(pane, constraints.xyw(2, 2, 5));

    button = new JButton(Locale.explain("ui.clearLog"), UIUtils.getIcon("clear-s.png")); //$NON-NLS-1$ //$NON-NLS-2$
    button.setHorizontalTextPosition(SwingConstants.CENTER);
    button.setVerticalTextPosition(SwingConstants.BOTTOM);
    button.setActionCommand("logClear"); //$NON-NLS-1$
    button.addActionListener(this);
    builder.add(button, constraints.xy(3, 4));

    button = new JButton(Locale.explain("ui.saveLog"), UIUtils.getIcon("save-s.png")); //$NON-NLS-1$ //$NON-NLS-2$
    button.setHorizontalTextPosition(SwingConstants.CENTER);
    button.setVerticalTextPosition(SwingConstants.BOTTOM);
    button.setActionCommand("logSave"); //$NON-NLS-1$
    button.addActionListener(this);
    builder.add(button, constraints.xy(5, 4));

    builder.getPanel().setOpaque(false);
    return builder.getPanel();
}

From source file:com.lyndir.lhunath.opal.gui.template.shade.AbstractUi.java

License:Apache License

private JComponent getLicensePane() {

    FormLayout layout = new FormLayout("10dlu, 15dlu, p:g, 10dlu, p:g, 15dlu, 10dlu", //$NON-NLS-1$
            "0dlu, f:1dlu:g, 5dlu, p, 10dlu"); //$NON-NLS-1$
    layout.setColumnGroups(new int[][] { { 3, 5 } });

    String doc = "";
    JButton button;//from  ww w. j av a 2  s.com
    PanelBuilder builder = new PanelBuilder(layout, new ScrollPanel());
    CellConstraints constraints = new CellConstraints();

    try {
        doc = getLicense();
    } catch (IOException e) {
        logger.err(e, "err.readLicense");
    }

    JEditorPane changelog = new JEditorPane("text/html", doc); //$NON-NLS-1$
    changelog.setOpaque(false);
    changelog.setEditable(false);
    changelog.setFont(Font.decode("Monospaced-15")); //$NON-NLS-1$

    JScrollPane pane = new JScrollPane(changelog);
    pane.setBorder(Borders.EMPTY_BORDER);
    pane.setOpaque(false);
    pane.getViewport().setOpaque(false);
    builder.add(pane, constraints.xyw(2, 2, 5));

    button = new JButton(Locale.explain("ui.reportOffense"), UIUtils.getIcon("problem-s.png")); //$NON-NLS-1$ //$NON-NLS-2$
    button.setHorizontalTextPosition(SwingConstants.CENTER);
    button.setVerticalTextPosition(SwingConstants.BOTTOM);
    button.setActionCommand("reportOffense"); //$NON-NLS-1$
    button.addActionListener(this);
    builder.add(new ToolTip(Locale.explain("ui.reportOffenceTip"), button), constraints.xyw(3, 4, 3));

    builder.getPanel().setOpaque(false);
    return builder.getPanel();
}

From source file:com.lyndir.lhunath.opal.gui.template.shade.AbstractUi.java

License:Apache License

private JComponent getDevelopmentPane() {

    FormLayout layout = new FormLayout("10dlu, 15dlu, p:g, 10dlu, p:g, 15dlu, 10dlu", //$NON-NLS-1$
            "0dlu, f:1dlu:g, 5dlu, p, 10dlu"); //$NON-NLS-1$
    layout.setColumnGroups(new int[][] { { 3, 5 } });

    JButton button;//from ww  w.j  a  v a2  s .c om
    PanelBuilder builder = new PanelBuilder(layout, new ScrollPanel());
    CellConstraints constraints = new CellConstraints();

    builder.add(getDevelopmentComponent(), constraints.xyw(2, 2, 5));

    button = new JButton(Locale.explain("ui.reportProblem"), UIUtils.getIcon("problem-s.png")); //$NON-NLS-1$ //$NON-NLS-2$
    button.setHorizontalTextPosition(SwingConstants.CENTER);
    button.setVerticalTextPosition(SwingConstants.BOTTOM);
    button.setActionCommand("reportIssue"); //$NON-NLS-1$
    button.addActionListener(this);
    builder.add(new ToolTip(Locale.explain("ui.reportProblemTip"), button), constraints.xy(3, 4));

    button = new JButton(Locale.explain("ui.toggleConsole"), UIUtils.getIcon("terminal-s.png")); //$NON-NLS-1$ //$NON-NLS-2$
    button.setHorizontalTextPosition(SwingConstants.CENTER);
    button.setVerticalTextPosition(SwingConstants.BOTTOM);
    button.setActionCommand("toggleConsole"); //$NON-NLS-1$
    button.addActionListener(this);
    builder.add(new ToolTip(Locale.explain("ui.toggleConsoleTip"), button), constraints.xy(5, 4));

    builder.getPanel().setOpaque(false);
    return builder.getPanel();
}

From source file:com.main.GoaView.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Anjali Shinde
    panel1 = new JPanel();
    label1 = new JLabel();
    panel2 = new JPanel();
    panel3 = new JPanel();
    label2 = new JLabel();
    label3 = new JLabel();
    label4 = new JLabel();
    panel5 = new JPanel();
    label13 = new JLabel();
    label14 = new JLabel();
    label15 = new JLabel();
    label17 = new JLabel();
    label16 = new JLabel();
    label8 = new JLabel();
    scrollPane1 = new JScrollPane();
    editorPane1 = new JEditorPane();
    scrollPane6 = new JScrollPane();
    editorPane6 = new JEditorPane();
    scrollPane11 = new JScrollPane();
    editorPane11 = new JEditorPane();
    scrollPane16 = new JScrollPane();
    editorPane16 = new JEditorPane();
    scrollPane21 = new JScrollPane();
    editorPane21 = new JEditorPane();
    label9 = new JLabel();
    scrollPane2 = new JScrollPane();
    editorPane2 = new JEditorPane();
    scrollPane7 = new JScrollPane();
    editorPane7 = new JEditorPane();
    scrollPane12 = new JScrollPane();
    editorPane12 = new JEditorPane();
    scrollPane17 = new JScrollPane();
    editorPane17 = new JEditorPane();
    scrollPane22 = new JScrollPane();
    editorPane22 = new JEditorPane();
    label10 = new JLabel();
    scrollPane3 = new JScrollPane();
    editorPane3 = new JEditorPane();
    scrollPane8 = new JScrollPane();
    editorPane8 = new JEditorPane();
    scrollPane13 = new JScrollPane();
    editorPane13 = new JEditorPane();
    scrollPane18 = new JScrollPane();
    editorPane18 = new JEditorPane();
    scrollPane23 = new JScrollPane();
    editorPane23 = new JEditorPane();
    label11 = new JLabel();
    scrollPane4 = new JScrollPane();
    editorPane4 = new JEditorPane();
    scrollPane9 = new JScrollPane();
    editorPane9 = new JEditorPane();
    scrollPane14 = new JScrollPane();
    editorPane14 = new JEditorPane();
    scrollPane19 = new JScrollPane();
    editorPane19 = new JEditorPane();
    scrollPane24 = new JScrollPane();
    editorPane24 = new JEditorPane();
    label12 = new JLabel();
    scrollPane5 = new JScrollPane();
    editorPane5 = new JEditorPane();
    scrollPane10 = new JScrollPane();
    editorPane10 = new JEditorPane();
    scrollPane15 = new JScrollPane();
    editorPane15 = new JEditorPane();
    scrollPane20 = new JScrollPane();
    editorPane20 = new JEditorPane();
    scrollPane25 = new JScrollPane();
    editorPane25 = new JEditorPane();
    panel4 = new JPanel();
    label5 = new JLabel();
    label6 = new JLabel();
    label7 = new JLabel();
    panel6 = new JPanel();
    button1 = new JButton();

    //======== this ========

    // JFormDesigner evaluation mark
    setBorder(/*from w ww.j a va 2 s . co  m*/
            new javax.swing.border.CompoundBorder(
                    new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0),
                            "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER,
                            javax.swing.border.TitledBorder.BOTTOM,
                            new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red),
                    getBorder()));
    addPropertyChangeListener(new java.beans.PropertyChangeListener() {
        public void propertyChange(java.beans.PropertyChangeEvent e) {
            if ("border".equals(e.getPropertyName()))
                throw new RuntimeException();
        }
    });

    setLayout(new FormLayout("default:grow", "2*(default), $lgap, default"));

    //======== panel1 ========
    {
        panel1.setLayout(new FormLayout("default:grow", "default"));

        //---- label1 ----
        label1.setText("Goa Tourism");
        label1.setFont(new Font("Tahoma", Font.BOLD, 24));
        panel1.add(label1, CC.xy(1, 1, CC.CENTER, CC.CENTER));
    }
    add(panel1, CC.xy(1, 1));

    //======== panel2 ========
    {
        panel2.setLayout(new FormLayout("2*(default, $lcgap), default", "default"));

        //======== panel3 ========
        {
            panel3.setLayout(new FormLayout("default", "2*(default, $lgap), default"));

            //---- label2 ----
            label2.setIcon(new ImageIcon(getClass().getResource("/com/images/goa/goa1.jpg")));
            panel3.add(label2, CC.xy(1, 1));

            //---- label3 ----
            label3.setIcon(new ImageIcon(getClass().getResource("/com/images/goa/goa2.jpg")));
            panel3.add(label3, CC.xy(1, 3));

            //---- label4 ----
            label4.setIcon(new ImageIcon(getClass().getResource("/com/images/goa/goa3.jpg")));
            panel3.add(label4, CC.xy(1, 5));
        }
        panel2.add(panel3, CC.xy(1, 1));

        //======== panel5 ========
        {
            panel5.setBorder(LineBorder.createBlackLineBorder());
            panel5.setToolTipText(
                    "Bougainvillea Guest House,Casa Candolim,Santana Beach Resort,Lemon Tree Amarantee Beach Resort,Fortune Select Regina,Aldeia Santa Rita,Aashyana Lakhanpal,The O Hotel");
            panel5.setLayout(new FormLayout("5*(default, $lcgap), default", "5*(default, $lgap), default"));

            //---- label13 ----
            label13.setText("Panaji");
            panel5.add(label13, CC.xy(3, 1));

            //---- label14 ----
            label14.setText("Calangute");
            panel5.add(label14, CC.xy(5, 1));

            //---- label15 ----
            label15.setText("Candolim");
            panel5.add(label15, CC.xy(7, 1));

            //---- label17 ----
            label17.setText("Canacona");
            panel5.add(label17, CC.xy(9, 1));

            //---- label16 ----
            label16.setText("Ponda");
            panel5.add(label16, CC.xy(11, 1));

            //---- label8 ----
            label8.setText("PLACES TO VISIT");
            panel5.add(label8, CC.xy(1, 3));

            //======== scrollPane1 ========
            {

                //---- editorPane1 ----
                editorPane1.setEditable(false);
                editorPane1.setText(
                        "Basilica of Bom Jesus,Ashwem Beach,Fontainhas,Old Goa,Se Cathedral,Tomb of St.Francis Xavier,Reis Magos Fort,Panjim Heritage Walk,Church Square,Polem Beach,Dona Paula Beach");
                scrollPane1.setViewportView(editorPane1);
            }
            panel5.add(scrollPane1, CC.xy(3, 3));

            //======== scrollPane6 ========
            {

                //---- editorPane6 ----
                editorPane6.setEditable(false);
                editorPane6.setText("Bega Beach, Casino Palms");
                scrollPane6.setViewportView(editorPane6);
            }
            panel5.add(scrollPane6, CC.xy(5, 3));

            //======== scrollPane11 ========
            {

                //---- editorPane11 ----
                editorPane11.setEditable(false);
                editorPane11.setText("Chapora Beach,Viceroy's Arch,Kegdole Beach");
                scrollPane11.setViewportView(editorPane11);
            }
            panel5.add(scrollPane11, CC.xy(7, 3));

            //======== scrollPane16 ========
            {

                //---- editorPane16 ----
                editorPane16.setEditable(false);
                editorPane16.setText("Cola Beach,Yog Nisarga,Cabo de Rama Fort,Galjibaga Beach");
                scrollPane16.setViewportView(editorPane16);
            }
            panel5.add(scrollPane16, CC.xy(9, 3));

            //======== scrollPane21 ========
            {

                //---- editorPane21 ----
                editorPane21.setEditable(false);
                editorPane21.setText(
                        "Shri Mahalasa Temple,Butterfly Conservatory of Goa,Shri Naguesh Temple,Shri Ramnath Temple,Mahalaxmi Temple,Laxmi Narasimha Temple,Sri Nagueshi Temple");
                scrollPane21.setViewportView(editorPane21);
            }
            panel5.add(scrollPane21, CC.xy(11, 3));

            //---- label9 ----
            label9.setText("HOTELS");
            panel5.add(label9, CC.xy(1, 5));

            //======== scrollPane2 ========
            {

                //---- editorPane2 ----
                editorPane2.setEditable(false);
                editorPane2.setText(
                        "Vivanta by Taj,Goa Marriott resort & Spa,Afonso Gues House,Panjim Inn,Hotel Fidalgo,Ginger Goa,Hotel Aroma Executive");
                scrollPane2.setViewportView(editorPane2);
            }
            panel5.add(scrollPane2, CC.xy(3, 5));

            //======== scrollPane7 ========
            {

                //---- editorPane7 ----
                editorPane7.setEditable(false);
                editorPane7.setText(
                        "Pousada Tauma,Kingstork Beach Resort,Casa Severina,Renzo's Inn,Ocean Palms Goa,10 Calangute,Fahrenheit Hotels & Resorts");
                scrollPane7.setViewportView(editorPane7);
            }
            panel5.add(scrollPane7, CC.xy(5, 5));

            //======== scrollPane12 ========
            {

                //---- editorPane12 ----
                editorPane12.setEditable(false);
                editorPane12.setText(
                        "Bougainvillea Guest House,Casa Candolim,Santana Beach Resort,Lemon Tree Amarantee Beach Resort,Fortune Select Regina,Aldeia Santa Rita,Aashyana Lakhanpal,The O Hotel");
                scrollPane12.setViewportView(editorPane12);
            }
            panel5.add(scrollPane12, CC.xy(7, 5));

            //======== scrollPane17 ========
            {

                //---- editorPane17 ----
                editorPane17.setEditable(false);
                editorPane17.setText(
                        "Oceanic Hotel,Manfredi's Resort,The Fern Gardenia Resort,Bhakti Kutir,Dreamcatcher Resort,Clepatra Resort");
                scrollPane17.setViewportView(editorPane17);
            }
            panel5.add(scrollPane17, CC.xy(9, 5));

            //======== scrollPane22 ========
            {

                //---- editorPane22 ----
                editorPane22.setEditable(false);
                editorPane22.setText(
                        "Vila Nova Resort,Old Goa Residency,Hotel Sun Inn,Farmagudi Residency,Mayem Residency,Hotel Jyoti Plaza,Pratham,Kirti Hotel");
                scrollPane22.setViewportView(editorPane22);
            }
            panel5.add(scrollPane22, CC.xy(11, 5));

            //---- label10 ----
            label10.setText("RESTAURANT");
            panel5.add(label10, CC.xy(1, 7));

            //======== scrollPane3 ========
            {

                //---- editorPane3 ----
                editorPane3.setEditable(false);
                editorPane3.setText(
                        "Cafe Mangii,Ritz Classic,The Upper House,Delhi Darbar,Sher-E-Punjab,Tato Cafe,Viva Panjim");
                scrollPane3.setViewportView(editorPane3);
            }
            panel5.add(scrollPane3, CC.xy(3, 7));

            //======== scrollPane8 ========
            {

                //---- editorPane8 ----
                editorPane8.setEditable(false);
                editorPane8.setText(
                        "Chef Soumyen's kitchen,Pousada by the Beach,Patio 23,I 95,Under the Star,Oriental Thai-European Restaurant,The Spice Rac");
                scrollPane8.setViewportView(editorPane8);
            }
            panel5.add(scrollPane8, CC.xy(5, 7));

            //======== scrollPane13 ========
            {

                //---- editorPane13 ----
                editorPane13.setEditable(false);
                editorPane13.setText(
                        "Victor's,Bobby's Shack,Choclatti,Riverside Restaurant,Tuscany Gardens,Vivenda Kafe,Coyote,Shivers,Bomras,Palmland");
                scrollPane13.setViewportView(editorPane13);
            }
            panel5.add(scrollPane13, CC.xy(7, 7));

            //======== scrollPane18 ========
            {

                //---- editorPane18 ----
                editorPane18.setEditable(false);
                editorPane18.setText(
                        "Cafe Inn,Manveer's kitchen at Anant Residency,Magic Italy,Ourem 88,Little World,Ciarans,Dropadi Restaurant,Crunch");
                scrollPane18.setViewportView(editorPane18);
            }
            panel5.add(scrollPane18, CC.xy(9, 7));

            //======== scrollPane23 ========
            {

                //---- editorPane23 ----
                editorPane23.setEditable(false);
                editorPane23.setText("Hill Breeze");
                scrollPane23.setViewportView(editorPane23);
            }
            panel5.add(scrollPane23, CC.xy(11, 7));

            //---- label11 ----
            label11.setText("CLIMATE");
            panel5.add(label11, CC.xy(1, 9));

            //======== scrollPane4 ========
            {

                //---- editorPane4 ----
                editorPane4.setEditable(false);
                editorPane4.setText("Hot");
                scrollPane4.setViewportView(editorPane4);
            }
            panel5.add(scrollPane4, CC.xy(3, 9));

            //======== scrollPane9 ========
            {

                //---- editorPane9 ----
                editorPane9.setEditable(false);
                editorPane9.setText("Humid");
                scrollPane9.setViewportView(editorPane9);
            }
            panel5.add(scrollPane9, CC.xy(5, 9));

            //======== scrollPane14 ========
            {

                //---- editorPane14 ----
                editorPane14.setEditable(false);
                editorPane14.setText("Hot and Humid");
                scrollPane14.setViewportView(editorPane14);
            }
            panel5.add(scrollPane14, CC.xy(7, 9));

            //======== scrollPane19 ========
            {

                //---- editorPane19 ----
                editorPane19.setEditable(false);
                editorPane19.setText("Hot");
                scrollPane19.setViewportView(editorPane19);
            }
            panel5.add(scrollPane19, CC.xy(9, 9));

            //======== scrollPane24 ========
            {

                //---- editorPane24 ----
                editorPane24.setEditable(false);
                editorPane24.setText("Hot and Humid");
                scrollPane24.setViewportView(editorPane24);
            }
            panel5.add(scrollPane24, CC.xy(11, 9));

            //---- label12 ----
            label12.setText("SPECIALITY");
            panel5.add(label12, CC.xy(1, 11));

            //======== scrollPane5 ========
            {

                //---- editorPane5 ----
                editorPane5.setEditable(false);
                editorPane5.setText("Ship Building");
                scrollPane5.setViewportView(editorPane5);
            }
            panel5.add(scrollPane5, CC.xy(3, 11));

            //======== scrollPane10 ========
            {

                //---- editorPane10 ----
                editorPane10.setEditable(false);
                editorPane10.setText("Fish,Beach");
                scrollPane10.setViewportView(editorPane10);
            }
            panel5.add(scrollPane10, CC.xy(5, 11));

            //======== scrollPane15 ========
            {

                //---- editorPane15 ----
                editorPane15.setEditable(false);
                editorPane15.setText("Fish,Rice,Beach");
                scrollPane15.setViewportView(editorPane15);
            }
            panel5.add(scrollPane15, CC.xy(7, 11));

            //======== scrollPane20 ========
            {

                //---- editorPane20 ----
                editorPane20.setEditable(false);
                editorPane20.setText("Church,Beach");
                scrollPane20.setViewportView(editorPane20);
            }
            panel5.add(scrollPane20, CC.xy(9, 11));

            //======== scrollPane25 ========
            {

                //---- editorPane25 ----
                editorPane25.setEditable(false);
                editorPane25.setText("Fish,Temples");
                scrollPane25.setViewportView(editorPane25);
            }
            panel5.add(scrollPane25, CC.xy(11, 11));
        }
        panel2.add(panel5, CC.xy(3, 1));

        //======== panel4 ========
        {
            panel4.setLayout(new FormLayout("default", "2*(default, $lgap), default"));

            //---- label5 ----
            label5.setIcon(new ImageIcon(getClass().getResource("/com/images/goa/goamap.jpg")));
            panel4.add(label5, CC.xy(1, 1));

            //---- label6 ----
            label6.setIcon(new ImageIcon(getClass().getResource("/com/images/goa/goa4.jpg")));
            panel4.add(label6, CC.xy(1, 3));

            //---- label7 ----
            label7.setIcon(new ImageIcon(getClass().getResource("/com/images/goa/goa6.jpg")));
            panel4.add(label7, CC.xy(1, 5));
        }
        panel2.add(panel4, CC.xy(5, 1));
    }
    add(panel2, CC.xy(1, 2));

    //======== panel6 ========
    {
        panel6.setLayout(new FormLayout("default, $lcgap, default", "default"));

        //---- button1 ----
        button1.setText("Go Back To Main Menu");
        panel6.add(button1, CC.xy(1, 1));
    }
    add(panel6, CC.xy(1, 4));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
    button1.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent arg0) {
            MainPageView page = new MainPageView();
            page.createAndShowGUI();
        }
    });
}

From source file:com.main.Gurajat.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Anjali Shinde
    panel1 = new JPanel();
    label1 = new JLabel();
    panel2 = new JPanel();
    panel3 = new JPanel();
    label2 = new JLabel();
    label3 = new JLabel();
    label4 = new JLabel();
    panel6 = new JPanel();
    label13 = new JLabel();
    label14 = new JLabel();
    label15 = new JLabel();
    label16 = new JLabel();
    label17 = new JLabel();
    label8 = new JLabel();
    scrollPane1 = new JScrollPane();
    editorPane1 = new JEditorPane();
    scrollPane6 = new JScrollPane();
    editorPane6 = new JEditorPane();
    scrollPane11 = new JScrollPane();
    editorPane11 = new JEditorPane();
    scrollPane16 = new JScrollPane();
    editorPane16 = new JEditorPane();
    scrollPane21 = new JScrollPane();
    editorPane21 = new JEditorPane();
    label9 = new JLabel();
    scrollPane2 = new JScrollPane();
    editorPane2 = new JEditorPane();
    scrollPane7 = new JScrollPane();
    editorPane7 = new JEditorPane();
    scrollPane12 = new JScrollPane();
    editorPane12 = new JEditorPane();
    scrollPane17 = new JScrollPane();
    editorPane17 = new JEditorPane();
    scrollPane22 = new JScrollPane();
    editorPane22 = new JEditorPane();
    label10 = new JLabel();
    scrollPane3 = new JScrollPane();
    editorPane3 = new JEditorPane();
    scrollPane8 = new JScrollPane();
    editorPane8 = new JEditorPane();
    scrollPane13 = new JScrollPane();
    editorPane13 = new JEditorPane();
    scrollPane18 = new JScrollPane();
    editorPane18 = new JEditorPane();
    scrollPane23 = new JScrollPane();
    editorPane23 = new JEditorPane();
    label11 = new JLabel();
    scrollPane4 = new JScrollPane();
    editorPane4 = new JEditorPane();
    scrollPane9 = new JScrollPane();
    editorPane9 = new JEditorPane();
    scrollPane14 = new JScrollPane();
    editorPane14 = new JEditorPane();
    scrollPane19 = new JScrollPane();
    editorPane19 = new JEditorPane();
    scrollPane24 = new JScrollPane();
    editorPane24 = new JEditorPane();
    label12 = new JLabel();
    scrollPane5 = new JScrollPane();
    editorPane5 = new JEditorPane();
    scrollPane10 = new JScrollPane();
    editorPane10 = new JEditorPane();
    scrollPane15 = new JScrollPane();
    editorPane15 = new JEditorPane();
    scrollPane20 = new JScrollPane();
    editorPane20 = new JEditorPane();
    scrollPane25 = new JScrollPane();
    editorPane25 = new JEditorPane();
    panel4 = new JPanel();
    label5 = new JLabel();
    label6 = new JLabel();
    label7 = new JLabel();
    panel5 = new JPanel();
    button1 = new JButton();

    //======== this ========

    // JFormDesigner evaluation mark
    setBorder(/*from w w w .j av  a2s  . c  o  m*/
            new javax.swing.border.CompoundBorder(
                    new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0),
                            "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER,
                            javax.swing.border.TitledBorder.BOTTOM,
                            new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red),
                    getBorder()));
    addPropertyChangeListener(new java.beans.PropertyChangeListener() {
        public void propertyChange(java.beans.PropertyChangeEvent e) {
            if ("border".equals(e.getPropertyName()))
                throw new RuntimeException();
        }
    });

    setLayout(new FormLayout("default:grow", "2*(default), $lgap, default"));

    //======== panel1 ========
    {
        panel1.setLayout(new FormLayout("default:grow", "default"));

        //---- label1 ----
        label1.setText("Gurajat Tourism");
        label1.setFont(new Font("Tahoma", Font.BOLD, 24));
        panel1.add(label1, CC.xy(1, 1, CC.CENTER, CC.CENTER));
    }
    add(panel1, CC.xy(1, 1));

    //======== panel2 ========
    {
        panel2.setLayout(new FormLayout("2*(default, $lcgap), default", "default"));

        //======== panel3 ========
        {
            panel3.setLayout(new FormLayout("default", "2*(default, $lgap), default"));

            //---- label2 ----
            label2.setIcon(new ImageIcon(getClass().getResource("/com/images/gujarat/guj1.jpg")));
            panel3.add(label2, CC.xy(1, 1));

            //---- label3 ----
            label3.setIcon(new ImageIcon(getClass().getResource("/com/images/gujarat/guj2.jpg")));
            panel3.add(label3, CC.xy(1, 3));

            //---- label4 ----
            label4.setIcon(new ImageIcon(getClass().getResource("/com/images/gujarat/guj3.jpg")));
            panel3.add(label4, CC.xy(1, 5));
        }
        panel2.add(panel3, CC.xy(1, 1));

        //======== panel6 ========
        {
            panel6.setBorder(LineBorder.createBlackLineBorder());
            panel6.setLayout(new FormLayout("5*(default, $lcgap), default", "5*(default, $lgap), default"));

            //---- label13 ----
            label13.setText("Ahmedabad");
            panel6.add(label13, CC.xy(3, 1));

            //---- label14 ----
            label14.setText("Vadodara");
            panel6.add(label14, CC.xy(5, 1));

            //---- label15 ----
            label15.setText("Porbandar");
            panel6.add(label15, CC.xy(7, 1));

            //---- label16 ----
            label16.setText("Junagadh");
            panel6.add(label16, CC.xy(9, 1));

            //---- label17 ----
            label17.setText("Saputara");
            panel6.add(label17, CC.xy(11, 1));

            //---- label8 ----
            label8.setText("PLACES TO VISIT");
            panel6.add(label8, CC.xy(1, 3));

            //======== scrollPane1 ========
            {

                //---- editorPane1 ----
                editorPane1.setEditable(false);
                editorPane1.setText(
                        "Sabarmati Ashram,Adalaj Step-well,Auto World vintage Car Museum,Akshardham Temple,Kankaria Lake,Jama Masjiddada Hari,Rauza,Thor");
                scrollPane1.setViewportView(editorPane1);
            }
            panel6.add(scrollPane1, CC.xy(3, 3));

            //======== scrollPane6 ========
            {

                //---- editorPane6 ----
                editorPane6.setEditable(false);
                editorPane6.setText(
                        "Laxmi Vilas Palace,Baps Swaminarayan Mandir,Mahajan Palace,Maharaja Fatesingh Museum,Kabirvad,Narmada Canal,Kirti Stambh,Jubilee Baug");
                scrollPane6.setViewportView(editorPane6);
            }
            panel6.add(scrollPane6, CC.xy(5, 3));

            //======== scrollPane11 ========
            {

                //---- editorPane11 ----
                editorPane11.setEditable(false);
                editorPane11.setText(
                        "Kirti Mandir Temple,Pirbandar Beach,Krishna-Sudama Temple,Rani Baug Park,Tara mandir,Sartanji Choro,Ghumli,Huzoor Palace");
                scrollPane11.setViewportView(editorPane11);
            }
            panel6.add(scrollPane11, CC.xy(7, 3));

            //======== scrollPane16 ========
            {

                //---- editorPane16 ----
                editorPane16.setEditable(false);
                editorPane16.setText(
                        "Gir National Park Wildlife Sanctuary,Darbar Hall Museun,Sakkarbaug Zoo,Ashok Shilalekh,Uperkot Fort,Jain DerasarDataar Hills,Dattatreya Tempe,Wellington DamPatan Gate");
                scrollPane16.setViewportView(editorPane16);
            }
            panel6.add(scrollPane16, CC.xy(9, 3));

            //======== scrollPane21 ========
            {

                //---- editorPane21 ----
                editorPane21.setEditable(false);
                editorPane21.setText(
                        "Saputara Lake,Gira Waterfalls,Sunset Point,Tribal Museum,Lake Garden,Pandava Gufa,Hatgadh Fort");
                scrollPane21.setViewportView(editorPane21);
            }
            panel6.add(scrollPane21, CC.xy(11, 3));

            //---- label9 ----
            label9.setText("HOTELS");
            panel6.add(label9, CC.xy(1, 5));

            //======== scrollPane2 ========
            {
                scrollPane2.setAutoscrolls(true);

                //---- editorPane2 ----
                editorPane2.setEditable(false);
                editorPane2.setText(
                        "Hotel Grand Ambience,Royal Orchid Central,The House of MG,Ista,The Fern,Park Plaza,Lemon Tree Hotel");
                scrollPane2.setViewportView(editorPane2);
            }
            panel6.add(scrollPane2, CC.xy(3, 5));

            //======== scrollPane7 ========
            {
                scrollPane7.setAutoscrolls(true);

                //---- editorPane7 ----
                editorPane7.setEditable(false);
                editorPane7.setText(
                        "Royal Orchid  Central,Surya Palace Hotel,Gateay Hotel at Akota Gardens,Welcom hotel,Tansha Comfort Residency,The Oasis");
                scrollPane7.setViewportView(editorPane7);
            }
            panel6.add(scrollPane7, CC.xy(5, 5));

            //======== scrollPane12 ========
            {
                scrollPane12.setAutoscrolls(true);

                //---- editorPane12 ----
                editorPane12.setEditable(false);
                editorPane12.setText(
                        "Hotel Lila,Hotel Kuber,Indraprasth,Hotel Harmony,Moon Palace,Natraj Hotel,Hotel President,Hotel Sheetal");
                scrollPane12.setViewportView(editorPane12);
            }
            panel6.add(scrollPane12, CC.xy(7, 5));

            //======== scrollPane17 ========
            {
                scrollPane17.setAutoscrolls(true);

                //---- editorPane17 ----
                editorPane17.setEditable(false);
                editorPane17.setText(
                        "Lotus Hotel,Magico Do Mar,Hotel Vishala,Leo Resorts,Bhagyoday Palace Hotel,Hotel platinum");
                scrollPane17.setViewportView(editorPane17);
            }
            panel6.add(scrollPane17, CC.xy(9, 5));

            //======== scrollPane22 ========
            {
                scrollPane22.setAutoscrolls(true);

                //---- editorPane22 ----
                editorPane22.setEditable(false);
                editorPane22.setText(
                        "Patang Lords Eco Inn,Chitrakoot Hill Resort,Toran Hill Resort,Vaity Ropeway Resort");
                scrollPane22.setViewportView(editorPane22);
            }
            panel6.add(scrollPane22, CC.xy(11, 5));

            //---- label10 ----
            label10.setText("RESTAURANT");
            panel6.add(label10, CC.xy(1, 7));

            //======== scrollPane3 ========
            {

                //---- editorPane3 ----
                editorPane3.setEditable(false);
                editorPane3.setText(
                        "Agashiye,Vishalla,Swati Snacks,Awadh Puri,Zen Cafe,Havmor,Atithi,Seva Caf\u00e9");
                scrollPane3.setViewportView(editorPane3);
            }
            panel6.add(scrollPane3, CC.xy(3, 7));

            //======== scrollPane8 ========
            {

                //---- editorPane8 ----
                editorPane8.setEditable(false);
                editorPane8
                        .setText("Kai Asia,Offside Lounge,22nd Parallel,Peshawri,Little Italy,Barbeque Nation");
                scrollPane8.setViewportView(editorPane8);
            }
            panel6.add(scrollPane8, CC.xy(5, 7));

            //======== scrollPane13 ========
            {

                //---- editorPane13 ----
                editorPane13.setEditable(false);
                editorPane13.setText("Swagat Restaurant");
                scrollPane13.setViewportView(editorPane13);
            }
            panel6.add(scrollPane13, CC.xy(7, 7));

            //======== scrollPane18 ========
            {

                //---- editorPane18 ----
                editorPane18.setEditable(false);
                editorPane18.setText("Geeta Lodge,Rajbhog Restaurant");
                scrollPane18.setViewportView(editorPane18);
            }
            panel6.add(scrollPane18, CC.xy(9, 7));

            //======== scrollPane23 ========
            {

                //---- editorPane23 ----
                editorPane23.setEditable(false);
                editorPane23.setText("Uday Hill Resto-Bar,");
                scrollPane23.setViewportView(editorPane23);
            }
            panel6.add(scrollPane23, CC.xy(11, 7));

            //---- label11 ----
            label11.setText("CLIMATE");
            panel6.add(label11, CC.xy(1, 9));

            //======== scrollPane4 ========
            {

                //---- editorPane4 ----
                editorPane4.setEditable(false);
                editorPane4.setText("Semi-arid");
                scrollPane4.setViewportView(editorPane4);
            }
            panel6.add(scrollPane4, CC.xy(3, 9));

            //======== scrollPane9 ========
            {

                //---- editorPane9 ----
                editorPane9.setEditable(false);
                editorPane9.setText("Dry");
                scrollPane9.setViewportView(editorPane9);
            }
            panel6.add(scrollPane9, CC.xy(5, 9));

            //======== scrollPane14 ========
            {

                //---- editorPane14 ----
                editorPane14.setEditable(false);
                editorPane14.setText("Moderate");
                scrollPane14.setViewportView(editorPane14);
            }
            panel6.add(scrollPane14, CC.xy(7, 9));

            //======== scrollPane19 ========
            {

                //---- editorPane19 ----
                editorPane19.setEditable(false);
                editorPane19.setText("Dry and Scanty Rainfall");
                scrollPane19.setViewportView(editorPane19);
            }
            panel6.add(scrollPane19, CC.xy(9, 9));

            //======== scrollPane24 ========
            {

                //---- editorPane24 ----
                editorPane24.setEditable(false);
                editorPane24.setText("Pleasant");
                scrollPane24.setViewportView(editorPane24);
            }
            panel6.add(scrollPane24, CC.xy(11, 9));

            //---- label12 ----
            label12.setText("SPECIALITY");
            panel6.add(label12, CC.xy(1, 11));

            //======== scrollPane5 ========
            {

                //---- editorPane5 ----
                editorPane5.setEditable(false);
                editorPane5.setText("Museums,Hospitals");
                scrollPane5.setViewportView(editorPane5);
            }
            panel6.add(scrollPane5, CC.xy(3, 11));

            //======== scrollPane10 ========
            {

                //---- editorPane10 ----
                editorPane10.setEditable(false);
                editorPane10.setText("Textiles,Dhokla");
                scrollPane10.setViewportView(editorPane10);
            }
            panel6.add(scrollPane10, CC.xy(5, 11));

            //======== scrollPane15 ========
            {

                //---- editorPane15 ----
                editorPane15.setEditable(false);
                editorPane15.setText("Khajali,Sweets");
                scrollPane15.setViewportView(editorPane15);
            }
            panel6.add(scrollPane15, CC.xy(7, 11));

            //======== scrollPane20 ========
            {

                //---- editorPane20 ----
                editorPane20.setEditable(false);
                editorPane20.setText("Parks,Museums");
                scrollPane20.setViewportView(editorPane20);
            }
            panel6.add(scrollPane20, CC.xy(9, 11));

            //======== scrollPane25 ========
            {

                //---- editorPane25 ----
                editorPane25.setText("Hill Station,Park");
                scrollPane25.setViewportView(editorPane25);
            }
            panel6.add(scrollPane25, CC.xy(11, 11));
        }
        panel2.add(panel6, CC.xy(3, 1));

        //======== panel4 ========
        {
            panel4.setLayout(new FormLayout("default", "2*(default, $lgap), default"));

            //---- label5 ----
            label5.setIcon(new ImageIcon(getClass().getResource("/com/images/gujarat/gujmap.jpg")));
            panel4.add(label5, CC.xy(1, 1));

            //---- label6 ----
            label6.setIcon(new ImageIcon(getClass().getResource("/com/images/gujarat/guj4.jpg")));
            panel4.add(label6, CC.xy(1, 3));

            //---- label7 ----
            label7.setIcon(new ImageIcon(getClass().getResource("/com/images/gujarat/guj5.jpg")));
            panel4.add(label7, CC.xy(1, 5));
        }
        panel2.add(panel4, CC.xy(5, 1));
    }
    add(panel2, CC.xy(1, 2));

    //======== panel5 ========
    {
        panel5.setLayout(new FormLayout("default, $lcgap, default", "default"));

        //---- button1 ----
        button1.setText("Go Back To Main Menu");
        panel5.add(button1, CC.xy(1, 1));
    }
    add(panel5, CC.xy(1, 4));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents

    button1.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent arg0) {
            MainPageView page = new MainPageView();
            page.createAndShowGUI();
        }
    });
}

From source file:com.main.JKView.java

private void initComponents() {

    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Anjali Shinde
    panel1 = new JPanel();
    label1 = new JLabel();
    panel2 = new JPanel();
    panel3 = new JPanel();
    label2 = new JLabel();
    label3 = new JLabel();
    label4 = new JLabel();
    panel5 = new JPanel();
    label13 = new JLabel();
    label14 = new JLabel();
    label15 = new JLabel();
    label16 = new JLabel();
    label17 = new JLabel();
    label8 = new JLabel();
    scrollPane1 = new JScrollPane();
    editorPane1 = new JEditorPane();
    scrollPane6 = new JScrollPane();
    editorPane6 = new JEditorPane();
    scrollPane11 = new JScrollPane();
    editorPane11 = new JEditorPane();
    scrollPane16 = new JScrollPane();
    editorPane16 = new JEditorPane();
    scrollPane21 = new JScrollPane();
    editorPane21 = new JEditorPane();
    label9 = new JLabel();
    scrollPane2 = new JScrollPane();
    editorPane2 = new JEditorPane();
    scrollPane7 = new JScrollPane();
    editorPane7 = new JEditorPane();
    scrollPane12 = new JScrollPane();
    editorPane12 = new JEditorPane();
    scrollPane17 = new JScrollPane();
    editorPane17 = new JEditorPane();
    scrollPane22 = new JScrollPane();
    editorPane22 = new JEditorPane();
    label10 = new JLabel();
    scrollPane3 = new JScrollPane();
    editorPane3 = new JEditorPane();
    scrollPane8 = new JScrollPane();
    editorPane8 = new JEditorPane();
    scrollPane13 = new JScrollPane();
    editorPane13 = new JEditorPane();
    scrollPane18 = new JScrollPane();
    editorPane18 = new JEditorPane();
    scrollPane23 = new JScrollPane();
    editorPane23 = new JEditorPane();
    label11 = new JLabel();
    scrollPane4 = new JScrollPane();
    editorPane4 = new JEditorPane();
    scrollPane9 = new JScrollPane();
    editorPane9 = new JEditorPane();
    scrollPane14 = new JScrollPane();
    editorPane14 = new JEditorPane();
    scrollPane19 = new JScrollPane();
    editorPane19 = new JEditorPane();
    scrollPane24 = new JScrollPane();
    editorPane24 = new JEditorPane();
    label12 = new JLabel();
    scrollPane5 = new JScrollPane();
    editorPane5 = new JEditorPane();
    scrollPane10 = new JScrollPane();
    editorPane10 = new JEditorPane();
    scrollPane15 = new JScrollPane();
    editorPane15 = new JEditorPane();
    scrollPane20 = new JScrollPane();
    editorPane20 = new JEditorPane();
    scrollPane25 = new JScrollPane();
    editorPane25 = new JEditorPane();
    panel4 = new JPanel();
    label5 = new JLabel();
    label6 = new JLabel();
    label7 = new JLabel();
    panel6 = new JPanel();
    button1 = new JButton();

    //======== this ========

    // JFormDesigner evaluation mark
    setBorder(//  w  w w.  j a va 2  s. c om
            new javax.swing.border.CompoundBorder(
                    new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0),
                            "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER,
                            javax.swing.border.TitledBorder.BOTTOM,
                            new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red),
                    getBorder()));
    addPropertyChangeListener(new java.beans.PropertyChangeListener() {
        public void propertyChange(java.beans.PropertyChangeEvent e) {
            if ("border".equals(e.getPropertyName()))
                throw new RuntimeException();
        }
    });

    setLayout(new FormLayout("default:grow", "2*(default), $lgap, default"));

    //======== panel1 ========
    {
        panel1.setLayout(new FormLayout("default:grow", "default"));

        //---- label1 ----
        label1.setText("Jammu and Kashmir Tourism");
        label1.setFont(new Font("Tahoma", Font.BOLD, 24));
        panel1.add(label1, CC.xy(1, 1, CC.CENTER, CC.CENTER));
    }
    add(panel1, CC.xy(1, 1));

    //======== panel2 ========
    {
        panel2.setLayout(new FormLayout("2*(default, $lcgap), default", "default"));

        //======== panel3 ========
        {
            panel3.setLayout(new FormLayout("default", "2*(default, $lgap), default"));

            //---- label2 ----
            label2.setIcon(new ImageIcon(getClass().getResource("/com/images/jk/jk1.jpg")));
            panel3.add(label2, CC.xy(1, 1));

            //---- label3 ----
            label3.setIcon(new ImageIcon(getClass().getResource("/com/images/jk/jk2.jpg")));
            panel3.add(label3, CC.xy(1, 3));

            //---- label4 ----
            label4.setIcon(new ImageIcon(getClass().getResource("/com/images/jk/jk3.jpg")));
            panel3.add(label4, CC.xy(1, 5));
        }
        panel2.add(panel3, CC.xy(1, 1));

        //======== panel5 ========
        {
            panel5.setBorder(LineBorder.createBlackLineBorder());
            panel5.setLayout(new FormLayout("5*(default, $lcgap), default", "5*(default, $lgap), default"));

            //---- label13 ----
            label13.setText("Srinagar");
            panel5.add(label13, CC.xy(3, 1));

            //---- label14 ----
            label14.setText("Leh");
            panel5.add(label14, CC.xy(5, 1));

            //---- label15 ----
            label15.setText("Gulmarg");
            panel5.add(label15, CC.xy(7, 1));

            //---- label16 ----
            label16.setText("Jammu City");
            panel5.add(label16, CC.xy(9, 1));

            //---- label17 ----
            label17.setText("Udhampur");
            panel5.add(label17, CC.xy(11, 1));

            //---- label8 ----
            label8.setText("PLACES TO VISIT");
            panel5.add(label8, CC.xy(1, 3));

            //======== scrollPane1 ========
            {

                //---- editorPane1 ----
                editorPane1.setEditable(false);
                editorPane1.setText(
                        "Dal Lake,Nagin Lake,Nishat Garden,Shalimar Bagh,Mughal garden,Yousmarg,Pari Mahal");
                scrollPane1.setViewportView(editorPane1);
            }
            panel5.add(scrollPane1, CC.xy(3, 3));

            //======== scrollPane6 ========
            {

                //---- editorPane6 ----
                editorPane6.setEditable(false);
                editorPane6.setText(
                        "Nubra Valley,Monastero Likir,Thiksey Monastery,Monastero Spituk,Leh Royal Palace");
                scrollPane6.setViewportView(editorPane6);
            }
            panel5.add(scrollPane6, CC.xy(5, 3));

            //======== scrollPane11 ========
            {

                //---- editorPane11 ----
                editorPane11.setEditable(false);
                editorPane11.setText("Apharwat Peak,Gondola,Ski Area,Ningle nallah,Alpather Lake");
                scrollPane11.setViewportView(editorPane11);
            }
            panel5.add(scrollPane11, CC.xy(7, 3));

            //======== scrollPane16 ========
            {

                //---- editorPane16 ----
                editorPane16.setEditable(false);
                editorPane16.setText(
                        "Vaishno Devi Mandir,Mahamaya Temple,Akhnoor Fort,Panch Peer,Rani Charak Mahal,Surinsar Lake");
                scrollPane16.setViewportView(editorPane16);
            }
            panel5.add(scrollPane16, CC.xy(9, 3));

            //======== scrollPane21 ========
            {

                //---- editorPane21 ----
                editorPane21.setEditable(false);
                editorPane21.setText(
                        "Baba Dhansar,ISKCON Udhampur,Bhimgarh Fort,Krimchi Temple,Kalika Temple,Siar Baba");
                scrollPane21.setViewportView(editorPane21);
            }
            panel5.add(scrollPane21, CC.xy(11, 3));

            //---- label9 ----
            label9.setText("HOTELS");
            panel5.add(label9, CC.xy(1, 5));

            //======== scrollPane2 ========
            {

                //---- editorPane2 ----
                editorPane2.setEditable(false);
                editorPane2.setText(
                        "Hotel Dar-Es-Salam,Hotel Centre Point,Gurkha Houseboats,Hotel brown Palace,Heevan Resort");
                scrollPane2.setViewportView(editorPane2);
            }
            panel5.add(scrollPane2, CC.xy(3, 5));

            //======== scrollPane7 ========
            {

                //---- editorPane7 ----
                editorPane7.setEditable(false);
                editorPane7.setText(
                        "Ladakh Sarai,Grand Dragon Ladakh,Hotel Lasermo,Hotel Caravan Center,Lotus Hotel,Hotel Omasila,Ladakh residency");
                scrollPane7.setViewportView(editorPane7);
            }
            panel5.add(scrollPane7, CC.xy(5, 5));

            //======== scrollPane12 ========
            {

                //---- editorPane12 ----
                editorPane12.setEditable(false);
                editorPane12.setText(
                        "The Vintage gulmarg,Heevan retreat Gulmarg,The Pine Palace Resort,Hotel Affarwat");
                scrollPane12.setViewportView(editorPane12);
            }
            panel5.add(scrollPane12, CC.xy(7, 5));

            //======== scrollPane17 ========
            {

                //---- editorPane17 ----
                editorPane17.setEditable(false);
                editorPane17.setText(
                        "Fortune Inn Riviera,K.C.Residency,Katra Continental,Jehlum Resort,Jammu Ashok,Samrat Hotel");
                scrollPane17.setViewportView(editorPane17);
            }
            panel5.add(scrollPane17, CC.xy(9, 5));

            //======== scrollPane22 ========
            {

                //---- editorPane22 ----
                editorPane22.setEditable(false);
                editorPane22.setText("Pine Villa Guest House,Hotel Parveen,JKTDC Tourist Bungalow Kud");
                scrollPane22.setViewportView(editorPane22);
            }
            panel5.add(scrollPane22, CC.xy(11, 5));

            //---- label10 ----
            label10.setText("RESTAURANT");
            panel5.add(label10, CC.xy(1, 7));

            //======== scrollPane3 ========
            {

                //---- editorPane3 ----
                editorPane3.setEditable(false);
                editorPane3.setText(
                        "Ahdoos,Strean,Shamyana,Alka Salka,Cofffea Arabica,Lhasa,Mughal Darbar,Latitude");
                scrollPane3.setViewportView(editorPane3);
            }
            panel5.add(scrollPane3, CC.xy(3, 7));

            //======== scrollPane8 ========
            {

                //---- editorPane8 ----
                editorPane8.setEditable(false);
                editorPane8.setText(
                        "Himalaya Caf\u00e9,La Pizzeria,Wonderland,Dreamland,Gesmo,LamayuruBon Appetit");
                scrollPane8.setViewportView(editorPane8);
            }
            panel5.add(scrollPane8, CC.xy(5, 7));

            //======== scrollPane13 ========
            {

                //---- editorPane13 ----
                editorPane13.setEditable(false);
                editorPane13.setText(
                        "Hotel Highland park,Hilltop Hotel,Bakshi Restaurant,Gulmarg Ski Resort,Sahara Hotel");
                scrollPane13.setViewportView(editorPane13);
            }
            panel5.add(scrollPane13, CC.xy(7, 7));

            //======== scrollPane18 ========
            {

                //---- editorPane18 ----
                editorPane18.setEditable(false);
                editorPane18.setText(
                        "Falak Revolving,Yangtse,Moti Mahal,Mcdonald's,Yo China,Earthen Oven,Hotel Taj Restaurant");
                scrollPane18.setViewportView(editorPane18);
            }
            panel5.add(scrollPane18, CC.xy(9, 7));

            //======== scrollPane23 ========
            {

                //---- editorPane23 ----
                editorPane23.setEditable(false);
                editorPane23.setText(
                        "Hotel Indira,Hotel New Ashok,Hotel Divya Palace,Pratap Resort,Hotel Ashiana,Shiv Dham Hotel");
                scrollPane23.setViewportView(editorPane23);
            }
            panel5.add(scrollPane23, CC.xy(11, 7));

            //---- label11 ----
            label11.setText("CLIMATE");
            panel5.add(label11, CC.xy(1, 9));

            //======== scrollPane4 ========
            {

                //---- editorPane4 ----
                editorPane4.setEditable(false);
                editorPane4.setText("Very Cold");
                scrollPane4.setViewportView(editorPane4);
            }
            panel5.add(scrollPane4, CC.xy(3, 9));

            //======== scrollPane9 ========
            {

                //---- editorPane9 ----
                editorPane9.setEditable(false);
                editorPane9.setText("Very Cold");
                scrollPane9.setViewportView(editorPane9);
            }
            panel5.add(scrollPane9, CC.xy(5, 9));

            //======== scrollPane14 ========
            {

                //---- editorPane14 ----
                editorPane14.setEditable(false);
                editorPane14.setText("Very Cold");
                scrollPane14.setViewportView(editorPane14);
            }
            panel5.add(scrollPane14, CC.xy(7, 9));

            //======== scrollPane19 ========
            {

                //---- editorPane19 ----
                editorPane19.setEditable(false);
                editorPane19.setText("Very Cold");
                scrollPane19.setViewportView(editorPane19);
            }
            panel5.add(scrollPane19, CC.xy(9, 9));

            //======== scrollPane24 ========
            {

                //---- editorPane24 ----
                editorPane24.setEditable(false);
                editorPane24.setText("Very Cold");
                scrollPane24.setViewportView(editorPane24);
            }
            panel5.add(scrollPane24, CC.xy(11, 9));

            //---- label12 ----
            label12.setText("SPECIALITY");
            panel5.add(label12, CC.xy(1, 11));

            //======== scrollPane5 ========
            {

                //---- editorPane5 ----
                editorPane5.setEditable(false);
                editorPane5.setText("Apples, Lake,Anjir fruit");
                scrollPane5.setViewportView(editorPane5);
            }
            panel5.add(scrollPane5, CC.xy(3, 11));

            //======== scrollPane10 ========
            {

                //---- editorPane10 ----
                editorPane10.setEditable(false);
                editorPane10.setText("Beauty,Apples,Keshar");
                scrollPane10.setViewportView(editorPane10);
            }
            panel5.add(scrollPane10, CC.xy(5, 11));

            //======== scrollPane15 ========
            {

                //---- editorPane15 ----
                editorPane15.setEditable(false);
                editorPane15.setText("Woollen Clothes");
                scrollPane15.setViewportView(editorPane15);
            }
            panel5.add(scrollPane15, CC.xy(7, 11));

            //======== scrollPane20 ========
            {

                //---- editorPane20 ----
                editorPane20.setEditable(false);
                editorPane20.setText("Beauty,Apples,Keshar");
                scrollPane20.setViewportView(editorPane20);
            }
            panel5.add(scrollPane20, CC.xy(9, 11));

            //======== scrollPane25 ========
            {

                //---- editorPane25 ----
                editorPane25.setEditable(false);
                editorPane25.setText("Keshar,Apples,Anjir fruit");
                scrollPane25.setViewportView(editorPane25);
            }
            panel5.add(scrollPane25, CC.xy(11, 11));
        }
        panel2.add(panel5, CC.xy(3, 1));

        //======== panel4 ========
        {
            panel4.setLayout(new FormLayout("default", "2*(default, $lgap), default"));

            //---- label5 ----
            label5.setIcon(new ImageIcon(getClass().getResource("/com/images/jk/jkmap.jpg")));
            panel4.add(label5, CC.xy(1, 1));

            //---- label6 ----
            label6.setIcon(new ImageIcon(getClass().getResource("/com/images/jk/jk4.jpg")));
            panel4.add(label6, CC.xy(1, 3));

            //---- label7 ----
            label7.setIcon(new ImageIcon(getClass().getResource("/com/images/jk/jk5.jpg")));
            panel4.add(label7, CC.xy(1, 5));
        }
        panel2.add(panel4, CC.xy(5, 1));
    }
    add(panel2, CC.xy(1, 2));

    //======== panel6 ========
    {
        panel6.setLayout(new FormLayout("default, $lcgap, default", "default"));

        //---- button1 ----
        button1.setText("Go Back To Main Menu");
        panel6.add(button1, CC.xy(1, 1));
    }
    add(panel6, CC.xy(1, 4));
    // JFormDesigner - End of component initialization  //GEN-END:initComponents

    button1.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent arg0) {
            MainPageView page = new MainPageView();
            page.createAndShowGUI();
        }
    });
}