Example usage for javax.swing DefaultListModel DefaultListModel

List of usage examples for javax.swing DefaultListModel DefaultListModel

Introduction

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

Prototype

DefaultListModel

Source Link

Usage

From source file:interfaceTisseoWS.ST3.java

private void btnGoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGoActionPerformed
    lblResultat.setText("");
    try {/*  ww w.  ja  v  a 2s .c  o  m*/
        RequestTisseo r = new RequestTisseo();
        JSONParser parser = new JSONParser();

        r.setPathURIB("/placesList");
        r.addParamURIB("term", txtAdresse.getText());
        //r.addParamURIB("displayOnlyRoads", "1");

        Object obj = parser.parse(r.request());
        array = (JSONObject) obj;

        int nbResultats = (((JSONArray) ((JSONObject) array.get("placesList")).get("place")).size());
        DefaultListModel lm = new DefaultListModel();
        for (int i = 0; i < nbResultats; i++) {
            lm.addElement(
                    ((JSONObject) ((JSONArray) ((JSONObject) array.get("placesList")).get("place")).get(i))
                            .get("label"));
        }
        listRes.setModel(lm);
    } catch (ParseException ex) {
        Logger.getLogger(ST3.class.getName()).log(Level.SEVERE, null, ex);
    } catch (IOException ex) {
        Logger.getLogger(ST3.class.getName()).log(Level.SEVERE, null, ex);
    } catch (URISyntaxException ex) {
        Logger.getLogger(ST3.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:com.iisigroup.ris.WebFileScanUtilBrowserUI.java

public WebFileScanUtilBrowserUI sourceFileList(List<PageInfo> list) {
    if (list == null || list.isEmpty()) {
        return this;
    }/*from   www . j  a v a  2s .c o m*/
    List<MFile> lll = new ArrayList<MFile>();
    for (PageInfo pageinfo : list) {
        if (pageinfo.getOrignWebFile() != null) {
            lll.add(new MFile(pageinfo.getOrignWebFile(), "WEB"));
        }
        if (pageinfo.getSourceFile() != null) {
            lll.add(new MFile(pageinfo.getSourceFile(), "SRC"));
        }
    }
    DefaultListModel model = new DefaultListModel();
    for (MFile f : lll) {
        model.addElement(f);
    }
    openFileList.setModel(model);
    return this;
}

From source file:brainflow.app.presentation.controls.FileObjectGroupSelector.java

private void updateFileList() {

    String pattern = regexField.getText();
    if (pattern.equals("")) {
        return;//from   w w  w  . j  av  a  2 s .co m
    }

    if (searchType.getSelectedItem() == GLOB) {
        pattern = FileObjectGroupSelector.globToRegexPattern(pattern);
    }

    if (!pattern.startsWith(".*")) {
        pattern = ".*" + pattern;
    }

    java.util.List<FileExplorer.FileObjectNode> fileNodes = explorer.getSelectedNodes();
    java.util.List<FileObject> matchList = new ArrayList<FileObject>();
    //System.out.println("fileNodes.size() " + fileNodes.size());
    for (FileExplorer.FileObjectNode node : fileNodes) {
        matchChildren(node, pattern, matchList, 0);

    }

    DefaultListModel listModel = new DefaultListModel();
    for (int i = 0; i < matchList.size(); i++) {
        listModel.addElement(unambiguousIdentifier(i, matchList));

    }

    fileList.setModel(listModel);

}

From source file:com.components.wizard.layout2media.java

private void fill() {
    DefaultListModel m = new DefaultListModel();
    try {//www.j  av a  2 s. co  m
        String sql = "select * from media";
        pst = connection.prepareStatement(sql);
        rs = pst.executeQuery();
        while (rs.next()) {
            String path = rs.getString("name");
            m.addElement(path);
        }
        jList1.setModel(m);
    } catch (Exception e) {
        JOptionPane.showMessageDialog(null, e);
    } finally {
        try {
            rs.close();
            pst.close();
        } catch (Exception e) {
        }
    }

}

From source file:gtu.log.finder.ExceptionLogFinderUI.java

private void initGUI() {
    try {/*  w  w  w . ja v  a2s . c  o  m*/
        JCommonUtil.defaultLookAndFeel();
        BorderLayout thisLayout = new BorderLayout();
        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        getContentPane().setLayout(thisLayout);
        {
            jTabbedPane1 = new JTabbedPane();
            getContentPane().add(jTabbedPane1, BorderLayout.CENTER);
            {
                jPanel1 = new JPanel();
                BorderLayout jPanel1Layout = new BorderLayout();
                jPanel1.setLayout(jPanel1Layout);
                jTabbedPane1.addTab("?log", null, jPanel1, null);
                {
                    jPanel4 = new JPanel();
                    jPanel1.add(jPanel4, BorderLayout.NORTH);
                    jPanel4.setPreferredSize(new java.awt.Dimension(689, 115));
                    {
                        isExceptionLogChkBox = new JCheckBox();
                        jPanel4.add(isExceptionLogChkBox);
                        isExceptionLogChkBox.setText("\u53ea\u627e\u932f\u8aa4");
                    }
                    {
                        jLabel1 = new JLabel();
                        jPanel4.add(jLabel1);
                        jLabel1.setText("\u8cbc\u4e0alog\u6a94\u8def\u5f91");
                    }
                    {
                        srcFilePathText = new JTextField();
                        jPanel4.add(srcFilePathText);
                        srcFilePathText.setPreferredSize(new java.awt.Dimension(292, 22));
                        srcFilePathText.addMouseListener(new MouseAdapter() {
                            public void mouseClicked(MouseEvent evt) {
                                srcFilePathTextSetFileAction(evt);
                            }
                        });
                    }
                    {
                        jLabel3 = new JLabel();
                        jPanel4.add(jLabel3);
                        jLabel3.setText("\u524d\u7f6e\u884c\u6578");
                    }
                    {
                        preLineText = new JTextField();
                        jPanel4.add(preLineText);
                        preLineText.setText("5");
                        preLineText.setPreferredSize(new java.awt.Dimension(33, 22));
                    }
                    {
                        executeBtn = new JButton();
                        jPanel4.add(executeBtn);
                        executeBtn.setText("\u57f7\u884c\u89e3\u6790");
                        executeBtn.setPreferredSize(new java.awt.Dimension(107, 22));
                        executeBtn.addActionListener(new ActionListener() {
                            public void actionPerformed(ActionEvent evt) {
                                executeBtnAction();
                            }
                        });
                    }
                    {
                        jLabel4 = new JLabel();
                        jPanel4.add(jLabel4);
                        jLabel4.setText("\u76f4\u63a5\u8a2d\u5b9a\u89e3\u6790\u6a94\u8def\u5f91");
                        jLabel4.setPreferredSize(new java.awt.Dimension(119, 15));
                    }
                    {
                        setParseFileText = new JTextField();
                        jPanel4.add(setParseFileText);
                        setParseFileText.setPreferredSize(new java.awt.Dimension(507, 22));
                        setParseFileText.addMouseListener(new MouseAdapter() {
                            public void mouseClicked(MouseEvent evt) {
                                setParseFileBtnAction(evt);
                            }
                        });
                    }
                    {
                        jLabel2 = new JLabel();
                        jPanel4.add(jLabel2);
                        jLabel2.setText("\u641c\u5c0b\u95dc\u9375\u5b57");
                    }
                    {
                        searchText = new JTextField();
                        jPanel4.add(searchText);
                        searchText.setPreferredSize(new java.awt.Dimension(355, 22));
                    }
                    {
                        ignoreCaseCheckBox = new JCheckBox();
                        jPanel4.add(ignoreCaseCheckBox);
                        ignoreCaseCheckBox.setText("\u7121\u8996\u5927\u5c0f\u5beb");
                        ignoreCaseCheckBox.setSelected(true);
                    }
                    {
                        searchTextBtn = new JButton();
                        jPanel4.add(searchTextBtn);
                        searchTextBtn.setText("?");
                        searchTextBtn.setPreferredSize(new java.awt.Dimension(118, 22));
                        searchTextBtn.addActionListener(new ActionListener() {
                            public void actionPerformed(ActionEvent evt) {
                                searchTextBtnAction();
                            }
                        });
                    }
                    {
                        jLabel5 = new JLabel();
                        jPanel4.add(jLabel5);
                        jLabel5.setText(
                                "\u4ee5\u958b\u59cb\u7d50\u675f\u95dc\u9375\u5b57\u89e3\u6790\u6587\u4ef6");
                        jLabel5.setPreferredSize(new java.awt.Dimension(155, 15));
                    }
                    {
                        startStrText = new JTextField();
                        jPanel4.add(startStrText);
                        startStrText.setPreferredSize(new java.awt.Dimension(229, 22));
                    }
                    {
                        endStrText = new JTextField();
                        jPanel4.add(endStrText);
                        endStrText.setPreferredSize(new java.awt.Dimension(244, 22));
                    }
                }
                {
                    jScrollPane1 = new JScrollPane();
                    jPanel1.add(jScrollPane1, BorderLayout.CENTER);
                    jScrollPane1.setPreferredSize(new java.awt.Dimension(689, 391));
                    {
                        DefaultListModel searchMatchListModel = new DefaultListModel();
                        searchMatchList = new JList();
                        jScrollPane1.setViewportView(searchMatchList);
                        searchMatchList.setModel(searchMatchListModel);
                        searchMatchList.addMouseListener(new MouseAdapter() {
                            public void mouseClicked(MouseEvent evt) {
                                searchMatchListMouseAction(evt);
                            }
                        });
                    }
                }
            }
            {
                jPanel2 = new JPanel();
                BorderLayout jPanel2Layout = new BorderLayout();
                jPanel2.setLayout(jPanel2Layout);
                jTabbedPane1.addTab("", null, jPanel2, null);
                {
                    jScrollPane2 = new JScrollPane();
                    jPanel2.add(jScrollPane2, BorderLayout.CENTER);
                    jScrollPane2.setPreferredSize(new java.awt.Dimension(689, 484));
                    {
                        logDetailTextArea = new JTextArea();
                        jScrollPane2.setViewportView(logDetailTextArea);
                    }
                }
            }
        }
        pack();
        this.setSize(702, 538);
    } catch (Exception e) {
        // add your error handling code here
        e.printStackTrace();
    }
}

From source file:edu.ku.brc.specify.dbsupport.cleanuptools.GeoChooserDlg.java

@SuppressWarnings({ "rawtypes", "unchecked" })
@Override/*from  www .jav  a  2 s  . c  om*/
public void createUI() {
    boolean doStatesOrCounties = doAllCountries[1] || doAllCountries[2] || doInvCountry[1] || doInvCountry[2];
    //this.whichBtns = doStatesOrCounties && !doInvCountry[1] && rankId > 200 ? CustomDialog.OKCANCELAPPLYHELP : CustomDialog.OKCANCELHELP;

    boolean isStCnty = true;//rankId > 200; 

    dataListModel = new DefaultListModel<GeoSearchResultsItem>();
    mainList = new JList<GeoSearchResultsItem>(dataListModel);
    JScrollPane sb = createScrollPane(mainList, true);

    String listDim;
    if (UIHelper.isWindows()) {
        listDim = "250px";
        Dimension sz = new Dimension(250, 250);
        mainList.setPreferredSize(sz);
        sb.setPreferredSize(sz);
    } else {
        listDim = "f:p:g";
    }

    CellConstraints cc = new CellConstraints();
    PanelBuilder pb = new PanelBuilder(new FormLayout("f:p:g",
            "p,2px,p,12px,p,2px," + listDim + ",8px,p,4px,p,10px,p" + (isStCnty ? ",8px,p" : "")));

    this.contentPanel = pb.getPanel();

    super.createUI();

    okBtn.setEnabled(false);

    calcProgress();

    try {
        if (coInfoList != null && coInfoList.size() > 0) {
            fillFromLuceneResults();
        } else {
            fillFromQuery();
        }

        mainList.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                if (e.getClickCount() == 2) {
                    getOkBtn().doClick();

                } else if (e.getClickCount() == 1 && !noMatchesFound && !mainList.isSelectionEmpty()) {
                    getOkBtn().setEnabled(true);
                }
            }
        });
        mainList.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
            @Override
            public void valueChanged(ListSelectionEvent e) {
                if (!e.getValueIsAdjusting()) {
                    listItemSelected();
                }
            }
        });

        updateNameCB = createCheckBox("Update the Name in the Geography tree."); // I18N
        //mergeCB      = createCheckBox("Merge all the geographies with the same name.");
        addISOCodeCB = createCheckBox("Add the ISO Code to the record");
        isoCodeTF = createTextField(8);
        isoCodeTF.setVisible(rankId < 400);

        updateNameCB.setSelected(isUpdateNamesChecked);
        //mergeCB.setSelected(true);
        addISOCodeCB.setSelected(true);

        updateNameCB.addChangeListener(new ChangeListener() {
            @Override
            public void stateChanged(final ChangeEvent e) {
                isUpdateNamesChecked = updateNameCB.isSelected();
            }
        });

        DocumentListener dl = new DocumentAdaptor() {
            @Override
            protected void changed(DocumentEvent e) {
                okBtn.setEnabled(!isoCodeTF.getText().isEmpty());
            }
        };
        isoCodeTF.getDocument().addDocumentListener(dl);
        //labels.add(nameStr);// + "  (Unknown)");

        PanelBuilder lookPB = null;
        JButton lookupBtn = null;
        if (isStCnty) {
            lookPB = new PanelBuilder(new FormLayout("f:p:g,p", "p"));
            lookupBtn = createI18NButton("CLNUP_GEO_LOOK_UP_ISO");
            lookPB.add(lookupBtn, cc.xy(2, 1));
            lookupBtn.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    globalRankSearch();
                }
            });
        }

        int i = 0;
        ArrayList<String> labels = new ArrayList<String>();
        while (i < parentNames.length && parentRanks[i] > -1) {
            labels.add(i18NLabelsMap.get(parentRanks[i++]));
        }

        PanelBuilder pbTop = new PanelBuilder(
                new FormLayout("p,2px,f:p:g", UIHelper.createDuplicateJGoodiesDef("p", "2px", labels.size())));
        int y = 1;
        for (i = 0; i < labels.size(); i++) {
            JLabel lbl = createLabel(parentNames[i]);
            pbTop.add(createFormLabel(labels.get(i)), cc.xy(1, y));
            pbTop.add(lbl, cc.xy(3, y));
            lbl.setBackground(Color.WHITE);
            lbl.setOpaque(true);
            y += 2;
        }

        pb.add(pbTop.getPanel(), cc.xy(1, 3));
        pb.addSeparator("Possible standard Geography choices", cc.xy(1, 5)); // I18N
        pb.add(sb, cc.xy(1, 7));
        pb.add(updateNameCB, cc.xy(1, 9));

        PanelBuilder pbc = new PanelBuilder(new FormLayout("p,10px,p,f:p:g", "p"));
        pbc.add(addISOCodeCB, cc.xy(1, 1));
        pbc.add(isoCodeTF, cc.xy(3, 1));

        pb.add(pbc.getPanel(), cc.xy(1, 11));

        i = 13;
        if (isStCnty) {
            pb.add(lookPB.getPanel(), cc.xy(1, i));
            i += 2;
        }

        //if (doAllCountries[0])
        if (false) // hidding it for now
        {
            progressBar = new JProgressBar(0, 100);
            progressBar.setStringPainted(true);
            PanelBuilder prgPB = new PanelBuilder(new FormLayout("p,2px,f:p:g", "p"));
            prgPB.add(createFormLabel("Progress"), cc.xy(1, 1));
            prgPB.add(progressBar, cc.xy(3, 1));
            pb.add(prgPB.getPanel(), cc.xy(1, i));
            i += 2;
        }

        mainList.setSelectedIndex(selectedIndex);
        mainList.ensureIndexIsVisible(selectedIndex);

        noMatchesFound = dataListModel.size() == 0;

        // Optional Depending on States / Countries
        if (doStatesOrCounties) {
            if (dataListModel.getSize() == 0) {
                dataListModel.addElement(new GeoSearchResultsItem("No matches found."));// I18N
            }
        }

        pb.setDefaultDialogBorder();

    } catch (Exception ex) {
        ex.printStackTrace();
    }

    if (UIHelper.isWindows()) {
        setResizable(false);
    }
    setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); // Must be called at the end 'createUI'
}

