Example usage for java.awt TextField setText

List of usage examples for java.awt TextField setText

Introduction

In this page you can find the example usage for java.awt TextField setText.

Prototype

public void setText(String t) 

Source Link

Document

Sets the text that is presented by this text component to be the specified text.

Usage

From source file:SystemFileTree.java

public static void main(String[] args) {
    final Display display = new Display();
    final Shell shell = new Shell(display);

    RGB color = shell.getBackground().getRGB();
    Label separator1 = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
    Label locationLb = new Label(shell, SWT.NONE);
    locationLb.setText("Location:");
    Composite locationComp = new Composite(shell, SWT.EMBEDDED);
    Label separator2 = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
    final Composite comp = new Composite(shell, SWT.NONE);
    final Tree fileTree = new Tree(comp, SWT.SINGLE | SWT.BORDER);
    Sash sash = new Sash(comp, SWT.VERTICAL);
    Composite tableComp = new Composite(comp, SWT.EMBEDDED);
    Label separator3 = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
    Composite statusComp = new Composite(shell, SWT.EMBEDDED);

    java.awt.Frame locationFrame = SWT_AWT.new_Frame(locationComp);
    final java.awt.TextField locationText = new java.awt.TextField();
    locationFrame.add(locationText);//from www .  j a va2s.co  m

    java.awt.Frame statusFrame = SWT_AWT.new_Frame(statusComp);
    statusFrame.setBackground(new java.awt.Color(color.red, color.green, color.blue));
    final java.awt.Label statusLabel = new java.awt.Label();
    statusFrame.add(statusLabel);
    statusLabel.setText("Select a file");

    sash.addListener(SWT.Selection, new Listener() {
        public void handleEvent(Event e) {
            if (e.detail == SWT.DRAG)
                return;
            GridData data = (GridData) fileTree.getLayoutData();
            Rectangle trim = fileTree.computeTrim(0, 0, 0, 0);
            data.widthHint = e.x - trim.width;
            comp.layout();
        }
    });

    File[] roots = File.listRoots();
    for (int i = 0; i < roots.length; i++) {
        File file = roots[i];
        TreeItem treeItem = new TreeItem(fileTree, SWT.NONE);
        treeItem.setText(file.getAbsolutePath());
        treeItem.setData(file);
        new TreeItem(treeItem, SWT.NONE);
    }
    fileTree.addListener(SWT.Expand, new Listener() {
        public void handleEvent(Event e) {
            TreeItem item = (TreeItem) e.item;
            if (item == null)
                return;
            if (item.getItemCount() == 1) {
                TreeItem firstItem = item.getItems()[0];
                if (firstItem.getData() != null)
                    return;
                firstItem.dispose();
            } else {
                return;
            }
            File root = (File) item.getData();
            File[] files = root.listFiles();
            if (files == null)
                return;
            for (int i = 0; i < files.length; i++) {
                File file = files[i];
                if (file.isDirectory()) {
                    TreeItem treeItem = new TreeItem(item, SWT.NONE);
                    treeItem.setText(file.getName());
                    treeItem.setData(file);
                    new TreeItem(treeItem, SWT.NONE);
                }
            }
        }
    });
    fileTree.addListener(SWT.Selection, new Listener() {
        public void handleEvent(Event e) {
            TreeItem item = (TreeItem) e.item;
            if (item == null)
                return;
            final File root = (File) item.getData();
            statusLabel.setText(root.getAbsolutePath());
            locationText.setText(root.getAbsolutePath());
        }
    });

    GridLayout layout = new GridLayout(4, false);
    layout.marginWidth = layout.marginHeight = 0;
    layout.horizontalSpacing = layout.verticalSpacing = 1;
    shell.setLayout(layout);
    GridData data;
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 4;
    separator1.setLayoutData(data);
    data = new GridData();
    data.horizontalSpan = 1;
    data.horizontalIndent = 10;
    locationLb.setLayoutData(data);
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 2;
    data.heightHint = locationText.getPreferredSize().height;
    locationComp.setLayoutData(data);
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 1;
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 4;
    separator2.setLayoutData(data);
    data = new GridData(GridData.FILL_BOTH);
    data.horizontalSpan = 4;
    comp.setLayoutData(data);
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 4;
    separator3.setLayoutData(data);
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 4;
    data.heightHint = statusLabel.getPreferredSize().height;
    statusComp.setLayoutData(data);

    layout = new GridLayout(3, false);
    layout.marginWidth = layout.marginHeight = 0;
    layout.horizontalSpacing = layout.verticalSpacing = 1;
    comp.setLayout(layout);
    data = new GridData(GridData.FILL_VERTICAL);
    data.widthHint = 200;
    fileTree.setLayoutData(data);
    data = new GridData(GridData.FILL_VERTICAL);
    sash.setLayoutData(data);
    data = new GridData(GridData.FILL_BOTH);
    tableComp.setLayoutData(data);

    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch())
            display.sleep();
    }
    display.dispose();
}

From source file:org.eclipse.swt.snippets.Snippet135.java

