Example usage for javax.swing Box createVerticalStrut

List of usage examples for javax.swing Box createVerticalStrut

Introduction

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

Prototype

public static Component createVerticalStrut(int height) 

Source Link

Document

Creates an invisible, fixed-height component.

Usage

From source file:it.staiger.jmeter.protocol.http.config.gui.DynamicFilePanel.java

/**
 * Initialize the components and layout of this component.
 *//*from   w  ww .  j av  a  2 s .  c  o m*/
private void init() {
    JPanel p = this;

    if (standalone) {
        setLayout(new BorderLayout(0, 5));
        setBorder(makeBorder());
        add(makeTitlePanel(), BorderLayout.NORTH);
        p = new JPanel();
    }

    p.setLayout(new BorderLayout());

    p.add(makeFilePanel(), BorderLayout.CENTER);
    // Force a minimum table height of 100 pixels
    p.add(Box.createVerticalStrut(100), BorderLayout.WEST);

    if (standalone) {
        p.add(makeImportPanel(), BorderLayout.SOUTH);
        add(p, BorderLayout.CENTER);
    }

    table.revalidate();
    sizeColumns(table);

}

From source file:diet.gridr.g5k.gui.ClusterInfoPanel.java

/**
 * This method initializes jPanel2//from  w w  w .j av a2 s . com
 *
 * @return javax.swing.JPanel
 */
private JPanel getJPanel2() {
    if (jPanel2 == null) {
        jPanel2 = new JPanel();
        jPanel2.setLayout(new BoxLayout(jPanel2, BoxLayout.Y_AXIS));
        jPanel2.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
        jobsTable = new JTable();
        jobsModel = new ClusterJobsSummaryModel();
        jobsTable.setModel(jobsModel);
        ClusterJobsSummaryCellRenderer renderer = new ClusterJobsSummaryCellRenderer();
        jobsTable.setDefaultRenderer(String.class, renderer);
        //jobsTable.createDefaultColumnsFromModel();
        JLabel jobsTableTitle = new JLabel("Jobs status");
        jobsTableTitle.setAlignmentX(JLabel.CENTER_ALIGNMENT);
        jobsTableTitle.setFont(new Font("Dialog", Font.BOLD, 14));
        jPanel2.add(Box.createVerticalStrut(5));
        jPanel2.add(jobsTableTitle);
        jPanel2.add(Box.createVerticalStrut(10));
        jPanel2.add(jobsTable.getTableHeader());
        jPanel2.add(jobsTable);
        LoggingManager.log(Level.FINER, LoggingManager.RESOURCESTOOL, this.getClass().getName(), "getJPanel2",
                "Cluster jobs summary table added");
    }
    return jPanel2;
}

From source file:org.isatools.isacreatorconfigurator.configui.DataEntryPanel.java