From source file:AltiConsole.AltiConsoleMainScreen.java

/**
 * Constructs main screen of the application.
 * /*from  w  w  w . ja  v a 2 s.co m*/
 * @param title
 *            the frame title.
 */
public AltiConsoleMainScreen(final String title) {

    super(title);
    trans = Application.getTranslator();

    // //////// Menu code starts her //////////////
    // File
    fileMenu = new JMenu();
    fileMenu.setText(trans.get("AltiConsoleMainScreen.File"));

    // Load data
    loadDataMenuItem = new JMenuItem();
    loadDataMenuItem.setText(trans.get("AltiConsoleMainScreen.RetrieveFlightData"));
    loadDataMenuItem.setActionCommand("RETRIEVE_FLIGHT");
    loadDataMenuItem.addActionListener(this);

    eraseAllDataMenuItem = new JMenuItem();
    eraseAllDataMenuItem.setText(trans.get("AltiConsoleMainScreen.EraseFlightData"));
    eraseAllDataMenuItem.setActionCommand("ERASE_FLIGHT");
    eraseAllDataMenuItem.addActionListener(this);

    // Save as
    saveASMenuItem = new JMenuItem();
    saveASMenuItem.setText(trans.get("AltiConsoleMainScreen.saveFlightData"));
    saveASMenuItem.setActionCommand("SAVE_FLIGHT");
    saveASMenuItem.addActionListener(this);

    // Exit
    exitMenuItem = new JMenuItem();
    exitMenuItem.setText(trans.get("AltiConsoleMainScreen.Exit"));
    exitMenuItem.setActionCommand("EXIT");
    exitMenuItem.addActionListener(this);

    fileMenu.add(saveASMenuItem);

    fileMenu.add(loadDataMenuItem);
    fileMenu.add(eraseAllDataMenuItem);
    fileMenu.add(exitMenuItem);

    // Option menu
    optionMenu = new JMenu(trans.get("AltiConsoleMainScreen.Option"));
    preferencesMenuItem = new JMenuItem(trans.get("AltiConsoleMainScreen.Preferences"));
    preferencesMenuItem.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            System.out.println("pref\n");
            Preferences.showPreferences(AltiConsoleMainScreen.this);
            //LicenseDialog.showPreferences(AltiConsoleMainScreen.this);
            System.out.println("change units\n");
            String Units;
            System.out.println(UserPref.getAppUnits());
            if (Utils.equals(UserPref.getAppUnits(), "Unit.Metrics"))
                Units = trans.get("Unit.Metrics");
            else
                Units = trans.get("Unit.Imperial");

            chart.getXYPlot().getRangeAxis()
                    .setLabel(trans.get("AltiConsoleMainScreen.altitude") + " (" + Units + ")");
            if (Serial.getConnected()) {
                RetrievingFlight();
            }

        }
    });

    optionMenu.add(preferencesMenuItem);

    // Configuration menu
    altiConfigMenu = new JMenu(trans.get("AltiConsoleMainScreen.ConfigAltimeter"));

    retrieveAltiConfigMenuItem = new JMenuItem(trans.get("AltiConsoleMainScreen.RetrieveAltiConfig"));
    retrieveAltiConfigMenuItem.setActionCommand("RETRIEVE_ALTI_CFG");
    retrieveAltiConfigMenuItem.addActionListener(this);
    altiConfigMenu.add(retrieveAltiConfigMenuItem);

    uploadFirmwareMenuItem = new JMenuItem(trans.get("AltiConsoleMainScreen.UploadFirmware"));

    uploadFirmwareMenuItem.setActionCommand("UPLOAD_FIRMWARE");
    uploadFirmwareMenuItem.addActionListener(this);
    altiConfigMenu.add(uploadFirmwareMenuItem);

    // Help
    helpMenu = new JMenu(trans.get("AltiConsoleMainScreen.Help"));
    jJMenuBar = new JMenuBar();

    // Manual
    onLineHelpMenuItem = new JMenuItem(trans.get("AltiConsoleMainScreen.onLineHelp"));
    onLineHelpMenuItem.setActionCommand("ON_LINE_HELP");
    onLineHelpMenuItem.addActionListener(this);

    // license
    licenseMenuItem = new JMenuItem(trans.get("AltiConsoleMainScreen.license"));
    licenseMenuItem.setActionCommand("LICENSE");
    licenseMenuItem.addActionListener(this);

    // AboutScreen
    aboutMenuItem = new JMenuItem();
    aboutMenuItem.setText(trans.get("AltiConsoleMainScreen.About"));
    aboutMenuItem.setActionCommand("ABOUT");
    aboutMenuItem.addActionListener(this);

    helpMenu.add(onLineHelpMenuItem);
    helpMenu.add(licenseMenuItem);
    helpMenu.add(aboutMenuItem);

    jJMenuBar.add(fileMenu);
    jJMenuBar.add(optionMenu);
    jJMenuBar.add(altiConfigMenu);
    jJMenuBar.add(helpMenu);
    this.setJMenuBar(jJMenuBar);

    // ///// end of Menu code

    // Button
    retrieveFlights = new JButton();
    retrieveFlights.setText(trans.get("AltiConsoleMainScreen.RetrieveFlights"));
    retrieveFlights.setActionCommand("RETRIEVE_FLIGHT");
    retrieveFlights.addActionListener(this);
    retrieveFlights.setToolTipText(trans.get("AltiConsoleMainScreen.ttipRetrieveFlight"));

    // combo serial rate
    String[] serialRateStrings = { "300", "1200", "2400", "4800", "9600", "14400", "19200", "28800", "38400",
            "57600", "115200" };

    serialRatesLabel = new JLabel(trans.get("AltiConsoleMainScreen.comPortSpeed") + " ");
    serialRates = new JComboBox();
    System.out.println(UserPref.getDefComSpeed() + "\n");
    for (int i = 0; i < serialRateStrings.length; i++) {
        serialRates.addItem(serialRateStrings[i]);

        if (Utils.equals(UserPref.getDefComSpeed(), serialRateStrings[i])) {
            serialRates.setSelectedIndex(i);
        }
    }
    serialRates.setToolTipText(trans.get("AltiConsoleMainScreen.ttipChoosePortSpeed"));

    comPortsLabel = new JLabel(trans.get("AltiConsoleMainScreen.port") + " ");
    comPorts = new JComboBox();

    comPorts.setActionCommand("comPorts");
    comPorts.addActionListener(this);
    comPorts.setToolTipText(trans.get("AltiConsoleMainScreen.ttipChooseAltiport"));
    listData = new DefaultListModel();

    flightList = new JXList(listData);
    flightList.addListSelectionListener(new ValueReporter());

    JPanel TopPanelLeft = new JPanel();
    TopPanelLeft.setLayout(new BorderLayout());
    TopPanelLeft.add(comPortsLabel, BorderLayout.WEST);
    TopPanelLeft.add(comPorts, BorderLayout.EAST);

    JPanel TopPanelMiddle = new JPanel();
    TopPanelMiddle.setLayout(new BorderLayout());
    TopPanelMiddle.add(retrieveFlights, BorderLayout.WEST);

    JPanel TopPanelRight = new JPanel();
    TopPanelRight.setLayout(new BorderLayout());
    TopPanelRight.add(serialRatesLabel, BorderLayout.WEST);
    TopPanelRight.add(serialRates, BorderLayout.EAST);

    JPanel TopPanel = new JPanel();
    TopPanel.setLayout(new BorderLayout());

    TopPanel.add(TopPanelRight, BorderLayout.EAST);
    TopPanel.add(TopPanelMiddle, BorderLayout.CENTER);
    TopPanel.add(TopPanelLeft, BorderLayout.WEST);
    JPanel MiddlePanel = new JPanel();
    MiddlePanel.setLayout(new BorderLayout());

    MiddlePanel.add(TopPanel, BorderLayout.NORTH);
    MiddlePanel.add(flightList, BorderLayout.WEST);

    String Units;
    if (Utils.equals(UserPref.getAppUnits(), "Unit.Metrics"))
        Units = trans.get("Unit.Metrics");
    else
        Units = trans.get("Unit.Imperial");

    chart = ChartFactory.createXYLineChart(trans.get("AltiConsoleMainScreen.Title"),
            trans.get("AltiConsoleMainScreen.time"),
            trans.get("AltiConsoleMainScreen.altitude") + " (" + Units + ")", null);

    chart.setBackgroundPaint(Color.white);
    System.out.println(chart.getSubtitle(0));

    this.plot = chart.getXYPlot();
    this.plot.setBackgroundPaint(Color.lightGray);
    this.plot.setDomainGridlinePaint(Color.white);
    this.plot.setRangeGridlinePaint(Color.white);

    final ValueAxis axis = this.plot.getDomainAxis();
    axis.setAutoRange(true);

    final NumberAxis rangeAxis2 = new NumberAxis("Range Axis 2");
    rangeAxis2.setAutoRangeIncludesZero(false);

    final ChartPanel chartPanel = new ChartPanel(chart);

    MiddlePanel.add(chartPanel, BorderLayout.CENTER);

    JPanel InfoPanel = new JPanel(new MigLayout("fill"));
    InfoPanel.add(new JLabel(trans.get("AltiConsoleMainScreen.ApogeeAltitude")), "gapright para");
    apogeeAltitudeLabel = new JLabel();
    InfoPanel.add(apogeeAltitudeLabel, "growx");
    InfoPanel.add(new JLabel(trans.get("AltiConsoleMainScreen.MainAltitude")), "gapright para");
    mainAltitudeLabel = new JLabel();
    InfoPanel.add(mainAltitudeLabel, "growx");
    flightNbrLabel = new JLabel();

    InfoPanel.add(new JLabel(trans.get("AltiConsoleMainScreen.NbrOfPoint")), "growx");
    nbrPointLabel = new JLabel();
    InfoPanel.add(nbrPointLabel, "wrap rel,growx");

    txtLog = new JTextArea(5, 70);
    txtLog.setEditable(false);
    txtLog.setAutoscrolls(true);

    scrollPane = new JScrollPane(txtLog);
    scrollPane.setAutoscrolls(true);
    // BottomPanel.add(scrollPane, BorderLayout.WEST);
    InfoPanel.add(scrollPane, "span");
    // MiddlePanel.add(BottomPanel, BorderLayout.SOUTH);
    MiddlePanel.add(InfoPanel, BorderLayout.SOUTH);
    setContentPane(MiddlePanel);
    try {
        try {
            Serial = new AltimeterSerial(this);

            Serial.searchForPorts();
        } catch (UnsatisfiedLinkError e) {
            System.out.println("USB Library rxtxSerial.dll Not Found");
            System.out.println("Exception:" + e.toString() + ":" + e.getMessage());
            System.out.println(e.toString());
            JOptionPane.showMessageDialog(null,
                    "You must copy the appropriate rxtxSerial.dll \n "
                            + "to your local 32 bit or 64 bitjava JRE installation\n\n"
                            + " .../arduino-1.0.1-windows/arduino-1.0.1/rxtxSerial.dll\n"
                            + "to\n C:/Program Files (x86)/Java/jre7/bin/rxtxSerial.dll\n"
                            + "also right click Properties->Unblock",
                    trans.get("AltiConsoleMainScreen.InstallationProblem"), JOptionPane.WARNING_MESSAGE);
        }
    } catch (NoClassDefFoundError e) {
        System.out.println("Missing RXTXcomm.jar in java installation");
        System.out.println("Exception:" + e.toString() + ":" + e.getMessage());
        System.out.println(e.toString());
        JOptionPane.showMessageDialog(null,
                "You must copy RXTXcomm.jar from the Arduino software\n "
                        + "to your local 32 bit java JRE installation\n\n"
                        + " .../arduino-1.0.1-windows/arduino-1.0.1/lib/RXTXcomm.jar\n"
                        + "to\n C:/Program Files (x86)/Java/jre7/lib/ext/RXTXcomm.jar\n"
                        + "also right click Properties->Unblock",
                trans.get("AltiConsoleMainScreen.InstallationProblem"), JOptionPane.WARNING_MESSAGE);
    }
}