public static void main(String[] args) {
    final Display display = new Display();
    final Shell shell = new Shell(display);
    shell.setText("SWT and Swing/AWT Example");

    Listener exitListener = e -> {//from   ww  w .j av a  2 s .  c  om
        MessageBox dialog = new MessageBox(shell, SWT.OK | SWT.CANCEL | SWT.ICON_QUESTION);
        dialog.setText("Question");
        dialog.setMessage("Exit?");
        if (e.type == SWT.Close)
            e.doit = false;
        if (dialog.open() != SWT.OK)
            return;
        shell.dispose();
    };
    Listener aboutListener = e -> {
        final Shell s = new Shell(shell, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
        s.setText("About");
        GridLayout layout = new GridLayout(1, false);
        layout.verticalSpacing = 20;
        layout.marginHeight = layout.marginWidth = 10;
        s.setLayout(layout);
        Label label = new Label(s, SWT.NONE);
        label.setText("SWT and AWT Example.");
        Button button = new Button(s, SWT.PUSH);
        button.setText("OK");
        GridData data = new GridData();
        data.horizontalAlignment = GridData.CENTER;
        button.setLayoutData(data);
        button.addListener(SWT.Selection, event -> s.dispose());
        s.pack();
        Rectangle parentBounds = shell.getBounds();
        Rectangle bounds = s.getBounds();
        int x = parentBounds.x + (parentBounds.width - bounds.width) / 2;
        int y = parentBounds.y + (parentBounds.height - bounds.height) / 2;
        s.setLocation(x, y);
        s.open();
        while (!s.isDisposed()) {
            if (!display.readAndDispatch())
                display.sleep();
        }
    };
    shell.addListener(SWT.Close, exitListener);
    Menu mb = new Menu(shell, SWT.BAR);
    MenuItem fileItem = new MenuItem(mb, SWT.CASCADE);
    fileItem.setText("&File");
    Menu fileMenu = new Menu(shell, SWT.DROP_DOWN);
    fileItem.setMenu(fileMenu);
    MenuItem exitItem = new MenuItem(fileMenu, SWT.PUSH);
    exitItem.setText("&Exit\tCtrl+X");
    exitItem.setAccelerator(SWT.CONTROL + 'X');
    exitItem.addListener(SWT.Selection, exitListener);
    MenuItem aboutItem = new MenuItem(fileMenu, SWT.PUSH);
    aboutItem.setText("&About\tCtrl+A");
    aboutItem.setAccelerator(SWT.CONTROL + 'A');
    aboutItem.addListener(SWT.Selection, aboutListener);
    shell.setMenuBar(mb);

    RGB color = shell.getBackground().getRGB();
    Label separator1 = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
    Label locationLb = new Label(shell, SWT.NONE);
    locationLb.setText("Location:");
    Composite locationComp = new Composite(shell, SWT.EMBEDDED);
    ToolBar toolBar = new ToolBar(shell, SWT.FLAT);
    ToolItem exitToolItem = new ToolItem(toolBar, SWT.PUSH);
    exitToolItem.setText("&Exit");
    exitToolItem.addListener(SWT.Selection, exitListener);
    ToolItem aboutToolItem = new ToolItem(toolBar, SWT.PUSH);
    aboutToolItem.setText("&About");
    aboutToolItem.addListener(SWT.Selection, aboutListener);
    Label separator2 = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
    final Composite comp = new Composite(shell, SWT.NONE);
    final Tree fileTree = new Tree(comp, SWT.SINGLE | SWT.BORDER);
    Sash sash = new Sash(comp, SWT.VERTICAL);
    Composite tableComp = new Composite(comp, SWT.EMBEDDED);
    Label separator3 = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
    Composite statusComp = new Composite(shell, SWT.EMBEDDED);

    java.awt.Frame locationFrame = SWT_AWT.new_Frame(locationComp);
    final java.awt.TextField locationText = new java.awt.TextField();
    locationFrame.add(locationText);

    java.awt.Frame fileTableFrame = SWT_AWT.new_Frame(tableComp);
    java.awt.Panel panel = new java.awt.Panel(new java.awt.BorderLayout());
    fileTableFrame.add(panel);
    final JTable fileTable = new JTable(new FileTableModel(null));
    fileTable.setDoubleBuffered(true);
    fileTable.setShowGrid(false);
    fileTable.createDefaultColumnsFromModel();
    JScrollPane scrollPane = new JScrollPane(fileTable);
    panel.add(scrollPane);

    java.awt.Frame statusFrame = SWT_AWT.new_Frame(statusComp);
    statusFrame.setBackground(new java.awt.Color(color.red, color.green, color.blue));
    final java.awt.Label statusLabel = new java.awt.Label();
    statusFrame.add(statusLabel);
    statusLabel.setText("Select a file");

    sash.addListener(SWT.Selection, e -> {
        if (e.detail == SWT.DRAG)
            return;
        GridData data = (GridData) fileTree.getLayoutData();
        Rectangle trim = fileTree.computeTrim(0, 0, 0, 0);
        data.widthHint = e.x - trim.width;
        comp.layout();
    });

    File[] roots = File.listRoots();
    for (int i = 0; i < roots.length; i++) {
        File file = roots[i];
        TreeItem treeItem = new TreeItem(fileTree, SWT.NONE);
        treeItem.setText(file.getAbsolutePath());
        treeItem.setData(file);
        new TreeItem(treeItem, SWT.NONE);
    }
    fileTree.addListener(SWT.Expand, e -> {
        TreeItem item = (TreeItem) e.item;
        if (item == null)
            return;
        if (item.getItemCount() == 1) {
            TreeItem firstItem = item.getItems()[0];
            if (firstItem.getData() != null)
                return;
            firstItem.dispose();
        } else {
            return;
        }
        File root = (File) item.getData();
        File[] files = root.listFiles();
        if (files == null)
            return;
        for (int i = 0; i < files.length; i++) {
            File file = files[i];
            if (file.isDirectory()) {
                TreeItem treeItem = new TreeItem(item, SWT.NONE);
                treeItem.setText(file.getName());
                treeItem.setData(file);
                new TreeItem(treeItem, SWT.NONE);
            }
        }
    });
    fileTree.addListener(SWT.Selection, e -> {
        TreeItem item = (TreeItem) e.item;
        if (item == null)
            return;
        final File root = (File) item.getData();
        EventQueue.invokeLater(() -> {
            statusLabel.setText(root.getAbsolutePath());
            locationText.setText(root.getAbsolutePath());
            fileTable.setModel(new FileTableModel(root.listFiles()));
        });
    });

    GridLayout layout = new GridLayout(4, false);
    layout.marginWidth = layout.marginHeight = 0;
    layout.horizontalSpacing = layout.verticalSpacing = 1;
    shell.setLayout(layout);
    GridData data;
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 4;
    separator1.setLayoutData(data);
    data = new GridData();
    data.horizontalSpan = 1;
    data.horizontalIndent = 10;
    locationLb.setLayoutData(data);
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 2;
    data.heightHint = locationText.getPreferredSize().height;
    locationComp.setLayoutData(data);
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 1;
    toolBar.setLayoutData(data);
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 4;
    separator2.setLayoutData(data);
    data = new GridData(GridData.FILL_BOTH);
    data.horizontalSpan = 4;
    comp.setLayoutData(data);
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 4;
    separator3.setLayoutData(data);
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 4;
    data.heightHint = statusLabel.getPreferredSize().height;
    statusComp.setLayoutData(data);

    layout = new GridLayout(3, false);
    layout.marginWidth = layout.marginHeight = 0;
    layout.horizontalSpacing = layout.verticalSpacing = 1;
    comp.setLayout(layout);
    data = new GridData(GridData.FILL_VERTICAL);
    data.widthHint = 200;
    fileTree.setLayoutData(data);
    data = new GridData(GridData.FILL_VERTICAL);
    sash.setLayoutData(data);
    data = new GridData(GridData.FILL_BOTH);
    tableComp.setLayoutData(data);

    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch())
            display.sleep();
    }
    display.dispose();
}