private JPanel createFieldListPanel() {

    JPanel container = new JPanel();
    container.setBackground(UIHelper.BG_COLOR);
    container.setLayout(new BoxLayout(container, BoxLayout.PAGE_AXIS));

    JPanel headerLab = new JPanel(new GridLayout(1, 1));
    headerLab.setOpaque(false);/* w ww . j av  a2 s  .  co  m*/

    JLabel lab = new JLabel(fieldListTitle);
    headerLab.add(lab);

    container.add(headerLab);
    container.add(Box.createVerticalStrut(5));

    elementModel = new DefaultListModel();
    elementList = new ReOrderableJList(elementModel);
    elementList.setCellRenderer(new CustomReOrderableListCellRenderer(elementList));
    elementList.setDragEnabled(true);
    elementList.setBackground(UIHelper.BG_COLOR);

    elementList.addListSelectionListener(new ListSelectionListener() {
        public void valueChanged(ListSelectionEvent event) {
            Display selectedNode = (Display) elementList.getSelectedValue();
            if (selectedNode != null) {
                try {
                    saveCurrentField(false, false);
                } catch (DataNotCompleteException dce) {
                    showMessagePane(dce.getMessage(), JOptionPane.ERROR_MESSAGE);
                }
                if (selectedNode instanceof FieldElement) {
                    fieldInterface.setCurrentField((FieldElement) selectedNode);
                    if (currentPage != fieldInterface) {
                        setCurrentPage(fieldInterface);
                    }
                    removeElementButton.setEnabled(!standardISAFields.isFieldRequired(selectedNode.toString()));
                } else {
                    setCurrentPage(structureElement);
                }
            }
        }
    });

    elementList.addPropertyChangeListener("orderChanged", new PropertyChangeListener() {
        public void propertyChange(PropertyChangeEvent propertyChangeEvent) {
            updateFieldOrder();

            if (tableList.getSelectedValue() instanceof MappingObject) {
                validateFormOrTable(ApplicationManager.getCurrentMappingObject());
            }
        }
    });

    JScrollPane listScroller = new JScrollPane(elementList, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
            JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    listScroller.getViewport().setBackground(UIHelper.BG_COLOR);
    listScroller.setBorder(new EmptyBorder(2, 2, 2, 10));
    listScroller.setPreferredSize(new Dimension(((int) (WIDTH * 0.25)), ((int) (HEIGHT * 0.75))));
    IAppWidgetFactory.makeIAppScrollPane(listScroller);

    container.add(listScroller);
    container.add(Box.createVerticalStrut(5));

    elementCountInfo = UIHelper.createLabel("", UIHelper.VER_11_PLAIN, UIHelper.DARK_GREEN_COLOR);

    container.add(UIHelper.wrapComponentInPanel(elementCountInfo));
    container.add(Box.createVerticalStrut(5));

    // create button panel to add and remove tables
    JPanel buttonPanel = new JPanel();
    buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS));
    buttonPanel.setBackground(UIHelper.BG_COLOR);

    final JLabel addFieldButton = new JLabel(addElement, JLabel.LEFT);
    addFieldButton.setOpaque(false);

    addFieldButton.addMouseListener(new MouseAdapter() {

        @Override
        public void mouseEntered(MouseEvent mouseEvent) {
            addFieldButton.setIcon(addElementOver);
        }

        @Override
        public void mouseExited(MouseEvent mouseEvent) {
            addFieldButton.setIcon(addElement);
        }

        public void mousePressed(MouseEvent event) {
            addFieldButton.setIcon(addElement);
            showAddFieldUI();
        }

    });

    addFieldButton.setToolTipText(
            "<html><b>Add Field to table</b><p>Add a new field to currently selected table</b></p></html>");

    removeElementButton = new JLabel(removeElement, JLabel.LEFT);
    removeElementButton.setOpaque(false);

    removeElementButton.addMouseListener(new MouseAdapter() {

        @Override
        public void mouseEntered(MouseEvent mouseEvent) {
            removeElementButton.setIcon(removeElementOver);
        }

        @Override
        public void mouseExited(MouseEvent mouseEvent) {
            removeElementButton.setIcon(removeElement);
        }

        public void mousePressed(MouseEvent event) {
            removeElementButton.setIcon(removeElement);
            if (removeElementButton.isEnabled()) {
                removeSelectedElement();
            }
        }

    });

    removeElementButton.setToolTipText(
            "<html><b>Remove Field from table</b><p>Remove this field from this list and the currently selected table.</b></p></html>");

    final JLabel moveDownButton = new JLabel(moveDown);
    moveDownButton.setOpaque(false);
    moveDownButton.addMouseListener(new MouseAdapter() {

        @Override
        public void mouseEntered(MouseEvent mouseEvent) {
            moveDownButton.setIcon(moveDownOver);
        }

        @Override
        public void mouseExited(MouseEvent mouseEvent) {
            moveDownButton.setIcon(moveDown);
        }

        public void mousePressed(MouseEvent event) {
            moveDownButton.setIcon(moveDown);
            if (elementList.getSelectedIndex() != -1) {
                int toMoveDown = elementList.getSelectedIndex();

                if (toMoveDown != (elementModel.getSize() - 1)) {
                    swapElements(elementList, elementModel, toMoveDown, toMoveDown + 1);
                }

                updateFieldOrder();
                validateFormOrTable(ApplicationManager.getCurrentMappingObject());
            }
        }
    });

    moveDownButton.setToolTipText(
            "<html><b>Move Field Down</b><p>Move the selected field down <b>one</b> position in the list.</p></html>");

    final JLabel moveUpButton = new JLabel(moveUp);
    moveUpButton.setOpaque(false);
    moveUpButton.addMouseListener(new MouseAdapter() {

        @Override
        public void mouseEntered(MouseEvent mouseEvent) {
            moveUpButton.setIcon(moveUpOver);
        }

        @Override
        public void mouseExited(MouseEvent mouseEvent) {
            moveUpButton.setIcon(moveUp);
        }

        public void mousePressed(MouseEvent event) {
            moveUpButton.setIcon(moveUp);
            if (elementList.getSelectedIndex() != -1) {
                int toMoveUp = elementList.getSelectedIndex();

                if (toMoveUp != 0) {
                    swapElements(elementList, elementModel, toMoveUp, toMoveUp - 1);
                }

                updateFieldOrder();
                validateFormOrTable(ApplicationManager.getCurrentMappingObject());

            }
        }

    });

    moveUpButton.setToolTipText(
            "<html><b>Move Field Up</b><p>Move the selected field up <b>one</b> position in the list.</p></html>");

    buttonPanel.add(addFieldButton);
    buttonPanel.add(removeElementButton);
    buttonPanel.add(moveDownButton);
    buttonPanel.add(moveUpButton);

    container.add(buttonPanel);

    container.add(Box.createVerticalGlue());

    return container;
}