From source file:com.neurotec.samples.panels.EnrollFromScanner.java

@Override
protected void initGUI() {
    panelMain = new JPanel();
    panelScanners = new JPanel();
    scrollPaneList = new JScrollPane();
    scannerList = new JList();
    panelButtons = new JPanel();
    btnRefresh = new JButton();
    btnScan = new JButton();
    btnCancel = new JButton();
    btnForce = new JButton();
    cbAutomatic = new JCheckBox();
    scrollPane = new JScrollPane();
    panelSouth = new JPanel();
    panelInfo = new JPanel();
    lblInfo = new JLabel();
    panelSave = new JPanel();
    btnIdentifyPatient = new JButton();
    btnRegisterPatient = new JButton();
    cbShowProcessed = new JCheckBox();

    setLayout(new BorderLayout());

    panelMain.setLayout(new BorderLayout());

    panelScanners.setBorder(BorderFactory.createTitledBorder("Scanners list"));
    panelScanners.setLayout(new BorderLayout());

    scrollPaneList.setPreferredSize(new Dimension(0, 90));

    scannerList.setModel(new DefaultListModel());
    scannerList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    scannerList.setBorder(LineBorder.createBlackLineBorder());
    scrollPaneList.setViewportView(scannerList);

    panelScanners.add(scrollPaneList, BorderLayout.CENTER);

    panelButtons.setLayout(new FlowLayout(FlowLayout.LEADING));

    btnRefresh.setText("Refresh list");
    panelButtons.add(btnRefresh);//from w w w  .  jav  a 2  s  .  co m

    btnScan.setText("Scan");
    panelButtons.add(btnScan);

    btnCancel.setText("Cancel");
    btnCancel.setEnabled(false);
    panelButtons.add(btnCancel);

    btnForce.setText("Force");
    panelButtons.add(btnForce);

    cbAutomatic.setSelected(true);
    cbAutomatic.setText("Scan automatically");
    panelButtons.add(cbAutomatic);

    panelScanners.add(panelButtons, BorderLayout.SOUTH);

    panelMain.add(panelScanners, BorderLayout.NORTH);
    panelMain.add(scrollPane, BorderLayout.CENTER);

    panelSouth.setLayout(new BorderLayout());

    panelInfo.setBorder(new SoftBevelBorder(BevelBorder.LOWERED));
    panelInfo.setLayout(new GridLayout(1, 1));

    lblInfo.setText(" ");
    panelInfo.add(lblInfo);

    panelSouth.add(panelInfo, BorderLayout.NORTH);

    panelSave.setLayout(new FlowLayout(FlowLayout.LEADING));

    btnIdentifyPatient.setText("Identify Patient");
    btnIdentifyPatient.setEnabled(false);
    panelSave.add(btnIdentifyPatient);

    btnRegisterPatient.setText("Register Patient");
    btnRegisterPatient.setEnabled(false);
    panelSave.add(btnRegisterPatient);

    cbShowProcessed.setSelected(true);
    cbShowProcessed.setText("Show processed image");
    panelSave.add(cbShowProcessed);

    panelSouth.add(panelSave, BorderLayout.SOUTH);

    panelMain.add(panelSouth, BorderLayout.SOUTH);

    add(panelMain, BorderLayout.CENTER);

    panelLicensing = new LicensingPanel(requiredLicenses, optionalLicenses);
    add(panelLicensing, java.awt.BorderLayout.NORTH);

    fcImage = new JFileChooser();
    fcImage.setFileFilter(new Utils.ImageFileFilter(NImages.getSaveFileFilter()));
    fcTemplate = new JFileChooser();
    view = new NFingerView();
    view.setShownImage(ShownImage.RESULT);
    view.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseClicked(MouseEvent ev) {
            super.mouseClicked(ev);
            if (ev.getButton() == MouseEvent.BUTTON3) {
                cbShowProcessed.doClick();
            }
        }

    });
    scrollPane.setViewportView(view);

    btnRefresh.addActionListener(this);
    btnScan.addActionListener(this);
    btnCancel.addActionListener(this);
    btnForce.addActionListener(this);
    btnIdentifyPatient.addActionListener(this);
    btnRegisterPatient.addActionListener(this);
    cbShowProcessed.addActionListener(this);
    scannerList.addListSelectionListener(new ScannerSelectionListener());
}