From source file:Snippet135.java

public static void main(String[] args) {
    final Display display = new Display();
    final Shell shell = new Shell(display);
    shell.setText("SWT and Swing/AWT Example");

    Listener exitListener = new Listener() {
        public void handleEvent(Event e) {
            MessageBox dialog = new MessageBox(shell, SWT.OK | SWT.CANCEL | SWT.ICON_QUESTION);
            dialog.setText("Question");
            dialog.setMessage("Exit?");
            if (e.type == SWT.Close)
                e.doit = false;//  w  w w  .  j  a v  a2s  . c  o m
            if (dialog.open() != SWT.OK)
                return;
            shell.dispose();
        }
    };
    Listener aboutListener = new Listener() {
        public void handleEvent(Event e) {
            final Shell s = new Shell(shell, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
            s.setText("About");
            GridLayout layout = new GridLayout(1, false);
            layout.verticalSpacing = 20;
            layout.marginHeight = layout.marginWidth = 10;
            s.setLayout(layout);
            Label label = new Label(s, SWT.NONE);
            label.setText("SWT and AWT Example.");
            Button button = new Button(s, SWT.PUSH);
            button.setText("OK");
            GridData data = new GridData();
            data.horizontalAlignment = GridData.CENTER;
            button.setLayoutData(data);
            button.addListener(SWT.Selection, new Listener() {
                public void handleEvent(Event event) {
                    s.dispose();
                }
            });
            s.pack();
            Rectangle parentBounds = shell.getBounds();
            Rectangle bounds = s.getBounds();
            int x = parentBounds.x + (parentBounds.width - bounds.width) / 2;
            int y = parentBounds.y + (parentBounds.height - bounds.height) / 2;
            s.setLocation(x, y);
            s.open();
            while (!s.isDisposed()) {
                if (!display.readAndDispatch())
                    display.sleep();
            }
        }
    };
    shell.addListener(SWT.Close, exitListener);
    Menu mb = new Menu(shell, SWT.BAR);
    MenuItem fileItem = new MenuItem(mb, SWT.CASCADE);
    fileItem.setText("&File");
    Menu fileMenu = new Menu(shell, SWT.DROP_DOWN);
    fileItem.setMenu(fileMenu);
    MenuItem exitItem = new MenuItem(fileMenu, SWT.PUSH);
    exitItem.setText("&Exit\tCtrl+X");
    exitItem.setAccelerator(SWT.CONTROL + 'X');
    exitItem.addListener(SWT.Selection, exitListener);
    MenuItem aboutItem = new MenuItem(fileMenu, SWT.PUSH);
    aboutItem.setText("&About\tCtrl+A");
    aboutItem.setAccelerator(SWT.CONTROL + 'A');
    aboutItem.addListener(SWT.Selection, aboutListener);
    shell.setMenuBar(mb);

    RGB color = shell.getBackground().getRGB();
    Label separator1 = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
    Label locationLb = new Label(shell, SWT.NONE);
    locationLb.setText("Location:");
    Composite locationComp = new Composite(shell, SWT.EMBEDDED);
    ToolBar toolBar = new ToolBar(shell, SWT.FLAT);
    ToolItem exitToolItem = new ToolItem(toolBar, SWT.PUSH);
    exitToolItem.setText("&Exit");
    exitToolItem.addListener(SWT.Selection, exitListener);
    ToolItem aboutToolItem = new ToolItem(toolBar, SWT.PUSH);
    aboutToolItem.setText("&About");
    aboutToolItem.addListener(SWT.Selection, aboutListener);
    Label separator2 = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
    final Composite comp = new Composite(shell, SWT.NONE);
    final Tree fileTree = new Tree(comp, SWT.SINGLE | SWT.BORDER);
    Sash sash = new Sash(comp, SWT.VERTICAL);
    Composite tableComp = new Composite(comp, SWT.EMBEDDED);
    Label separator3 = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
    Composite statusComp = new Composite(shell, SWT.EMBEDDED);

    java.awt.Frame locationFrame = SWT_AWT.new_Frame(locationComp);
    final java.awt.TextField locationText = new java.awt.TextField();
    locationFrame.add(locationText);

    java.awt.Frame fileTableFrame = SWT_AWT.new_Frame(tableComp);
    java.awt.Panel panel = new java.awt.Panel(new java.awt.BorderLayout());
    fileTableFrame.add(panel);
    final JTable fileTable = new JTable(new FileTableModel(null));
    fileTable.setDoubleBuffered(true);
    fileTable.setShowGrid(false);
    fileTable.createDefaultColumnsFromModel();
    JScrollPane scrollPane = new JScrollPane(fileTable);
    panel.add(scrollPane);

    java.awt.Frame statusFrame = SWT_AWT.new_Frame(statusComp);
    statusFrame.setBackground(new java.awt.Color(color.red, color.green, color.blue));
    final java.awt.Label statusLabel = new java.awt.Label();
    statusFrame.add(statusLabel);
    statusLabel.setText("Select a file");

    sash.addListener(SWT.Selection, new Listener() {
        public void handleEvent(Event e) {
            if (e.detail == SWT.DRAG)
                return;
            GridData data = (GridData) fileTree.getLayoutData();
            Rectangle trim = fileTree.computeTrim(0, 0, 0, 0);
            data.widthHint = e.x - trim.width;
            comp.layout();
        }
    });

    File[] roots = File.listRoots();
    for (int i = 0; i < roots.length; i++) {
        File file = roots[i];
        TreeItem treeItem = new TreeItem(fileTree, SWT.NONE);
        treeItem.setText(file.getAbsolutePath());
        treeItem.setData(file);
        new TreeItem(treeItem, SWT.NONE);
    }
    fileTree.addListener(SWT.Expand, new Listener() {
        public void handleEvent(Event e) {
            TreeItem item = (TreeItem) e.item;
            if (item == null)
                return;
            if (item.getItemCount() == 1) {
                TreeItem firstItem = item.getItems()[0];
                if (firstItem.getData() != null)
                    return;
                firstItem.dispose();
            } else {
                return;
            }
            File root = (File) item.getData();
            File[] files = root.listFiles();
            if (files == null)
                return;
            for (int i = 0; i < files.length; i++) {
                File file = files[i];
                if (file.isDirectory()) {
                    TreeItem treeItem = new TreeItem(item, SWT.NONE);
                    treeItem.setText(file.getName());
                    treeItem.setData(file);
                    new TreeItem(treeItem, SWT.NONE);
                }
            }
        }
    });
    fileTree.addListener(SWT.Selection, new Listener() {
        public void handleEvent(Event e) {
            TreeItem item = (TreeItem) e.item;
            if (item == null)
                return;
            final File root = (File) item.getData();
            EventQueue.invokeLater(new Runnable() {
                public void run() {
                    statusLabel.setText(root.getAbsolutePath());
                    locationText.setText(root.getAbsolutePath());
                    fileTable.setModel(new FileTableModel(root.listFiles()));
                }
            });
        }
    });

    GridLayout layout = new GridLayout(4, false);
    layout.marginWidth = layout.marginHeight = 0;
    layout.horizontalSpacing = layout.verticalSpacing = 1;
    shell.setLayout(layout);
    GridData data;
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 4;
    separator1.setLayoutData(data);
    data = new GridData();
    data.horizontalSpan = 1;
    data.horizontalIndent = 10;
    locationLb.setLayoutData(data);
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 2;
    data.heightHint = locationText.getPreferredSize().height;
    locationComp.setLayoutData(data);
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 1;
    toolBar.setLayoutData(data);
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 4;
    separator2.setLayoutData(data);
    data = new GridData(GridData.FILL_BOTH);
    data.horizontalSpan = 4;
    comp.setLayoutData(data);
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 4;
    separator3.setLayoutData(data);
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 4;
    data.heightHint = statusLabel.getPreferredSize().height;
    statusComp.setLayoutData(data);

    layout = new GridLayout(3, false);
    layout.marginWidth = layout.marginHeight = 0;
    layout.horizontalSpacing = layout.verticalSpacing = 1;
    comp.setLayout(layout);
    data = new GridData(GridData.FILL_VERTICAL);
    data.widthHint = 200;
    fileTree.setLayoutData(data);
    data = new GridData(GridData.FILL_VERTICAL);
    sash.setLayoutData(data);
    data = new GridData(GridData.FILL_BOTH);
    tableComp.setLayoutData(data);

    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch())
            display.sleep();
    }
    display.dispose();
}