From source file:org.openmicroscopy.shoola.agents.metadata.editor.UserProfile.java

/** Builds and lays out the UI. */
void buildGUI() {
    removeAll();//from  w  ww.java  2 s.c  om
    initComponents();
    setLayout(new GridBagLayout());
    GridBagConstraints c = new GridBagConstraints();
    c.fill = GridBagConstraints.HORIZONTAL;
    c.anchor = GridBagConstraints.WEST;
    c.insets = new Insets(0, 2, 2, 0);
    c.gridx = 0;
    c.gridy = 0;
    c.gridwidth = GridBagConstraints.RELATIVE; //next-to-last
    c.weightx = 1.0;
    add(buildContentPanel(), c);
    if (model.isUserOwner(model.getRefObject()) || MetadataViewerAgent.isAdministrator()) {
        c.gridy++;
        JPanel buttonPanel = UIUtilities.buildComponentPanel(saveButton);
        buttonPanel.setBackground(UIUtilities.BACKGROUND_COLOR);
        add(buttonPanel, c);
        c.gridy++;
        add(Box.createVerticalStrut(5), c);
        c.gridy++;
        add(buildPasswordPanel(), c);
    }
    ExperimenterData exp = (ExperimenterData) model.getRefObject();
    BufferedImage photo = model.getUserPhoto(exp.getId());
    if (photo == null)
        setUserPhoto(null);
    else
        setUserPhoto(photo);
    deletePhoto.setVisible(photo != null && canModifyPhoto());
}

From source file:org.openmicroscopy.shoola.agents.metadata.editor.PropertiesUI.java

/**
 * Builds the properties component./*from   w  w  w.  j a  va 2s  .  com*/
 * 
 * @return See above.
 */