From source file:ir.ac.iust.nlp.postagger.POSTaggerForm.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.//from   w  ww  .j  a  v a  2 s  .  c  o m
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    rbgPOSTypeD2T = new javax.swing.ButtonGroup();
    rbgPOSTypeT2D = new javax.swing.ButtonGroup();
    jTabbedPane1 = new javax.swing.JTabbedPane();
    pnlConverter = new javax.swing.JPanel();
    tabConverter = new javax.swing.JTabbedPane();
    pnlDep2Tag = new javax.swing.JPanel();
    lblInputCoNLLFile = new javax.swing.JLabel();
    txtInputCoNLLFile = new javax.swing.JTextField();
    btnBrowseInputCoNLLFile = new javax.swing.JButton();
    lblOutputTagPath = new javax.swing.JLabel();
    txtOutputTagPath = new javax.swing.JTextField();
    btnBrowseOutputTagPath = new javax.swing.JButton();
    btnConertDep2Tag = new javax.swing.JButton();
    chkAddGoldTag = new javax.swing.JCheckBox();
    pnlPOSTypeD2T = new javax.swing.JPanel();
    rbFPOSD2T = new javax.swing.JRadioButton();
    rbCPOSD2T = new javax.swing.JRadioButton();
    pnlTag2Dep = new javax.swing.JPanel();
    lblInputTagFile = new javax.swing.JLabel();
    txtInputTagFile = new javax.swing.JTextField();
    btnBrowseInputTagFile = new javax.swing.JButton();
    lblOutputDepPath = new javax.swing.JLabel();
    txtOutputDepPath = new javax.swing.JTextField();
    btnBrowseOutputDepPath = new javax.swing.JButton();
    btnConvertTag2Dep = new javax.swing.JButton();
    pnlPOSTypeT2D = new javax.swing.JPanel();
    rbFPOST2D = new javax.swing.JRadioButton();
    rbCPOST2D = new javax.swing.JRadioButton();
    lblInputCoNLLFileT2D = new javax.swing.JLabel();
    txtInputCoNLLFileT2D = new javax.swing.JTextField();
    btnBrowseInputCoNLLFileT2D = new javax.swing.JButton();
    pnlTrain = new javax.swing.JPanel();
    lblTrainFile = new javax.swing.JLabel();
    txtTrainFile = new javax.swing.JTextField();
    btnBrowseTrainFile = new javax.swing.JButton();
    lblTrainModelPath = new javax.swing.JLabel();
    txtTrainModelPath = new javax.swing.JTextField();
    btnBrowseTrainModelPath = new javax.swing.JButton();
    lblMaxIters = new javax.swing.JLabel();
    spMaxIters = new javax.swing.JSpinner();
    btnStartTraining = new javax.swing.JButton();
    jScrollbar2 = new javax.swing.JScrollPane();
    txtTrainLog = new javax.swing.JTextArea();
    pnlTag = new javax.swing.JPanel();
    lblInputFile = new javax.swing.JLabel();
    txtInputFile = new javax.swing.JTextField();
    btnBrowseInputFile = new javax.swing.JButton();
    lblOutputPath = new javax.swing.JLabel();
    txtOutputPath = new javax.swing.JTextField();
    btnBrowseOutputPath = new javax.swing.JButton();
    chkGoldFile = new javax.swing.JCheckBox();
    txtGoldFile = new javax.swing.JTextField();
    btnBrowseGoldFile = new javax.swing.JButton();
    tabTag = new javax.swing.JTabbedPane();
    pnlTagLog = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    txtTagLog = new javax.swing.JTextArea();
    pnlTagResults = new javax.swing.JPanel();
    lblTagEvaluation = new javax.swing.JLabel();
    jScrollPane2 = new javax.swing.JScrollPane();
    lstWordsList = new javax.swing.JList(new DefaultListModel());
    lblWordsList = new javax.swing.JLabel();
    jScrollPane3 = new javax.swing.JScrollPane();
    lstPredictedTags = new javax.swing.JList(new DefaultListModel());
    jScrollPane4 = new javax.swing.JScrollPane();
    lstGoldTags = new javax.swing.JList(new DefaultListModel());
    lblPredictedTags = new javax.swing.JLabel();
    lblGoldTags = new javax.swing.JLabel();
    btnStartTagging = new javax.swing.JButton();
    lblModelPath = new javax.swing.JLabel();
    txtModelPath = new javax.swing.JTextField();
    btnBrowseModelPath = new javax.swing.JButton();
    pnlAbout = new javax.swing.JPanel();
    lblMXPostTitle = new javax.swing.JLabel();
    lblMXPostSiteTitle = new javax.swing.JLabel();
    lblMXPostSiteValue = new javax.swing.JTextField();
    lblMXPostAuthorsTitle = new javax.swing.JLabel();
    lblMXPostAuthorsValue = new javax.swing.JTextField();
    lblMXPostCitationTitle = new javax.swing.JLabel();
    jScrollPane9 = new javax.swing.JScrollPane();
    txtMXPostCitationValue = new javax.swing.JTextArea();
    lblMXpostLicenseTitle = new javax.swing.JLabel();
    jScrollPane5 = new javax.swing.JScrollPane();
    txtMXPostLicenseValue = new javax.swing.JTextArea();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("POS Tagger");

    lblInputCoNLLFile.setText("Input CoNLL File:");

    txtInputCoNLLFile.setEditable(false);

    btnBrowseInputCoNLLFile.setText("...");
    btnBrowseInputCoNLLFile.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnBrowseInputCoNLLFileActionPerformed(evt);
        }
    });

    lblOutputTagPath.setText("Output Path:");

    txtOutputTagPath.setEditable(false);

    btnBrowseOutputTagPath.setText("...");
    btnBrowseOutputTagPath.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnBrowseOutputTagPathActionPerformed(evt);
        }
    });

    btnConertDep2Tag.setText("Start Convert");
    btnConertDep2Tag.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnConertDep2TagActionPerformed(evt);
        }
    });

    chkAddGoldTag.setSelected(true);
    chkAddGoldTag.setText("Add Gold Tag");

    pnlPOSTypeD2T.setBorder(javax.swing.BorderFactory.createTitledBorder("Type"));

    rbgPOSTypeD2T.add(rbFPOSD2T);
    rbFPOSD2T.setSelected(true);
    rbFPOSD2T.setText("Fine-grained POS");

    rbgPOSTypeD2T.add(rbCPOSD2T);
    rbCPOSD2T.setText("Coarse-grained POS");

    javax.swing.GroupLayout pnlPOSTypeD2TLayout = new javax.swing.GroupLayout(pnlPOSTypeD2T);
    pnlPOSTypeD2T.setLayout(pnlPOSTypeD2TLayout);
    pnlPOSTypeD2TLayout.setHorizontalGroup(pnlPOSTypeD2TLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlPOSTypeD2TLayout.createSequentialGroup().addContainerGap()
                    .addGroup(pnlPOSTypeD2TLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(rbFPOSD2T).addComponent(rbCPOSD2T))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    pnlPOSTypeD2TLayout
            .setVerticalGroup(pnlPOSTypeD2TLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlPOSTypeD2TLayout.createSequentialGroup().addComponent(rbFPOSD2T)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(rbCPOSD2T)));

    javax.swing.GroupLayout pnlDep2TagLayout = new javax.swing.GroupLayout(pnlDep2Tag);
    pnlDep2Tag.setLayout(pnlDep2TagLayout);
    pnlDep2TagLayout.setHorizontalGroup(pnlDep2TagLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDep2TagLayout.createSequentialGroup().addContainerGap().addGroup(pnlDep2TagLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlDep2TagLayout.createSequentialGroup()
                            .addGroup(pnlDep2TagLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lblInputCoNLLFile).addComponent(lblOutputTagPath))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(pnlDep2TagLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtInputCoNLLFile).addComponent(txtOutputTagPath))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(pnlDep2TagLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(btnBrowseOutputTagPath,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
                                    .addComponent(btnBrowseInputCoNLLFile,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 27,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(pnlDep2TagLayout.createSequentialGroup()
                            .addGroup(pnlDep2TagLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(chkAddGoldTag).addComponent(pnlPOSTypeD2T,
                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 398,
                                    Short.MAX_VALUE)
                            .addComponent(btnConertDep2Tag)))
                    .addContainerGap()));
    pnlDep2TagLayout.setVerticalGroup(pnlDep2TagLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDep2TagLayout.createSequentialGroup().addContainerGap().addGroup(pnlDep2TagLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblInputCoNLLFile)
                    .addComponent(txtInputCoNLLFile, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnBrowseInputCoNLLFile))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(pnlDep2TagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblOutputTagPath)
                            .addComponent(txtOutputTagPath, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnBrowseOutputTagPath))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(pnlDep2TagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlDep2TagLayout.createSequentialGroup().addComponent(chkAddGoldTag)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(pnlPOSTypeD2T, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(btnConertDep2Tag))
                    .addContainerGap(146, Short.MAX_VALUE)));

    tabConverter.addTab("Dependency to Tagger", pnlDep2Tag);

    lblInputTagFile.setText("Input Tag File:");

    txtInputTagFile.setEditable(false);

    btnBrowseInputTagFile.setText("...");
    btnBrowseInputTagFile.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnBrowseInputTagFileActionPerformed(evt);
        }
    });

    lblOutputDepPath.setText("Output Path:");

    txtOutputDepPath.setEditable(false);

    btnBrowseOutputDepPath.setText("...");
    btnBrowseOutputDepPath.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnBrowseOutputDepPathActionPerformed(evt);
        }
    });

    btnConvertTag2Dep.setText("Start Convert");
    btnConvertTag2Dep.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnConvertTag2DepActionPerformed(evt);
        }
    });

    pnlPOSTypeT2D.setBorder(javax.swing.BorderFactory.createTitledBorder("Type"));

    rbgPOSTypeT2D.add(rbFPOST2D);
    rbFPOST2D.setSelected(true);
    rbFPOST2D.setText("Fine-grained POS");

    rbgPOSTypeT2D.add(rbCPOST2D);
    rbCPOST2D.setText("Coarse-grained POS");

    javax.swing.GroupLayout pnlPOSTypeT2DLayout = new javax.swing.GroupLayout(pnlPOSTypeT2D);
    pnlPOSTypeT2D.setLayout(pnlPOSTypeT2DLayout);
    pnlPOSTypeT2DLayout.setHorizontalGroup(pnlPOSTypeT2DLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlPOSTypeT2DLayout.createSequentialGroup().addContainerGap()
                    .addGroup(pnlPOSTypeT2DLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(rbFPOST2D).addComponent(rbCPOST2D))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    pnlPOSTypeT2DLayout
            .setVerticalGroup(pnlPOSTypeT2DLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlPOSTypeT2DLayout.createSequentialGroup().addComponent(rbFPOST2D)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(rbCPOST2D)));

    lblInputCoNLLFileT2D.setText("Input CoNLL File:");

    txtInputCoNLLFileT2D.setEditable(false);

    btnBrowseInputCoNLLFileT2D.setText("...");
    btnBrowseInputCoNLLFileT2D.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnBrowseInputCoNLLFileT2DActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout pnlTag2DepLayout = new javax.swing.GroupLayout(pnlTag2Dep);
    pnlTag2Dep.setLayout(pnlTag2DepLayout);
    pnlTag2DepLayout.setHorizontalGroup(pnlTag2DepLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTag2DepLayout.createSequentialGroup().addContainerGap()
                    .addGroup(pnlTag2DepLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlTag2DepLayout.createSequentialGroup()
                                    .addComponent(pnlPOSTypeT2D, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 398,
                                            Short.MAX_VALUE)
                                    .addComponent(btnConvertTag2Dep))
                            .addGroup(pnlTag2DepLayout.createSequentialGroup()
                                    .addGroup(pnlTag2DepLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lblInputTagFile).addComponent(lblOutputDepPath)
                                            .addComponent(lblInputCoNLLFileT2D))
                                    .addGap(14, 14, 14)
                                    .addGroup(pnlTag2DepLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(txtInputTagFile).addComponent(txtInputCoNLLFileT2D)
                                            .addComponent(txtOutputDepPath))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(pnlTag2DepLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
                                                    false)
                                            .addComponent(btnBrowseInputCoNLLFileT2D,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
                                            .addComponent(btnBrowseOutputDepPath,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                                            .addComponent(btnBrowseInputTagFile,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 31,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addContainerGap()));
    pnlTag2DepLayout.setVerticalGroup(pnlTag2DepLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTag2DepLayout.createSequentialGroup().addContainerGap().addGroup(pnlTag2DepLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtInputTagFile, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnBrowseInputTagFile).addComponent(lblInputTagFile))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(pnlTag2DepLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblInputCoNLLFileT2D)
                            .addComponent(txtInputCoNLLFileT2D, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnBrowseInputCoNLLFileT2D))
                    .addGap(8, 8, 8)
                    .addGroup(pnlTag2DepLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlTag2DepLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(lblOutputDepPath).addComponent(txtOutputDepPath,
                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(btnBrowseOutputDepPath))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(pnlTag2DepLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pnlPOSTypeT2D, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnConvertTag2Dep))
                    .addContainerGap(140, Short.MAX_VALUE)));

    tabConverter.addTab("Tagger to Dependency", pnlTag2Dep);

    javax.swing.GroupLayout pnlConverterLayout = new javax.swing.GroupLayout(pnlConverter);
    pnlConverter.setLayout(pnlConverterLayout);
    pnlConverterLayout.setHorizontalGroup(pnlConverterLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(pnlConverterLayout
                    .createSequentialGroup().addContainerGap().addComponent(tabConverter).addContainerGap()));
    pnlConverterLayout.setVerticalGroup(pnlConverterLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(pnlConverterLayout
                    .createSequentialGroup().addContainerGap().addComponent(tabConverter).addContainerGap()));

    jTabbedPane1.addTab("Converter", pnlConverter);

    lblTrainFile.setText("Train File:");

    txtTrainFile.setEditable(false);

    btnBrowseTrainFile.setText("...");
    btnBrowseTrainFile.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnBrowseTrainFileActionPerformed(evt);
        }
    });

    lblTrainModelPath.setText("Model Path:");

    txtTrainModelPath.setEditable(false);

    btnBrowseTrainModelPath.setText("...");
    btnBrowseTrainModelPath.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnBrowseTrainModelPathActionPerformed(evt);
        }
    });

    lblMaxIters.setText("Maximum Iterations:");

    btnStartTraining.setText("Start Training");
    btnStartTraining.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnStartTrainingActionPerformed(evt);
        }
    });

    txtTrainLog.setColumns(20);
    txtTrainLog.setRows(5);
    jScrollbar2.setViewportView(txtTrainLog);

    javax.swing.GroupLayout pnlTrainLayout = new javax.swing.GroupLayout(pnlTrain);
    pnlTrain.setLayout(pnlTrainLayout);
    pnlTrainLayout.setHorizontalGroup(pnlTrainLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTrainLayout.createSequentialGroup().addContainerGap()
                    .addGroup(pnlTrainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollbar2)
                            .addGroup(pnlTrainLayout.createSequentialGroup()
                                    .addGroup(pnlTrainLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lblTrainFile).addComponent(lblTrainModelPath))
                                    .addGap(18, 18, 18)
                                    .addGroup(pnlTrainLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(txtTrainFile).addComponent(txtTrainModelPath))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(pnlTrainLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
                                                    false)
                                            .addComponent(btnBrowseTrainModelPath,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
                                            .addComponent(btnBrowseTrainFile,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 30,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(pnlTrainLayout.createSequentialGroup().addComponent(lblMaxIters)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(spMaxIters, javax.swing.GroupLayout.PREFERRED_SIZE, 97,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 373,
                                            Short.MAX_VALUE)
                                    .addComponent(btnStartTraining)))
                    .addContainerGap()));
    pnlTrainLayout.setVerticalGroup(pnlTrainLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTrainLayout.createSequentialGroup().addContainerGap().addGroup(pnlTrainLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(lblTrainFile)
                    .addComponent(txtTrainFile, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnBrowseTrainFile))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(pnlTrainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblTrainModelPath)
                            .addComponent(txtTrainModelPath, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnBrowseTrainModelPath))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(pnlTrainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblMaxIters)
                            .addComponent(spMaxIters, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnStartTraining))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollbar2, javax.swing.GroupLayout.DEFAULT_SIZE, 262, Short.MAX_VALUE)
                    .addContainerGap()));

    jTabbedPane1.addTab("Train", pnlTrain);

    lblInputFile.setText("Input File:");

    txtInputFile.setEditable(false);

    btnBrowseInputFile.setText("...");
    btnBrowseInputFile.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnBrowseInputFileActionPerformed(evt);
        }
    });

    lblOutputPath.setText("Output Path:");

    txtOutputPath.setEditable(false);

    btnBrowseOutputPath.setText("...");
    btnBrowseOutputPath.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnBrowseOutputPathActionPerformed(evt);
        }
    });

    chkGoldFile.setSelected(true);
    chkGoldFile.setText("Gold File:");

    txtGoldFile.setEditable(false);

    btnBrowseGoldFile.setText("...");
    btnBrowseGoldFile.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnBrowseGoldFileActionPerformed(evt);
        }
    });

    txtTagLog.setColumns(20);
    txtTagLog.setEditable(false);
    txtTagLog.setRows(5);
    jScrollPane1.setViewportView(txtTagLog);

    javax.swing.GroupLayout pnlTagLogLayout = new javax.swing.GroupLayout(pnlTagLog);
    pnlTagLog.setLayout(pnlTagLogLayout);
    pnlTagLogLayout
            .setHorizontalGroup(pnlTagLogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 664, Short.MAX_VALUE));
    pnlTagLogLayout
            .setVerticalGroup(pnlTagLogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE));

    tabTag.addTab("Log", pnlTagLog);

    lblTagEvaluation.setText("Total: 0 - Correct: 0 - Accuracy: 0%");

    lstWordsList.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            lst_mouseClick(evt);
        }
    });
    lstWordsList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
        public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
            lstWoldsList_valueChanged(evt);
        }
    });
    jScrollPane2.setViewportView(lstWordsList);

    lblWordsList.setText("Words List");

    lstPredictedTags.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            lst_mouseClick(evt);
        }
    });
    lstPredictedTags.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
        public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
            lstPredictedTags_valueChanged(evt);
        }
    });
    jScrollPane3.setViewportView(lstPredictedTags);

    lstGoldTags.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            lst_mouseClick(evt);
        }
    });
    lstGoldTags.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
        public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
            lstGoldTags_valueChanged(evt);
        }
    });
    jScrollPane4.setViewportView(lstGoldTags);

    lblPredictedTags.setText("Predicted Tags");

    lblGoldTags.setText("Gold Tags");

    javax.swing.GroupLayout pnlTagResultsLayout = new javax.swing.GroupLayout(pnlTagResults);
    pnlTagResults.setLayout(pnlTagResultsLayout);
    pnlTagResultsLayout.setHorizontalGroup(pnlTagResultsLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTagResultsLayout.createSequentialGroup().addContainerGap().addGroup(pnlTagResultsLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlTagResultsLayout
                            .createSequentialGroup()
                            .addGroup(pnlTagResultsLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lblWordsList).addComponent(jScrollPane2,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 244,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(pnlTagResultsLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lblPredictedTags).addComponent(jScrollPane3,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE))
                            .addGap(7, 7, 7)
                            .addGroup(pnlTagResultsLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 184,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblGoldTags)))
                    .addComponent(lblTagEvaluation, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addContainerGap()));
    pnlTagResultsLayout.setVerticalGroup(pnlTagResultsLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlTagResultsLayout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                            pnlTagResultsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(lblWordsList).addComponent(lblPredictedTags)
                                    .addComponent(lblGoldTags))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(pnlTagResultsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 119,
                                    Short.MAX_VALUE)
                            .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 0,
                                    Short.MAX_VALUE)
                            .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 0,
                                    Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(lblTagEvaluation).addContainerGap()));

    tabTag.addTab("Results", pnlTagResults);

    btnStartTagging.setText("Start Tagging");
    btnStartTagging.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnStartTaggingActionPerformed(evt);
        }
    });

    lblModelPath.setText("Model Path:");

    txtModelPath.setEditable(false);

    btnBrowseModelPath.setText("...");
    btnBrowseModelPath.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnBrowseModelPathActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout pnlTagLayout = new javax.swing.GroupLayout(pnlTag);
    pnlTag.setLayout(pnlTagLayout);
    pnlTagLayout.setHorizontalGroup(pnlTagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTagLayout.createSequentialGroup().addContainerGap()
                    .addGroup(pnlTagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                    pnlTagLayout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE)
                                            .addComponent(btnStartTagging))
                            .addComponent(tabTag)
                            .addGroup(pnlTagLayout.createSequentialGroup()
                                    .addGroup(pnlTagLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lblInputFile).addComponent(lblOutputPath)
                                            .addComponent(chkGoldFile).addComponent(lblModelPath))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(pnlTagLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(txtGoldFile).addComponent(txtOutputPath)
                                            .addComponent(txtInputFile).addComponent(txtModelPath))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(pnlTagLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
                                                    false)
                                            .addComponent(btnBrowseModelPath,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                                            .addComponent(btnBrowseGoldFile,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
                                            .addComponent(btnBrowseOutputPath,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
                                            .addComponent(btnBrowseInputFile,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 29,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addContainerGap()));
    pnlTagLayout
            .setVerticalGroup(pnlTagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlTagLayout.createSequentialGroup().addContainerGap()
                            .addGroup(pnlTagLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(pnlTagLayout.createSequentialGroup().addGroup(pnlTagLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(lblModelPath)
                                            .addComponent(txtModelPath, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGap(4, 4, 4))
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlTagLayout
                                            .createSequentialGroup().addComponent(btnBrowseModelPath)
                                            .addPreferredGap(
                                                    javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                            .addGroup(
                                    pnlTagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(lblInputFile)
                                            .addComponent(txtInputFile, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(btnBrowseInputFile))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(
                                    pnlTagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(lblOutputPath)
                                            .addComponent(txtOutputPath, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(btnBrowseOutputPath))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(
                                    pnlTagLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(chkGoldFile)
                                            .addComponent(txtGoldFile, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(btnBrowseGoldFile))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(btnStartTagging)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(tabTag).addContainerGap()));

    jTabbedPane1.addTab("Tag", pnlTag);

    pnlAbout.addComponentListener(new java.awt.event.ComponentAdapter() {
        public void componentShown(java.awt.event.ComponentEvent evt) {
            pnlAbout_Shown(evt);
        }
    });

    lblMXPostTitle.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
    lblMXPostTitle.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    lblMXPostTitle.setText("MXPost (Version 1.0)");

    lblMXPostSiteTitle.setText("Site:");

    lblMXPostSiteValue.setEditable(false);
    lblMXPostSiteValue.setForeground(new java.awt.Color(0, 102, 204));
    lblMXPostSiteValue.setText("http://www.inf.ed.ac.uk/resources/nlp/local_doc/MXPOST.html");
    lblMXPostSiteValue.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
    lblMXPostSiteValue.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

    lblMXPostAuthorsTitle.setText("Authors:");

    lblMXPostAuthorsValue.setEditable(false);
    lblMXPostAuthorsValue.setText("Adwait Ratnaparkhi");
    lblMXPostAuthorsValue.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));

    lblMXPostCitationTitle.setText("Citation:");

    txtMXPostCitationValue.setColumns(20);
    txtMXPostCitationValue.setEditable(false);
    txtMXPostCitationValue.setLineWrap(true);
    txtMXPostCitationValue.setRows(5);
    txtMXPostCitationValue.setText(
            "A. Ratnaparkhi, \"A maximum entropy model for part-of-speech tagging\", in Proceedings of the Empirical Methods in Natural Language Processing Conference, University of Pennsylvania, pp. 133-142, 1996.");
    jScrollPane9.setViewportView(txtMXPostCitationValue);

    lblMXpostLicenseTitle.setText("License");

    txtMXPostLicenseValue.setColumns(20);
    txtMXPostLicenseValue.setEditable(false);
    txtMXPostLicenseValue.setRows(5);
    txtMXPostLicenseValue.setText(
            "                              SOFTWARE LICENSE\n\n                          MXPOST and MXTERMINATOR\n\n                            All rights reserved.\n\n                        (c) 1997 Adwait Ratnaparkhi\n\n                      Developed by Adwait Ratnaparkhi\n                         University of Pennsylvania\n                 Dept. of Computer and Information Science\n                           200 South 33rd Street\n                          Philadelphia, PA. 19104\n\n   LICENSE INFORMATION\n\n   Adwait Ratnaparkhi (\"Owner\") grants to the individual researcher who\n   downloads this software (\"Licensee\") a non-exclusive, non-transferable\n   run-time license to use the MXPOST and MXTERMINATOR software\n   (\"Software\"), subject to the restrictions listed below under \"Scope of\n   Grant.\"\n\n   SCOPE OF GRANT\n\n   The Licensee may:\n     * use the Software for educational or research purposes;\n     * permit others under the Licensee's supervision at the same site to\n       use the Software for educational or research purposes;\n     * copy the Software for archival purposes, provided that any such\n       copy contains all of the original proprietary notices.\n\n   The Licensee may not:\n     * use the Software for commercial purposes;\n     * allow any individual who is not under the direct supervision of\n       the Licensee to use the Software;\n     * redistribute the Software;\n     * copy the Software other than as specified above;\n     * rent, lease, grant a security interest in, or otherwise transfer\n       rights to the Software;\n     * remove any proprietary notices or labels accompanying the\n       Software;\n\n   DISCLAIMER\n\n   The Owner makes no representations or warranties about the suitability\n   of the Software and Linguistic Resources, either express or implied,\n   including but not limited to the implied warranties of\n   merchantability, fitness for a particular purpose, or\n   non-infringement. The Owner shall not be liable for any damages\n   suffered by Licensee as a result of using, modifying or distributing\n   the Software or its derivatives.\n\n   CONSENT\n\n   By downloading, using or copying the Software, Licensee agrees to\n   abide by the intellectual property laws, and all other applicable laws\n   of the U.S., and the terms of this License. Ownership of the Software\n   shall remain solely with the Owner.\n\n   TERMINATION\n\n   The Owner shall have the right to terminate this license at any time\n   by written notice. Licensee shall be liable for any infringement or\n   damages resulting from Licensee's failure to abide by the terms of\n   this License.");
    jScrollPane5.setViewportView(txtMXPostLicenseValue);

    javax.swing.GroupLayout pnlAboutLayout = new javax.swing.GroupLayout(pnlAbout);
    pnlAbout.setLayout(pnlAboutLayout);
    pnlAboutLayout.setHorizontalGroup(pnlAboutLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlAboutLayout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(pnlAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblMXPostTitle, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlAboutLayout
                                    .createSequentialGroup()
                                    .addGroup(pnlAboutLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lblMXpostLicenseTitle)
                                            .addComponent(lblMXPostCitationTitle))
                                    .addGap(11, 11, 11)
                                    .addGroup(pnlAboutLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jScrollPane9).addComponent(jScrollPane5)))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlAboutLayout
                                    .createSequentialGroup()
                                    .addGroup(pnlAboutLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lblMXPostAuthorsTitle)
                                            .addComponent(lblMXPostSiteTitle))
                                    .addGap(10, 10, 10)
                                    .addGroup(pnlAboutLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lblMXPostSiteValue,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, 617, Short.MAX_VALUE)
                                            .addComponent(lblMXPostAuthorsValue))))
                    .addContainerGap()));
    pnlAboutLayout.setVerticalGroup(pnlAboutLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAboutLayout.createSequentialGroup().addContainerGap().addComponent(lblMXPostTitle)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(pnlAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblMXPostSiteTitle).addComponent(lblMXPostSiteValue,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(pnlAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblMXPostAuthorsTitle).addComponent(lblMXPostAuthorsValue,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(pnlAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlAboutLayout.createSequentialGroup()
                                    .addComponent(lblMXPostCitationTitle).addGap(0, 91, Short.MAX_VALUE))
                            .addGroup(pnlAboutLayout.createSequentialGroup()
                                    .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 9,
                                            Short.MAX_VALUE)))
                    .addGroup(pnlAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(pnlAboutLayout.createSequentialGroup().addComponent(lblMXpostLicenseTitle)
                                    .addGap(0, 0, Short.MAX_VALUE))
                            .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 155,
                                    Short.MAX_VALUE))
                    .addContainerGap()));

    jTabbedPane1.addTab("About", pnlAbout);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jTabbedPane1));
    layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jTabbedPane1));

    pack();
}

From source file:edu.ku.brc.af.ui.forms.formatters.DataObjFieldFormatDlg.java

/**
 * @return//w w w.  j  a v  a 2 s.c om
 */
protected List<DataObjSwitchFormatter> populateFormatterList() {
    // list of existing formats
    DefaultListModel listModel = new DefaultListModel();

    // add available data object formatters
    List<DataObjSwitchFormatter> fmtrs;
    fmtrs = dataObjFieldFormatMgrCache.getFormatterList(tableInfo.getClassObj());
    Collections.sort(fmtrs, new ComparatorByStringRepresentation<DataObjSwitchFormatter>());
    for (DataObjSwitchFormatter format : fmtrs) {
        listModel.addElement(format);
        //uniqueTitles.add(format.getTitle());
    }

    return fmtrs;
}