From source file:de.biomedical_imaging.ij.steger.Lines_.java

@Override
public boolean dialogItemChanged(GenericDialog gd, AWTEvent e) {
    imp.setOverlay(null);/*from w  w w.jav  a 2s . c o m*/
    boolean lwChanged = false;
    boolean contHighChanged = false;
    boolean contLowChanged = false;
    boolean darklineChanged = false;

    double lwCand = gd.getNextNumber();
    double diff = Math.abs(lwCand - lineWidth);
    if (diff > 0.0001) {
        lineWidth = lwCand;
        lwChanged = true;
    }
    double conCand = gd.getNextNumber();
    diff = Math.abs(conCand - contrastHigh);
    if (diff > 0.0001) {
        contrastHigh = conCand;
        contHighChanged = true;
    }

    conCand = gd.getNextNumber();
    diff = Math.abs(conCand - contrastLow);
    if (diff > 0.0001) {
        contrastLow = conCand;
        contLowChanged = true;
    }

    boolean darklineCand = gd.getNextBoolean();
    if (darklineCand != isDarkLine) {
        isDarkLine = darklineCand;
        darklineChanged = true;
    }

    doCorrectPosition = gd.getNextBoolean();
    doEstimateWidth = gd.getNextBoolean();
    doExtendLine = gd.getNextBoolean();
    showJunctionPoints = gd.getNextBoolean();
    showIDs = gd.getNextBoolean();
    verbose = gd.getNextBoolean();
    displayResults = gd.getNextBoolean();
    addToRoiManager = gd.getNextBoolean();
    overlapOption = OverlapOption.valueOf(gd.getNextChoice());
    if (lwChanged || contHighChanged || contLowChanged) {
        contrastOrLineWidthChangedOnce = true;
    }

    if (lwChanged || contHighChanged || contLowChanged || (darklineChanged && contrastOrLineWidthChangedOnce)) {
        double estimatedSigma = lineWidth / (2 * Math.sqrt(3)) + 0.5;
        TextField textSigma = (TextField) gd.getNumericFields().get(3);
        textSigma.setText("" + IJ.d2s(estimatedSigma, 2));
        textSigma.setEditable(true);
        double clow = contrastLow;
        if (isDarkLine) {
            clow = 255 - contrastHigh;
        }
        double estimatedLowerThresh = Math.floor(Math.abs(-2 * clow * (lineWidth / 2.0)
                / (Math.sqrt(2 * Math.PI) * estimatedSigma * estimatedSigma * estimatedSigma)
                * Math.exp(-((lineWidth / 2.0) * (lineWidth / 2.0)) / (2 * estimatedSigma * estimatedSigma))));
        TextField textLowThresh = (TextField) gd.getNumericFields().get(4);
        textLowThresh.setText("" + IJ.d2s(estimatedLowerThresh * 0.17, 2));
        textLowThresh.setEditable(true);
        double chigh = contrastHigh;
        if (isDarkLine) {
            chigh = 255 - contrastLow;
        }
        double estimatedUpperThresh = Math.floor(Math.abs(-2 * chigh * (lineWidth / 2.0)
                / (Math.sqrt(2 * Math.PI) * estimatedSigma * estimatedSigma * estimatedSigma)
                * Math.exp(-((lineWidth / 2.0) * (lineWidth / 2.0)) / (2 * estimatedSigma * estimatedSigma))));
        TextField textUppThresh = (TextField) gd.getNumericFields().get(5);
        textUppThresh.setText("" + IJ.d2s(estimatedUpperThresh * 0.17, 2));
        textUppThresh.setEditable(true);
    }
    sigma = gd.getNextNumber();
    lowerThresh = gd.getNextNumber();
    upperThresh = gd.getNextNumber();
    if (lowerThresh >= upperThresh || sigma < 0.4 || Double.isNaN(sigma + lowerThresh + upperThresh)) {
        return false;
    }

    isPreview = gd.isPreviewActive();

    return true;
}