private JPanel buildProperties() {
    Object refObject = model.getRefObject();
    JPanel p = new JPanel();
    p.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
    p.setBackground(UIUtilities.BACKGROUND_COLOR);
    p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));

    JPanel idPanel = new JPanel();
    idPanel.setLayout(new BoxLayout(idPanel, BoxLayout.X_AXIS));
    idPanel.setBackground(UIUtilities.BACKGROUND_COLOR);
    JPanel l = UIUtilities.buildComponentPanel(idLabel, 0, 0);
    l.setBackground(UIUtilities.BACKGROUND_COLOR);
    idPanel.add(l);
    idPanel.add(Box.createHorizontalGlue());
    idPanel.add(inplaceIcon);
    p.add(idPanel);

    l = UIUtilities.buildComponentPanel(ownerLabel, 0, 0);
    l.setBackground(UIUtilities.BACKGROUND_COLOR);
    p.add(l);
    int w = editName.getIcon().getIconWidth() + 4;
    l = UIUtilities.buildComponentPanel(gpLabel, 0, 0);
    l.setBackground(UIUtilities.BACKGROUND_COLOR);
    p.add(layoutEditablefield(Box.createHorizontalStrut(w), l));
    l = UIUtilities.buildComponentPanel(parentLabel, 0, 0);
    l.setBackground(UIUtilities.BACKGROUND_COLOR);
    p.add(layoutEditablefield(Box.createHorizontalStrut(w), l));
    l = UIUtilities.buildComponentPanel(wellLabel, 0, 0);
    l.setBackground(UIUtilities.BACKGROUND_COLOR);
    p.add(layoutEditablefield(Box.createHorizontalStrut(w), l));

    namePanel = layoutEditablefield(editName, namePane);
    p.add(namePanel);
    p.add(Box.createVerticalStrut(5));

    if (refObject instanceof ImageData || refObject instanceof DatasetData || refObject instanceof ProjectData
            || refObject instanceof TagAnnotationData || refObject instanceof WellSampleData
            || refObject instanceof PlateData || refObject instanceof ScreenData
            || refObject instanceof PlateAcquisitionData) {

        descriptionScrollPane = new JScrollPane(descriptionWiki);
        descriptionScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
        descriptionScrollPane.setBorder(AnnotationUI.EDIT_BORDER);
        Dimension viewportSize = new Dimension(WIDTH, HEIGHT);
        descriptionScrollPane.getViewport().setPreferredSize(viewportSize);

        double[][] design = new double[][] { { TableLayout.PREFERRED, TableLayout.FILL },
                { TableLayout.PREFERRED } };

        TableLayout table = new TableLayout(design);
        descriptionPanel = new JPanel(table);
        descriptionPanel.setBackground(UIUtilities.BACKGROUND_COLOR);
        descriptionPanel.add(descriptionButtonEdit, "0, 0, c, t");
        descriptionPanel.add(descriptionScrollPane, "1, 0");

        p.add(descriptionPanel);
        p.add(Box.createVerticalStrut(5));
    }
    return p;
}

From source file:org.openmicroscopy.shoola.agents.metadata.editor.PropertiesUI.java

/**
 * Builds the panel hosting the {@link #nameArea} and the
 * {@link #descriptionArea}.//from  w  w w  . jav a 2 s  . co  m
 */
private void buildGUI() {
    setBackground(UIUtilities.BACKGROUND);
    add(buildProperties());
    Object refObject = model.getRefObject();
    PixelsData data = null;
    ImageData img = null;
    if (refObject instanceof ImageData) {
        img = (ImageData) refObject;
        try {
            data = ((ImageData) refObject).getDefaultPixels();
        } catch (Exception e) {
        }
    } else if (refObject instanceof WellSampleData) {
        img = ((WellSampleData) refObject).getImage();
        if (img != null && img.getId() > 0)
            data = img.getDefaultPixels();
        Object parent = model.getParentRootObject();
        if (parent instanceof WellData) {
            add(Box.createVerticalStrut(5));
            add(layoutWellContent((WellData) parent));
        }
    } else if (refObject instanceof FileAnnotationData) {
        FileAnnotationData fa = (FileAnnotationData) refObject;
        String ns = fa.getNameSpace();
        if (FileAnnotationData.EDITOR_EXPERIMENT_NS.equals(ns)
                || FileAnnotationData.EDITOR_PROTOCOL_NS.equals(ns)) {
            String description = fa.getDescription();
            if (description != null && description.length() > 0) {
                PreviewPanel panel = new PreviewPanel(description, fa.getId());
                panel.addPropertyChangeListener(controller);
                add(Box.createVerticalStrut(5));
                add(panel);
            }
        }
    } else if (refObject instanceof PlateData) {
        add(Box.createVerticalStrut(5));
        add(layoutPlateContent((PlateData) refObject));
    } else if (refObject instanceof ScreenData) {
        add(Box.createVerticalStrut(5));
        add(layoutScreenContent((ScreenData) refObject));
    }
    if (data == null)
        return;
    add(Box.createVerticalStrut(5));
    add(buildContentPanel(EditorUtil.transformPixelsData(data), img));
}

