Package java.awt

Examples of java.awt.GridBagConstraints


            }
        });

        JPanel panel = new JPanel();
        GridBagLayout gridbag = new GridBagLayout();
        GridBagConstraints c = new GridBagConstraints();
        c.anchor = GridBagConstraints.WEST;
        c.weightx = 1;
        panel.setLayout(gridbag);
        gridbag.setConstraints(button, c);
        panel.add(button);
View Full Code Here


    public Component getCustomEditor() {
        button.addActionListener(this);

        JPanel jp = new JPanel();
        GridBagLayout gridbag = new GridBagLayout();
        GridBagConstraints c = new GridBagConstraints();
        jp.setLayout(gridbag);

        c.weightx = 1f;
        c.fill = GridBagConstraints.HORIZONTAL;
        gridbag.setConstraints(textField, c);
View Full Code Here

    /** Returns the editor GUI, ie a JTextField. */
    public Component getCustomEditor() {
        JPanel panel = new JPanel();

        GridBagLayout gridbag = new GridBagLayout();
        GridBagConstraints c = new GridBagConstraints();
        c.anchor = GridBagConstraints.WEST;
        panel.setLayout(gridbag);

        if (!getUseAltCommandStrings()) {
            trueButton.setActionCommand(TrueString);
View Full Code Here

    }
   
    public Component getGUI() {
        JPanel panel = new JPanel();
        GridBagLayout gridbag = new GridBagLayout();
        GridBagConstraints c = new GridBagConstraints();
        c.gridwidth = GridBagConstraints.REMAINDER;
        c.weightx = 1f;
        c.fill = GridBagConstraints.HORIZONTAL;
        panel.setLayout(gridbag);
View Full Code Here

        JPanel jp = new JPanel();
        textField.addActionListener(this);
        textField.addFocusListener(this);

        GridBagLayout gridbag = new GridBagLayout();
        GridBagConstraints c = new GridBagConstraints();
        jp.setLayout(gridbag);

        c.weightx = 1f;
        c.fill = GridBagConstraints.HORIZONTAL;
        gridbag.setConstraints(textField, c);
View Full Code Here

     * GridBagConstraints for that layout. This method can be
     * overridden to make general adjustments to the constraints, like
     * inset settings, etc.
     */
    protected GridBagConstraints getGridBagConstraints() {
        GridBagConstraints constraints = new GridBagConstraints();
        constraints.insets = new Insets(0, 2, 0, 2);
        return constraints;
    }
View Full Code Here

     * longitude
     */
    protected void makeWidgets() {
        String locText;
        GridBagLayout gridbag = new GridBagLayout();
        GridBagConstraints c = new GridBagConstraints();

        setLayout(gridbag);
        locText = i18n.get(CoordPanel.class, "border", "Decimal Degrees");
        setBorder(new TitledBorder(new EtchedBorder(), locText));

View Full Code Here

        panDelegate = new PanSupport(this);
        centerDelegate = new CenterSupport(this);

        JPanel panel = new JPanel();
        GridBagLayout internalGridbag = new GridBagLayout();
        GridBagConstraints c2 = new GridBagConstraints();
        panel.setLayout(internalGridbag);

        // begin top row
        String info = i18n.get(NavigatePanel.class,
                "panNW.tooltip",
View Full Code Here

        prefixTextField = new JTextField(defaultLayerName, 12);

        Object[] layerTypes = getLayerClasses().keySet().toArray();
       
        GridBagLayout gridbag = new GridBagLayout();
        GridBagConstraints c = new GridBagConstraints();
        setLayout(gridbag);
        c.fill = GridBagConstraints.HORIZONTAL;
        c.weightx = 1.0;
        c.gridwidth = GridBagConstraints.REMAINDER;
        c.insets = new Insets(10, 10, 5, 10);
View Full Code Here

    sourcefc = new JFileChooser();
    sourcefc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
    targetfc = new JFileChooser();
    targetfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);

    GridBagConstraints constraint;

    JPanel pane = new JPanel();
    pane.setLayout(new GridBagLayout());

    JLabel srclbl = new JLabel("Source file/dir:");
    constraint = new GridBagConstraints();
    constraint.gridx = 0;
    constraint.gridy = 0;
    pane.add(srclbl, constraint);

    source = new JTextField(FILEFIELDSIZE);
    constraint = new GridBagConstraints();
    constraint.gridx = 1;
    constraint.gridy = 0;
    pane.add(source, constraint);

    srcbutton = new JButton("Choose");
    constraint = new GridBagConstraints();
    constraint.gridx = 2;
    constraint.gridy = 0;
    pane.add(srcbutton, constraint);

    srcbutton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        srcbuttonActionPerformed(evt);
      }
    });

    JLabel targetlbl = new JLabel("Target file/dir:");
    constraint = new GridBagConstraints();
    constraint.gridx = 0;
    constraint.gridy = 1;
    pane.add(targetlbl, constraint);

    target = new JTextField(FILEFIELDSIZE);
    constraint = new GridBagConstraints();
    constraint.gridx = 1;
    constraint.gridy = 1;
    pane.add(target, constraint);

    targetbutton = new JButton("Choose");
    constraint = new GridBagConstraints();
    constraint.gridx = 2;
    constraint.gridy = 1;
    pane.add(targetbutton, constraint);
    targetbutton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
View Full Code Here

TOP

Related Classes of java.awt.GridBagConstraints

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.