From source file:gdsc.smlm.ij.plugins.ResultsManager.java

public void mouseClicked(MouseEvent e) {
    if (e.getClickCount() > 1) // Double-click
    {/*from w w w .  j ava 2 s  .  c  o  m*/
        TextField text = (e.getSource() == text1) ? text1 : text2;
        String[] path = Utils.decodePath(text.getText());
        OpenDialog chooser = new OpenDialog("Coordinate file", path[0], path[1]);
        if (chooser.getFileName() != null) {
            text.setText(chooser.getDirectory() + chooser.getFileName());
        }
    }
}

From source file:net.sf.freecol.FreeCol.java

public static void startYourAddition() throws FontFormatException, IOException {
    Frame mainFrame;/*from w ww .ja  va2  s . c o  m*/
    Frame mainFrame2;
    TextField t1;
    TextField t2;
    TextField t3;
    TextField t4;
    Frame mainFrame3 = new Frame("Haha, am i middle?");
    mainFrame = new Frame("Haha, am I right?!");
    mainFrame.setSize(400, 400);
    mainFrame.setLayout(null);

    t1 = new TextField("Enter here");
    t1.setBounds(160, 200, 150, 50);

    t2 = new TextField("What grade do we deserve?");
    t3 = new TextField("Enter here");
    t3.setBounds(160, 200, 150, 50);

    t4 = new TextField("What letter grade do we deserve?");
    Button b = new Button("click ----->");
    b.setBounds(30, 250, 130, 30);
    b.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {

            t2.setText("I think you meant 100");
        }
    });
    Button c = new Button("Submit");
    c.setBounds(150, 250, 80, 30);
    c.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {

            String in = t1.getText();
            if (in.equals("100")) {
                t1.setText("Correct");
                t1.setEditable(false);
                t1.setBackground(new Color(95, 216, 109));

                if (t3.getText().equals("Correct")) {
                    mainFrame3.setVisible(true);
                }
            } else {
                t1.setText("Wrong");
                t1.setBackground(new Color(214, 81, 96));
            }
        }
    });

    t2.setBounds(160, 0, 175, 100);
    t2.setEditable(false);

    mainFrame.add(b);
    mainFrame.add(c);
    mainFrame.add(t1);
    mainFrame.add(t2);

    mainFrame.setLocation(1280, 0);

    mainFrame.setVisible(true);

    ///////////////The left area below and above is right

    mainFrame2 = new Frame("Haha, am i left?");
    mainFrame2.setSize(400, 400);
    mainFrame2.setLayout(null);

    Button b2 = new Button("click ----->");
    b2.setBounds(30, 250, 130, 30);
    b2.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {

            t4.setText("I think you meant A");
        }
    });
    Button c2 = new Button("Submit");
    c2.setBounds(150, 250, 80, 30);
    c2.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {

            String in = t3.getText();
            if (in.equals("A")) {
                t3.setText("Correct");
                t3.setEditable(false);
                t3.setBackground(new Color(95, 216, 109));

                if (t1.getText().equals("Correct")) {
                    mainFrame3.setVisible(true);
                }

            } else {
                t3.setText("Wrong");
                t3.setBackground(new Color(214, 81, 96));
            }
        }
    });

    t4.setBounds(120, 0, 220, 100);
    t4.setEditable(false);

    mainFrame2.add(b2);
    mainFrame2.add(c2);
    mainFrame2.add(t3);
    mainFrame2.add(t4);

    mainFrame2.setVisible(true);

    //Overall correct

    mainFrame3.setSize(400, 400);
    mainFrame3.setLayout(null);
    mainFrame3.setLocation(640, 420);
    mainFrame3.setBackground(new Color(95, 216, 109));
    TextField t6 = new TextField("Soooooo give us an A!!!");
    t6.setBounds(160, 200, 200, 50);
    t6.setBackground(new Color(102, 136, 232));

    mainFrame3.add(t6);
}