From source file:org.openmicroscopy.shoola.agents.util.SelectionWizardUI.java

/**
 * Builds and lays out the available tags.
 *
 * @return See above./*from   www  . j  a v a2  s. c o m*/
 */
private JPanel createAvailableItemsPane() {
    JPanel p = new JPanel();
    p.setLayout(new BorderLayout());
    JPanel panel = new JPanel();
    panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
    panel.add(UIUtilities.setTextFont(createText("Available")));
    panel.add(filterArea);
    panel.add(Box.createVerticalStrut(2));
    p.add(panel, BorderLayout.NORTH);
    p.add(new JScrollPane(availableItemsListbox), BorderLayout.CENTER);
    populateTreeItems(availableItemsListbox, availableItems);
    return p;
}

From source file:org.openmicroscopy.shoola.agents.util.SelectionWizardUI.java

/**
 * Builds and lays out the buttons used to select tags.
 *
 * @return See above./*w  ww  .  j a  va  2  s . c o  m*/
 */
private JPanel createSelectionPane() {
    JPanel buttonPanel = new JPanel();
    buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.Y_AXIS));
    buttonPanel.add(Box.createVerticalStrut(30));
    buttonPanel.add(addButton);
    buttonPanel.add(Box.createVerticalStrut(10));
    buttonPanel.add(removeButton);
    buttonPanel.add(Box.createVerticalStrut(10));
    buttonPanel.add(addAllButton);
    buttonPanel.add(Box.createVerticalStrut(10));
    buttonPanel.add(removeAllButton);
    buttonPanel.add(Box.createVerticalStrut(10));
    return buttonPanel;
}

From source file:Installer.java

public Installer(File targetDir) {
    ToolTipManager.sharedInstance().setDismissDelay(Integer.MAX_VALUE);
    this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

    JPanel logoSplash = new JPanel();
    logoSplash.setLayout(new BoxLayout(logoSplash, BoxLayout.Y_AXIS));
    try {/*from ww w  .jav a 2s  .c  om*/
        // Read png
        BufferedImage image;
        image = ImageIO.read(Installer.class.getResourceAsStream("logo.png"));
        ImageIcon icon = new ImageIcon(image);
        JLabel logoLabel = new JLabel(icon);
        logoLabel.setAlignmentX(CENTER_ALIGNMENT);
        logoLabel.setAlignmentY(CENTER_ALIGNMENT);
        logoLabel.setSize(image.getWidth(), image.getHeight());
        if (!QUIET_DEV) // VIVE - hide oculus logo
            logoSplash.add(logoLabel);
    } catch (IOException e) {
    } catch (IllegalArgumentException e) {
    }

    userHomeDir = System.getProperty("user.home", ".");
    osType = System.getProperty("os.name").toLowerCase();
    if (osType.contains("win")) {
        isWindows = true;
        appDataDir = System.getenv("APPDATA");
    }

    version = "UNKNOWN";
    try {
        InputStream ver = Installer.class.getResourceAsStream("version");
        if (ver != null) {
            String[] tok = new BufferedReader(new InputStreamReader(ver)).readLine().split(":");
            if (tok.length > 0) {
                jar_id = tok[0];
                version = tok[1];
            }
        }
    } catch (IOException e) {
    }

    // Read release notes, save to file
    String tmpFileName = System.getProperty("java.io.tmpdir") + releaseNotePathAddition + "Vivecraft"
            + version.toLowerCase() + "_release_notes.txt";
    releaseNotes = new File(tmpFileName);
    InputStream is = Installer.class.getResourceAsStream("release_notes.txt");
    if (!copyInputStreamToFile(is, releaseNotes)) {
        releaseNotes = null;
    }

    JLabel tag = new JLabel("Welcome! This will install Vivecraft " + version);
    tag.setAlignmentX(CENTER_ALIGNMENT);
    tag.setAlignmentY(CENTER_ALIGNMENT);
    logoSplash.add(tag);

    logoSplash.add(Box.createRigidArea(new Dimension(5, 20)));
    tag = new JLabel("Select path to minecraft. (The default here is almost always what you want.)");
    tag.setAlignmentX(CENTER_ALIGNMENT);
    tag.setAlignmentY(CENTER_ALIGNMENT);
    logoSplash.add(tag);

    logoSplash.setAlignmentX(CENTER_ALIGNMENT);
    logoSplash.setAlignmentY(TOP_ALIGNMENT);
    this.add(logoSplash);

    JPanel entryPanel = new JPanel();
    entryPanel.setLayout(new BoxLayout(entryPanel, BoxLayout.X_AXIS));

    Installer.targetDir = targetDir;
    selectedDirText = new JTextField();
    selectedDirText.setEditable(false);
    selectedDirText.setToolTipText("Path to minecraft");
    selectedDirText.setColumns(30);
    entryPanel.add(selectedDirText);
    JButton dirSelect = new JButton();
    dirSelect.setAction(new FileSelectAction());
    dirSelect.setText("...");
    dirSelect.setToolTipText("Select an alternative minecraft directory");
    entryPanel.add(dirSelect);

    entryPanel.setAlignmentX(LEFT_ALIGNMENT);
    entryPanel.setAlignmentY(TOP_ALIGNMENT);
    infoLabel = new JLabel();
    infoLabel.setHorizontalTextPosition(JLabel.LEFT);
    infoLabel.setVerticalTextPosition(JLabel.TOP);
    infoLabel.setAlignmentX(LEFT_ALIGNMENT);
    infoLabel.setAlignmentY(TOP_ALIGNMENT);
    infoLabel.setVisible(false);

    fileEntryPanel = new JPanel();
    fileEntryPanel.setLayout(new BoxLayout(fileEntryPanel, BoxLayout.Y_AXIS));
    fileEntryPanel.add(infoLabel);
    fileEntryPanel.add(entryPanel);

    fileEntryPanel.setAlignmentX(CENTER_ALIGNMENT);
    fileEntryPanel.setAlignmentY(TOP_ALIGNMENT);
    this.add(fileEntryPanel);
    this.add(Box.createVerticalStrut(5));

    JPanel optPanel = new JPanel();
    optPanel.setLayout(new BoxLayout(optPanel, BoxLayout.Y_AXIS));
    optPanel.setAlignmentX(LEFT_ALIGNMENT);
    optPanel.setAlignmentY(TOP_ALIGNMENT);

    //Add forge options
    JPanel forgePanel = new JPanel();
    forgePanel.setLayout(new BoxLayout(forgePanel, BoxLayout.X_AXIS));
    //Create forge: no/yes buttons
    useForge = new JCheckBox();
    AbstractAction actf = new updateActionF();
    actf.putValue(AbstractAction.NAME, "Install Vivecraft with Forge " + FORGE_VERSION);
    useForge.setAction(actf);
    forgeVersion = new JComboBox();
    if (!ALLOW_FORGE_INSTALL)
        useForge.setEnabled(false);
    useForge.setToolTipText(
            "<html>" + "If checked, installs Vivecraft with Forge support. The correct version of Forge<br>"
                    + "(as displayed) must already be installed.<br>" + "</html>");

    //Add "yes" and "which version" to the forgePanel
    useForge.setAlignmentX(LEFT_ALIGNMENT);
    forgeVersion.setAlignmentX(LEFT_ALIGNMENT);
    forgePanel.add(useForge);
    //forgePanel.add(forgeVersion);

    // Profile creation / update support
    createProfile = new JCheckBox("", true);
    AbstractAction actp = new updateActionP();
    actp.putValue(AbstractAction.NAME, "Create Vivecraft launcher profile");
    createProfile.setAction(actp);
    createProfile.setAlignmentX(LEFT_ALIGNMENT);
    createProfile.setSelected(true);
    createProfile.setToolTipText("<html>"
            + "If checked, if a Vivecraft profile doesn't already exist within the Minecraft launcher<br>"
            + "one is added. Then the profile is selected, and this Vivecraft version is set as the<br>"
            + "current version.<br>" + "</html>");

    useShadersMod = new JCheckBox();
    useShadersMod.setAlignmentX(LEFT_ALIGNMENT);
    if (!ALLOW_SHADERSMOD_INSTALL)
        useShadersMod.setEnabled(false);
    AbstractAction acts = new updateActionSM();
    acts.putValue(AbstractAction.NAME, "Install Vivecraft with ShadersMod 2.3.29");
    useShadersMod.setAction(acts);
    useShadersMod.setToolTipText("<html>" + "If checked, sets the vivecraft profile to use ShadersMod <br>"
            + "support." + "</html>");

    useHydra = new JCheckBox("Razer Hydra support", false);
    useHydra.setAlignmentX(LEFT_ALIGNMENT);
    if (!ALLOW_HYDRA_INSTALL)
        useHydra.setEnabled(false);
    useHydra.setToolTipText("<html>"
            + "If checked, installs the additional Razor Hydra native library required for Razor Hydra<br>"
            + "support." + "</html>");

    useHrtf = new JCheckBox("Enable binaural audio (Only needed once per PC)", false);
    useHrtf.setToolTipText("<html>"
            + "If checked, the installer will create the configuration file needed for OpenAL HRTF<br>"
            + "ear-aware sound in Minecraft (and other games).<br>"
            + " If the file has previously been created, you do not need to check this again.<br>"
            + " NOTE: Your sound card's output MUST be set to 44.1Khz.<br>" + " WARNING, will overwrite "
            + (isWindows ? (appDataDir + "\\alsoft.ini") : (userHomeDir + "/.alsoftrc")) + "!<br>"
            + " Delete the " + (isWindows ? "alsoft.ini" : "alsoftrc") + " file to disable HRTF again."
            + "</html>");
    useHrtf.setAlignmentX(LEFT_ALIGNMENT);

    //Add option panels option panel
    forgePanel.setAlignmentX(LEFT_ALIGNMENT);

    //optPanel.add(forgePanel);
    //optPanel.add(useShadersMod);
    optPanel.add(createProfile);
    optPanel.add(useHrtf);
    this.add(optPanel);

    this.add(Box.createRigidArea(new Dimension(5, 20)));

    instructions = new JLabel("", SwingConstants.CENTER);
    instructions.setAlignmentX(CENTER_ALIGNMENT);
    instructions.setAlignmentY(TOP_ALIGNMENT);
    instructions.setForeground(Color.RED);
    instructions.setPreferredSize(new Dimension(20, 40));
    this.add(instructions);

    this.add(Box.createVerticalGlue());
    JLabel github = linkify("Vivecraft is open source. find it on Github",
            "https://github.com/jrbudda/Vivecraft_111", "Vivecraft 1.11 Github");
    JLabel wiki = linkify("Vivecraft home page", "http://www.vivecraft.org", "Vivecraft Home");
    JLabel donate = linkify("If you think Vivecraft is awesome, please consider donating.",
            "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=JVBJLN5HJJS52&lc=US&item_name=jrbudda&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)",
            "jrbudda's Paypal");
    JLabel optifine = linkify("Vivecraft includes OptiFine for performance. Consider donating to them as well.",
            "http://optifine.net/donate.php", "http://optifine.net/donate.php");

    github.setAlignmentX(CENTER_ALIGNMENT);
    github.setHorizontalAlignment(SwingConstants.CENTER);
    wiki.setAlignmentX(CENTER_ALIGNMENT);
    wiki.setHorizontalAlignment(SwingConstants.CENTER);
    donate.setAlignmentX(CENTER_ALIGNMENT);
    donate.setHorizontalAlignment(SwingConstants.CENTER);
    optifine.setAlignmentX(CENTER_ALIGNMENT);
    optifine.setHorizontalAlignment(SwingConstants.CENTER);

    this.add(Box.createRigidArea(new Dimension(5, 20)));
    this.add(github);
    this.add(wiki);
    this.add(donate);
    this.add(optifine);

    this.setAlignmentX(LEFT_ALIGNMENT);
    updateFilePath();
    updateInstructions();
}