From source file:gdsc.smlm.ij.plugins.SpotAnalysis.java

private Panel createTextPanel(TextField textField, String label, String value) {
    Panel panel = new Panel();
    panel.setLayout(new BorderLayout());
    Label listLabel = new Label(label, 0);
    //listLabel.setFont(monoFont);
    //textField.setSize(fontWidth * 3, fontWidth);
    textField.setText(value);
    panel.add(listLabel, BorderLayout.WEST);
    panel.add(textField, BorderLayout.CENTER);
    return panel;
}

From source file:customize.swing.startMain.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - unknown
    panel1 = new JPanel();
    JPanel panel2 = new JPanel();
    JScrollPane scrollPane1 = new JScrollPane();
    JPanel panel3 = new JPanel();
    JPanel panel4 = new JPanel();
    JPanel panel5 = new JPanel();
    textField6 = new JTextField();
    JPanel panel6 = new JPanel();
    JLabel label1 = new JLabel();
    JPanel panel7 = new JPanel();
    JLabel label2 = new JLabel();
    JPanel panel8 = new JPanel();
    JLabel label3 = new JLabel();
    JPanel panel9 = new JPanel();
    textField2 = new JTextField();
    ButtonView = new JButton();
    JPanel panel10 = new JPanel();
    textField7 = new JTextField();
    JPanel panel11 = new JPanel();
    textField1 = new JTextField();
    JPanel panel12 = new JPanel();
    JLabel label4 = new JLabel();
    JPanel panel13 = new JPanel();
    CheckBox1 = new JCheckBox();
    CheckBox2 = new JCheckBox();
    JPanel panel14 = new JPanel();
    genButton = new JButton();
    JScrollPane scrollPane2 = new JScrollPane();
    JPanel panel15 = new JPanel();
    JPanel panel16 = new JPanel();
    TextField = new JTextField();
    JPanel panel17 = new JPanel();
    textField3 = new JTextField();
    JPanel panel18 = new JPanel();
    rootTextField = new JTextField();
    JPanel panel19 = new JPanel();
    PasswordField = new JPasswordField();
    JPanel panel20 = new JPanel();
    textField8 = new JTextField();
    JPanel panel21 = new JPanel();
    JLabel label5 = new JLabel();
    JPanel panel22 = new JPanel();
    JLabel label6 = new JLabel();
    JPanel panel23 = new JPanel();
    JLabel label7 = new JLabel();
    JPanel panel24 = new JPanel();
    JLabel label8 = new JLabel();
    JPanel panel25 = new JPanel();
    JLabel label9 = new JLabel();
    JScrollPane scrollPane3 = new JScrollPane();
    jscrollPane1 = new JTextPane();

    //======== panel1 ========
    {/*from  w  ww.jav  a 2 s .  c om*/

        // JFormDesigner evaluation mark
        panel1.setBorder(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),
                panel1.getBorder()));
        panel1.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent e) {
                if ("border".equals(e.getPropertyName()))
                    throw new RuntimeException();
            }
        });

        panel1.setLayout(new GridLayoutManager(5, 1, new Insets(0, 0, 0, 0), -1, -1));

        //======== panel2 ========
        {
            panel2.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));

            //======== scrollPane1 ========
            {
                scrollPane1.setBorder(new TitledBorder("\u6587\u4ef6\u751f\u6210\u5730\u5740"));

                //======== panel3 ========
                {
                    panel3.setLayout(new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));

                    //======== panel4 ========
                    {
                        panel4.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                        //======== panel5 ========
                        {
                            panel5.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                            //---- textField6 ----
                            textField6.setEditable(true);
                            textField6.setEnabled(true);
                            textField6.setText("");
                            textField6.putClientProperty("html.disable", false);
                            panel5.add(textField6,
                                    new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST,
                                            GridConstraints.FILL_HORIZONTAL,
                                            GridConstraints.SIZEPOLICY_CAN_GROW
                                                    | GridConstraints.SIZEPOLICY_WANT_GROW,
                                            GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                        }
                        panel4.add(panel5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                GridConstraints.FILL_BOTH,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                null, null, null));
                    }
                    panel3.add(panel4,
                            new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_BOTH,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    null, null, null));

                    //======== panel6 ========
                    {
                        panel6.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                        //---- label1 ----
                        label1.setText("xml\u751f\u6210\u5728\u54ea\u4e2a\u5305\u540d\u4e0b");
                        panel6.add(label1,
                                new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                        GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                    }
                    panel3.add(panel6,
                            new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_BOTH,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    null, null, null));

                    //======== panel7 ========
                    {
                        panel7.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                        //---- label2 ----
                        label2.setText("model\u751f\u6210\u5728\u54ea\u4e2a\u5305\u540d\u4e0b");
                        panel7.add(label2,
                                new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                        GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                    }
                    panel3.add(panel7,
                            new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_BOTH,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    null, null, null));

                    //======== panel8 ========
                    {
                        panel8.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                        //---- label3 ----
                        label3.setText("\u6587\u4ef6\u7edf\u4e00\u751f\u6210\u8def\u5f84");
                        panel8.add(label3,
                                new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                        GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                    }
                    panel3.add(panel8,
                            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_BOTH,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    null, null, null));

                    //======== panel9 ========
                    {
                        panel9.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
                        panel9.add(textField2,
                                new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST,
                                        GridConstraints.FILL_HORIZONTAL,
                                        GridConstraints.SIZEPOLICY_CAN_GROW
                                                | GridConstraints.SIZEPOLICY_WANT_GROW,
                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null));

                        //---- ButtonView ----
                        ButtonView.setText("\u6d4f\u89c8");
                        panel9.add(ButtonView,
                                new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
                                        GridConstraints.FILL_HORIZONTAL,
                                        GridConstraints.SIZEPOLICY_CAN_SHRINK
                                                | GridConstraints.SIZEPOLICY_CAN_GROW,
                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                    }
                    panel3.add(panel9,
                            new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_BOTH,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    null, null, null));

                    //======== panel10 ========
                    {
                        panel10.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                        //---- textField7 ----
                        textField7.setEditable(true);
                        textField7.setEnabled(true);
                        textField7.setText("");
                        textField7.putClientProperty("html.disable", true);
                        panel10.add(textField7,
                                new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST,
                                        GridConstraints.FILL_HORIZONTAL,
                                        GridConstraints.SIZEPOLICY_CAN_GROW
                                                | GridConstraints.SIZEPOLICY_WANT_GROW,
                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                    }
                    panel3.add(panel10,
                            new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_BOTH,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    null, null, null));

                    //======== panel11 ========
                    {
                        panel11.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                        //---- textField1 ----
                        textField1.setEditable(true);
                        textField1.setEnabled(true);
                        textField1.setText("");
                        textField1.putClientProperty("html.disable", true);
                        panel11.add(textField1,
                                new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST,
                                        GridConstraints.FILL_HORIZONTAL,
                                        GridConstraints.SIZEPOLICY_CAN_GROW
                                                | GridConstraints.SIZEPOLICY_WANT_GROW,
                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                    }
                    panel3.add(panel11,
                            new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_BOTH,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    null, null, null));

                    //======== panel12 ========
                    {
                        panel12.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                        //---- label4 ----
                        label4.setText("dao\u5c42\u751f\u6210\u5728\u54ea\u4e2a\u5305\u540d\u4e0b");
                        panel12.add(label4,
                                new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                        GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
                                        GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                    }
                    panel3.add(panel12,
                            new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_BOTH,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                    null, null, null));
                }
                scrollPane1.setViewportView(panel3);
            }
            panel2.add(scrollPane1,
                    new GridConstraints(0, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                            GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW
                                    | GridConstraints.SIZEPOLICY_WANT_GROW,
                            GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW
                                    | GridConstraints.SIZEPOLICY_WANT_GROW,
                            null, null, null));
        }
        panel1.add(panel2,
                new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
                        null));

        //======== panel13 ========
        {
            panel13.setBorder(new TitledBorder("\u53ef\u914d\u7f6e\u9879"));
            panel13.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));

            //---- CheckBox1 ----
            CheckBox1.setSelected(true);
            CheckBox1.setText("\u662f\u5426\u4e3a\u9a7c\u5cf0\u547d\u540d\u89c4\u8303");
            panel13.add(CheckBox1,
                    new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                            GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                            GridConstraints.SIZEPOLICY_FIXED, null, null, null));

            //---- CheckBox2 ----
            CheckBox2.setSelected(true);
            CheckBox2.setText("\u662f\u5426\u751f\u6210\u6ce8\u91ca");
            panel13.add(CheckBox2,
                    new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
                            GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                            GridConstraints.SIZEPOLICY_FIXED, null, null, null));
        }
        panel1.add(panel13,
                new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
                        null));

        //======== panel14 ========
        {
            panel14.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

            //---- genButton ----
            genButton.setText("\u751f\u6210");
            panel14.add(genButton,
                    new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                            GridConstraints.FILL_HORIZONTAL,
                            GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                            GridConstraints.SIZEPOLICY_FIXED, null, null, null));
        }
        panel1.add(panel14,
                new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
                        null));

        //======== scrollPane2 ========
        {
            scrollPane2.setBorder(new TitledBorder("\u5fc5\u586b\u9879"));

            //======== panel15 ========
            {
                panel15.setLayout(new GridLayoutManager(5, 2, new Insets(0, 0, 0, 0), -1, -1));

                //======== panel16 ========
                {
                    panel16.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                    //---- TextField ----
                    TextField.setText("com.mysql.jdbc.Driver");
                    panel16.add(TextField,
                            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST,
                                    GridConstraints.FILL_HORIZONTAL,
                                    GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW,
                                    GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                }
                panel15.add(panel16,
                        new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
                                GridConstraints.FILL_BOTH,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                null, null, null));

                //======== panel17 ========
                {
                    panel17.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                    //---- textField3 ----
                    textField3.setText("jdbc:mysql://192.168.0.13/mvp?characterEncoding=UTF-8");
                    panel17.add(textField3,
                            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST,
                                    GridConstraints.FILL_HORIZONTAL,
                                    GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW,
                                    GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                }
                panel15.add(panel17,
                        new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
                                GridConstraints.FILL_BOTH,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                null, null, null));

                //======== panel18 ========
                {
                    panel18.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                    //---- rootTextField ----
                    rootTextField.setText("root");
                    panel18.add(rootTextField,
                            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST,
                                    GridConstraints.FILL_HORIZONTAL,
                                    GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW,
                                    GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                }
                panel15.add(panel18,
                        new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
                                GridConstraints.FILL_BOTH,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                null, null, null));

                //======== panel19 ========
                {
                    panel19.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                    //---- PasswordField ----
                    PasswordField.setText("elab@123");
                    panel19.add(PasswordField,
                            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST,
                                    GridConstraints.FILL_HORIZONTAL,
                                    GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW,
                                    GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                }
                panel15.add(panel19,
                        new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
                                GridConstraints.FILL_BOTH,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                null, null, null));

                //======== panel20 ========
                {
                    panel20.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                    //---- textField8 ----
                    textField8.setText("");
                    panel20.add(textField8,
                            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST,
                                    GridConstraints.FILL_HORIZONTAL,
                                    GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW,
                                    GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                }
                panel15.add(panel20,
                        new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
                                GridConstraints.FILL_BOTH,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                null, null, null));

                //======== panel21 ========
                {
                    panel21.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                    //---- label5 ----
                    label5.setText("\u6570\u636e\u5e93\u9a71\u52a8:");
                    panel21.add(label5,
                            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
                                    GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                }
                panel15.add(panel21,
                        new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                GridConstraints.FILL_BOTH,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                null, null, null));

                //======== panel22 ========
                {
                    panel22.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                    //---- label6 ----
                    label6.setText("\u6570\u636e\u5e93\u8fde\u63a5\u5730\u5740:");
                    panel22.add(label6,
                            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
                                    GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                }
                panel15.add(panel22,
                        new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                GridConstraints.FILL_BOTH,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                null, null, null));

                //======== panel23 ========
                {
                    panel23.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                    //---- label7 ----
                    label7.setText("\u6570\u636e\u5e93\u7528\u6237\u540d:");
                    panel23.add(label7,
                            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
                                    GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                }
                panel15.add(panel23,
                        new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                GridConstraints.FILL_BOTH,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                null, null, null));

                //======== panel24 ========
                {
                    panel24.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                    //---- label8 ----
                    label8.setText("\u6570\u636e\u5e93\u5bc6\u7801:");
                    panel24.add(label8,
                            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
                                    GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                }
                panel15.add(panel24,
                        new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                GridConstraints.FILL_BOTH,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                null, null, null));

                //======== panel25 ========
                {
                    panel25.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));

                    //---- label9 ----
                    label9.setText("\u8868\u540d(\u53ef\u6a21\u7cca%)");
                    panel25.add(label9,
                            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                    GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED,
                                    GridConstraints.SIZEPOLICY_FIXED, null, null, null));
                }
                panel15.add(panel25,
                        new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
                                GridConstraints.FILL_BOTH,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                                null, null, null));
            }
            scrollPane2.setViewportView(panel15);
        }
        panel1.add(scrollPane2,
                new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW
                                | GridConstraints.SIZEPOLICY_WANT_GROW,
                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW
                                | GridConstraints.SIZEPOLICY_WANT_GROW,
                        null, null, null));

        //======== scrollPane3 ========
        {
            scrollPane3.setBorder(new TitledBorder("\u6ce8\u610f\u4e8b\u9879"));

            //---- jscrollPane1 ----
            jscrollPane1.setEditable(true);
            jscrollPane1.setEnabled(true);
            jscrollPane1.setText(
                    "\t1.\u8bf7\u4e0d\u8981\u91cd\u590d\u751f\u6210\u540c\u6837\u7684\u6587\u4ef6\u5728\u540c\u4e00\u4e2a\u76ee\u5f55\u5939\u4e0b\u3002");
            scrollPane3.setViewportView(jscrollPane1);
        }
        panel1.add(scrollPane3,
                new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW
                                | GridConstraints.SIZEPOLICY_WANT_GROW,
                        GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW
                                | GridConstraints.SIZEPOLICY_WANT_GROW,
                        null, null, null));
    }
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}