private void radioButtonFactory() {
    createAssociationRadioButton = new JRadioButton(Constants.createAssociationText);
    createAssociationRadioButton.setSelected(true);
    createAssociationRadioButton.setFont(new Font("sansserif", 1, 16));
    createAssociationRadioButton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            if (createAssociationRadioButton.isSelected()) {
              algorithmComboBox.setEnabled(true);

              associationFilePathTextField.setEnabled(false);
              browseButton.setEnabled(false);
              canSelect = false;
            }
          }
        });

    loadAssociationRadioButton = new JRadioButton(Constants.loadAssociationText);
    loadAssociationRadioButton.setSelected(false);
    loadAssociationRadioButton.setFont(new Font("sansserif", 1, 16));
    loadAssociationRadioButton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            if (loadAssociationRadioButton.isSelected()) {
              associationFilePathTextField.setEnabled(true);
              browseButton.setEnabled(true);
              canSelect = true;

              algorithmComboBox.setEnabled(false);
              networkComboBox.setEnabled(false);
              numberComboBox.setEnabled(false);
            }
          }
        });

    radioButtonGroup = new ButtonGroup();
    radioButtonGroup.add(createAssociationRadioButton);
    radioButtonGroup.add(loadAssociationRadioButton);
  }
  private void initComponents() { // GEN-BEGIN:initComponents

    // COMPONENTES DE LA PESTAÑA 1
    jPanel1 = new javax.swing.JPanel();
    PanelP = new javax.swing.JPanel();

    jButton1 = new javax.swing.JButton(); // linea 2
    jButton2 = new javax.swing.JButton();

    jEtiq1 = new javax.swing.JLabel();
    jEtiq2 = new javax.swing.JLabel();
    jEtiq3 = new javax.swing.JLabel();
    jEtiq4 = new javax.swing.JLabel();
    jEtiq5 = new javax.swing.JLabel();

    // Se crea el scroll para el área de texto de los vectores
    vectores = new javax.swing.JTextArea(null, 0, 0);
    help = new javax.swing.JEditorPane();
    help.setEditable(false);

    scroll = new javax.swing.JScrollPane(vectores);
    scroll2 = new javax.swing.JScrollPane(help);

    tvariables = new javax.swing.JTextField();
    texpresion = new javax.swing.JTextField();
    tconstantes = new javax.swing.JTextField();

    TabFolders = new javax.swing.JTabbedPane();

    // COMPONENTES DE LA PESTAÑA 2
    buttonGroup1 = new javax.swing.ButtonGroup();
    buttonGroup2 = new javax.swing.ButtonGroup();
    PanelP = new javax.swing.JPanel();
    Label1 = new javax.swing.JLabel();
    Label2 = new javax.swing.JLabel();
    Label3 = new javax.swing.JLabel();
    tConstantes = new javax.swing.JTextField();
    tVariables = new javax.swing.JTextField();
    tExpresion = new javax.swing.JTextField();
    Panel2 = new javax.swing.JPanel();
    Label4 = new javax.swing.JLabel();
    Etiq = new javax.swing.JLabel();
    Label5 = new javax.swing.JLabel();
    Label6 = new javax.swing.JLabel();
    Label7 = new javax.swing.JLabel();
    rECM = new javax.swing.JRadioButton();
    rKS = new javax.swing.JRadioButton();
    Label8 = new javax.swing.JLabel();
    Label9 = new javax.swing.JLabel();
    Label10 = new javax.swing.JLabel();
    Label11 = new javax.swing.JLabel();
    Label12 = new javax.swing.JLabel();
    Label13 = new javax.swing.JLabel();
    Label14 = new javax.swing.JLabel();
    rAutomatico = new javax.swing.JRadioButton();
    rArchivo = new javax.swing.JRadioButton();
    Label15 = new javax.swing.JLabel();
    Label16 = new javax.swing.JLabel();
    tCruce = new javax.swing.JTextField();
    tMutacion = new javax.swing.JTextField();
    tPoblacion = new javax.swing.JTextField();
    tGeneraciones = new javax.swing.JTextField();
    tEntrada = new javax.swing.JTextField();
    tSalida = new javax.swing.JTextField();
    tValmin = new javax.swing.JTextField();
    tValmax = new javax.swing.JTextField();
    tValarchivo = new javax.swing.JTextField();
    Label17 = new javax.swing.JLabel();
    tErrormin = new javax.swing.JTextField();
    tErrormax = new javax.swing.JTextField();
    tDelta = new javax.swing.JTextField();
    tKS = new javax.swing.JTextField();
    bEvolucion = new javax.swing.JButton();
    barra = new javax.swing.JProgressBar();

    // UBICACION DE LOS COMPONENTES DE LA PRIMERA PESTAÑA
    getContentPane().setLayout(null);
    // getContentPane().setBackground(new java.awt.Color(255,195,140));

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("Parámetros de Entrada Para el Simulador");
    setResizable(false);

    jPanel1.setLayout(null);

    jPanel1.setBackground(new java.awt.Color(240, 240, 240));
    jPanel1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(100, 100, 100)));
    jEtiq1.setFont(new java.awt.Font("Microsoft Sans Serif", 1, 12));
    jEtiq1.setText("Función :");
    jPanel1.add(jEtiq1);
    jEtiq1.setBounds(30, 45, 70, 13);

    jEtiq2.setFont(new java.awt.Font("Microsoft Sans Serif", 1, 12));
    jEtiq2.setText("Variables: ");
    jPanel1.add(jEtiq2);
    jEtiq2.setBounds(30, 79, 70, 13);

    jEtiq3.setFont(new java.awt.Font("Microsoft Sans Serif", 1, 11));
    jEtiq3.setText("Constantes: ");
    jPanel1.add(jEtiq3);
    jEtiq3.setBounds(25, 109, 72, 19);

    jEtiq4.setFont(new java.awt.Font("Microsoft Sans Serif", 1, 12));
    jEtiq4.setText("  Vectores");
    jPanel1.add(jEtiq4);
    jEtiq4.setBounds(30, 145, 80, 13);

    jEtiq5.setFont(new java.awt.Font("Microsoft Sans Serif", 1, 12));
    jEtiq5.setText("  Iniciales:");
    jPanel1.add(jEtiq5);
    jEtiq5.setBounds(30, 165, 80, 13);

    tconstantes.setFont(new java.awt.Font("Arial", 1, 13));
    tconstantes.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 100, 200)));
    jPanel1.add(tconstantes);
    tconstantes.setBounds(100, 110, 240, 23);
    tconstantes.setText("");

    tvariables.setFont(new java.awt.Font("Arial", 1, 13));
    tvariables.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 100, 200)));
    jPanel1.add(tvariables);
    tvariables.setBounds(100, 75, 240, 23);
    tvariables.setText("");

    texpresion.setFont(new java.awt.Font("Arial", 1, 11));
    texpresion.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 100, 200)));
    jPanel1.add(texpresion);
    texpresion.setBounds(100, 40, 240, 23);
    texpresion.setText("");

    vectores.setFont(new java.awt.Font("Arial", 1, 14));
    scroll.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 100, 200)));
    jPanel1.add(scroll);
    scroll.setBounds(100, 145, 240, 193);
    vectores.setText("");

    // AREA DONDE SE LE MUESTRAN LOS COMENTARIOS DE AYUDA AL USUARIO
    help.setFont(new java.awt.Font("Times New Roman", 2, 13));
    help.setBackground(new java.awt.Color(240, 240, 240));
    help.setBounds(390, 52, 204, 294);
    scroll2.setBackground(new java.awt.Color(240, 240, 240));
    scroll2.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 100, 200)));
    scroll2.setAutoscrolls(true);
    //        scroll2.setCorner(this,1);
    jPanel1.add(scroll2);
    scroll2.setBounds(360, 40, 206, 298);
    letrero_inicial();

    // getContentPane().add(jPanel1);

    // DEFINE LAS DIMENSIONES DEL PANEL: x,y,ancho,altura
    // jPanel1.setBounds(40, 20, 340, 320);

    TabFolders.setBackground(new java.awt.Color(225, 225, 225));
    TabFolders.add(" Parámetros de Entrada ", jPanel1);

    // UBICACION DE LOS COMPONENTES DE LA SEGUNDA PESTAÑA
    // getContentPane().setLayout(null);
    PanelP.setLayout(null);
    PanelP.setBackground(new java.awt.Color(240, 240, 240));
    PanelP.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(100, 100, 100)));

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle(
        "Estimador de parámetros para funciones no lineales por simulación de algoritmos evolutivos");
    setResizable(false);

    Label4.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    Label4.setText("Probabilidad Cruce:");
    PanelP.add(Label4);
    Label4.setBounds(40, 20, 110, 13);

    Label5.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    Label5.setText("Probabilidad de mutaci\u00f3n:");
    PanelP.add(Label5);
    Label5.setBounds(40, 50, 130, 13);

    Label6.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    Label6.setText("Cantidad de poblaci\u00f3n:");
    PanelP.add(Label6);
    Label6.setBounds(40, 80, 120, 13);

    Label7.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    Label7.setText("N\u00famero de generaciones:");
    PanelP.add(Label7);
    Label7.setBounds(40, 110, 130, 13);

    rECM.setBackground(new java.awt.Color(240, 240, 240));
    rECM.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    rECM.setText("ECM");
    rECM.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            RECMActionPerformed(evt);
          }
        });

    PanelP.add(rECM);
    rECM.setBounds(312, 40, 49, 21);

    rKS.setBackground(new java.awt.Color(240, 240, 240));
    rKS.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    rKS.setText("Kolmogorov - Smirnov");
    rKS.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            RKSActionPerformed(evt);
          }
        });

    PanelP.add(rKS);
    rKS.setBounds(310, 60, 130, 21);

    Label8.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    Label8.setText("Error m\u00ednimo:");
    PanelP.add(Label8);
    Label8.setBounds(300, 120, 80, 13);

    Label9.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    Label9.setText("Error m\u00e1ximo:");
    PanelP.add(Label9);
    Label9.setBounds(300, 150, 70, 13);

    Label9.setVisible(false);

    Label10.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    Label10.setText("Delta de error:");
    PanelP.add(Label10);
    Label10.setBounds(300, 180, 80, 13);

    Label10.setVisible(false);

    Label11.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    Label11.setText("Porcentaje de puntos (K-S):");
    PanelP.add(Label11);
    Label11.setBounds(300, 150, 130, 13);

    /*Label12.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    Label12.setText("Archivo de entrada:");
    PanelP.add(Label12);
    Label12.setBounds(40, 140, 92, 13);*/

    Label13.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    Label13.setText("Archivo de salida:");
    PanelP.add(Label13);
    Label13.setBounds(40, 140, 100, 13);

    Label14.setFont(new java.awt.Font("Microsoft Sans Serif", 1, 10));
    Label14.setText("Calcular pobaci\u00f3n inicial ");
    PanelP.add(Label14);
    Label14.setBounds(20, 210, 220, 13);

    rAutomatico.setBackground(new java.awt.Color(240, 240, 240));
    rAutomatico.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 100, 200)));
    rAutomatico.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    rAutomatico.setText("Autom\u00e1ticamente:");
    PanelP.add(rAutomatico);
    rAutomatico.setBounds(50, 230, 130, 21);

    rArchivo.setBackground(new java.awt.Color(240, 240, 240));
    rArchivo.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 100, 200)));
    rArchivo.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    rArchivo.setText("Valores dados de archivo:");
    PanelP.add(rArchivo);
    rArchivo.setBounds(50, 300, 150, 21);

    Label15.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    Label15.setText("Valores entre:");
    PanelP.add(Label15);
    Label15.setBounds(60, 260, 80, 13);

    Label16.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    Label16.setText("y");
    PanelP.add(Label16);
    Label16.setBounds(210, 260, 20, 13);

    tCruce.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    tCruce.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 100, 200)));
    PanelP.add(tCruce);
    tCruce.setBounds(140, 20, 110, 18);
    tCruce.setText("0.5");

    tMutacion.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    tMutacion.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 100, 200)));
    PanelP.add(tMutacion);
    tMutacion.setBounds(170, 50, 80, 18);
    tMutacion.setText("0.025");

    tPoblacion.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    tPoblacion.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 100, 200)));
    PanelP.add(tPoblacion);
    tPoblacion.setBounds(160, 80, 90, 18);
    tPoblacion.setText("200");

    tGeneraciones.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    tGeneraciones.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 100, 200)));
    PanelP.add(tGeneraciones);
    tGeneraciones.setBounds(170, 110, 80, 18);
    tGeneraciones.setText("100");

    tEntrada.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    PanelP.add(tEntrada);
    tEntrada.setBounds(240, 140, 110, 18);
    tEntrada.setText("Entrada.txt");
    tEntrada.setVisible(false);

    tSalida.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    tSalida.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 100, 200)));
    PanelP.add(tSalida);
    tSalida.setBounds(130, 140, 120, 18);
    tSalida.setText("Salida.txt");

    tValmin.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    tValmin.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 100, 200)));
    PanelP.add(tValmin);
    tValmin.setBounds(140, 260, 60, 18);
    tValmin.setText("-100.0");

    tValmax.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    tValmax.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 100, 200)));
    PanelP.add(tValmax);
    tValmax.setBounds(230, 260, 60, 18);
    tValmax.setText("100.0");

    tDelta.setVisible(false);

    tValarchivo.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    tValarchivo.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 100, 200)));
    PanelP.add(tValarchivo);
    tValarchivo.setBounds(70, 330, 220, 18);
    tValarchivo.setText("dataDefault.txt");

    Label17.setFont(new java.awt.Font("Microsoft Sans Serif", 1, 10));
    Label17.setText("C\u00e1lculo del error:");
    PanelP.add(Label17);
    Label17.setBounds(300, 20, 100, 13);

    tErrormin.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    tErrormin.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 100, 200)));
    PanelP.add(tErrormin);
    tErrormin.setBounds(440, 120, 80, 18);
    tErrormin.setText("0.0");

    tErrormax.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    tErrormax.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 100, 200)));
    PanelP.add(tErrormax);
    tErrormax.setBounds(390, 150, 80, 18);
    tErrormax.setText("0.01");

    tErrormax.setVisible(false);

    tDelta.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    PanelP.add(tDelta);
    tDelta.setBounds(390, 180, 80, 18);
    tDelta.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 100, 200)));
    tDelta.setText("0.1");

    tKS.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 10));
    tKS.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 100, 200)));
    PanelP.add(tKS);
    tKS.setBounds(440, 150, 80, 18);
    tKS.setText("0.8");

    bEvolucion.setText("Iniciar!");
    bEvolucion.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 20));
    bEvolucion.setBackground(new java.awt.Color(210, 210, 210));
    bEvolucion.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(100, 100, 100)));

    bEvolucion.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            BEvolucionActionPerformed(evt);
          }
        });

    tExpresion.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent e) {
            TExpresionActionPerformed(e);
          }
        });

    PanelP.add(bEvolucion);
    bEvolucion.setBounds(370, 280, 150, 70);

    Etiq.setFont(new java.awt.Font("Microsoft Sans Serif", 1, 10));
    Etiq.setBounds(345, 183, 190, 70);
    Etiq.setText("Evolución de las Generaciones:");
    PanelP.add(Etiq);
    Etiq.setVisible(false);

    barra.setBounds(370, 240, 150, 20);

    barra.setMinimum(0);
    barra.setMaximum(100);
    barra.setVisible(false);
    barra.setBackground(new java.awt.Color(240, 240, 240));
    barra.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0)));
    PanelP.add(barra);

    buttonGroup1.add(rECM);
    buttonGroup1.add(rKS);
    rECM.setSelected(true);
    rECM.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 100, 200)));

    buttonGroup2.add(rArchivo);
    buttonGroup2.add(rAutomatico);
    rAutomatico.setSelected(true);

    TabFolders.setEnabled(true);
    TabFolders.add(" Ejecución de la Simulación ", PanelP);
    TabFolders.setBounds(40, 20, 600, 400);
    getContentPane().add(TabFolders, java.awt.BorderLayout.CENTER);

    // Se adicionan los "escuchadores" de foco a los campos de texto de la primera pestaña

    SymFocus aSymFocus = new SymFocus(this);
    texpresion.addFocusListener(aSymFocus);
    tconstantes.addFocusListener(aSymFocus);
    tvariables.addFocusListener(aSymFocus);
    vectores.addFocusListener(aSymFocus);

    pack();

    java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
    setBounds((screenSize.width - 925) / 2, (screenSize.height - 582) / 2, 675, 482);
  }
  /** Sets up the GUI (panels, buttons, etc) and displays it on the screen. */
  private void init() {
    DecimalFormat df;
    int xUnits;
    String unitStr;
    String distStr;
    setForeground(Color.black);
    setTitle("Center Distances version 2  07/14/08");

    df = new DecimalFormat("0.000E0");

    GridBagConstraints gbc = new GridBagConstraints();
    int yPos = 0;
    gbc.gridwidth = 1;
    gbc.gridheight = 1;
    gbc.anchor = GridBagConstraints.WEST;
    gbc.weightx = 1;
    gbc.insets = new Insets(3, 3, 3, 3);
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.gridx = 0;
    gbc.gridy = yPos++;

    JPanel mainPanel = new JPanel(new GridBagLayout());
    mainPanel.setForeground(Color.black);
    mainPanel.setBorder(buildTitledBorder("Input parameters"));

    blueMinLabel = new JLabel("Minimum number of blue pixels per nucleus");
    blueMinLabel.setForeground(Color.black);
    blueMinLabel.setFont(serif12);
    gbc.gridx = 0;
    gbc.gridy = yPos;
    mainPanel.add(blueMinLabel, gbc);

    blueMinText = new JTextField(5);
    if (image.getNDims() == 2) {
      blueMinText.setText("1000");
    } else {
      blueMinText.setText("20000");
    }
    blueMinText.setFont(serif12);
    gbc.gridx = 1;
    gbc.gridy = yPos++;
    mainPanel.add(blueMinText, gbc);

    redMinLabel = new JLabel("Minimum red pixel count");
    redMinLabel.setForeground(Color.black);
    redMinLabel.setFont(serif12);
    gbc.gridx = 0;
    gbc.gridy = yPos;
    mainPanel.add(redMinLabel, gbc);

    redMinText = new JTextField(5);
    redMinText.setText("50");
    redMinText.setFont(serif12);
    gbc.gridx = 1;
    gbc.gridy = yPos++;
    mainPanel.add(redMinText, gbc);

    redFractionLabel = new JLabel("Fraction of red pixels to consider");
    redFractionLabel.setForeground(Color.black);
    redFractionLabel.setFont(serif12);
    gbc.gridx = 0;
    gbc.gridy = yPos;
    mainPanel.add(redFractionLabel, gbc);

    redFractionText = new JTextField(5);
    redFractionText.setText("0.15");
    redFractionText.setFont(serif12);
    gbc.gridx = 1;
    gbc.gridy = yPos++;
    mainPanel.add(redFractionText, gbc);

    xUnits = image.getFileInfo(0).getUnitsOfMeasure()[0];
    if (xUnits != Unit.UNKNOWN_MEASURE.getLegacyNum()) {
      unitStr = (Unit.getUnitFromLegacyNum(xUnits)).toString();
      greenMergingLabel = new JLabel("Green merging radius around peak (" + unitStr + ")");
    } else {
      greenMergingLabel = new JLabel("Green merging radius around peak");
    }
    greenMergingLabel.setForeground(Color.black);
    greenMergingLabel.setFont(serif12);
    gbc.gridx = 0;
    gbc.gridy = yPos;
    mainPanel.add(greenMergingLabel, gbc);

    if (image.getNDims() == 2) {
      // mergingDistance = 8.0f * image.getFileInfo(0).getResolutions()[0];
      mergingDistance = 0.0f;
    } else {
      // mergingDistance = 4.0f * image.getFileInfo(0).getResolutions()[0];
      mergingDistance = 0.0f;
    }
    distStr = df.format(mergingDistance);
    greenMergingText = new JTextField(10);
    greenMergingText.setText(distStr);
    greenMergingText.setFont(serif12);
    gbc.gridx = 1;
    gbc.gridy = yPos++;
    mainPanel.add(greenMergingText, gbc);

    greenMinLabel = new JLabel("Minimum green pixel count");
    greenMinLabel.setForeground(Color.black);
    greenMinLabel.setFont(serif12);
    gbc.gridx = 0;
    gbc.gridy = yPos;
    mainPanel.add(greenMinLabel, gbc);

    greenMinText = new JTextField(5);
    greenMinText.setText("10");
    greenMinText.setFont(serif12);
    gbc.gridx = 1;
    gbc.gridy = yPos++;
    mainPanel.add(greenMinText, gbc);

    greenFractionLabel = new JLabel("Fraction of green pixels to consider");
    greenFractionLabel.setForeground(Color.black);
    greenFractionLabel.setFont(serif12);
    gbc.gridx = 0;
    gbc.gridy = yPos;
    mainPanel.add(greenFractionLabel, gbc);

    greenFractionText = new JTextField(5);
    greenFractionText.setText("0.01");
    greenFractionText.setFont(serif12);
    gbc.gridx = 1;
    gbc.gridy = yPos++;
    mainPanel.add(greenFractionText, gbc);

    greenRegionsLabel = new JLabel("Green regions per cell");
    greenRegionsLabel.setForeground(Color.black);
    greenRegionsLabel.setFont(serif12);
    gbc.gridx = 0;
    gbc.gridy = yPos;
    mainPanel.add(greenRegionsLabel, gbc);

    JPanel buttonPanel = new JPanel(new GridBagLayout());

    greenGroup = new ButtonGroup();

    oneButton = new JRadioButton("1", false);
    oneButton.setForeground(Color.black);
    oneButton.setFont(serif12);
    greenGroup.add(oneButton);
    gbc.gridx = 0;
    gbc.gridy = 0;
    buttonPanel.add(oneButton, gbc);

    twoButton = new JRadioButton("2", true);
    twoButton.setForeground(Color.black);
    twoButton.setFont(serif12);
    greenGroup.add(twoButton);
    gbc.gridx = 1;
    gbc.gridy = 0;
    buttonPanel.add(twoButton, gbc);

    threeButton = new JRadioButton("3", false);
    threeButton.setForeground(Color.black);
    threeButton.setFont(serif12);
    greenGroup.add(threeButton);
    gbc.gridx = 2;
    gbc.gridy = 0;
    buttonPanel.add(threeButton, gbc);

    fourButton = new JRadioButton("4", false);
    fourButton.setForeground(Color.black);
    fourButton.setFont(serif12);
    greenGroup.add(fourButton);
    gbc.gridx = 3;
    gbc.gridy = 0;
    buttonPanel.add(fourButton, gbc);

    gbc.gridx = 1;
    gbc.gridy = yPos++;
    mainPanel.add(buttonPanel, gbc);

    twoBox = new JCheckBox("Use 2 top gray levels in green segmentation", true);
    twoBox.setForeground(Color.black);
    twoBox.setFont(serif12);
    gbc.gridx = 0;
    gbc.gridy = yPos++;
    mainPanel.add(twoBox, gbc);

    blueValueLabel =
        new JLabel("Fraction of blue transition from image min to max at nucleus boundary");
    blueValueLabel.setForeground(Color.black);
    blueValueLabel.setFont(serif12);
    gbc.gridx = 0;
    gbc.gridy = yPos;
    mainPanel.add(blueValueLabel, gbc);

    blueValueText = new JTextField(5);
    blueValueText.setText("0.15");
    blueValueText.setFont(serif12);
    gbc.gridx = 1;
    gbc.gridy = yPos++;
    mainPanel.add(blueValueText, gbc);

    blueSmoothBox = new JCheckBox("Smooth blue VOI contours with AlgorithmBSmooth", true);
    blueSmoothBox.setForeground(Color.black);
    blueSmoothBox.setFont(serif12);
    blueSmoothBox.addActionListener(this);
    gbc.gridx = 0;
    gbc.gridy = yPos++;
    mainPanel.add(blueSmoothBox, gbc);

    interpolationLabel = new JLabel("Number of interpolation points determined by divisor (> 1.0)");
    interpolationLabel.setForeground(Color.black);
    interpolationLabel.setFont(serif12);
    gbc.gridx = 0;
    gbc.gridy = yPos;
    mainPanel.add(interpolationLabel, gbc);

    interpolationText = new JTextField(5);
    interpolationText.setText("24.0");
    interpolationText.setFont(serif12);
    gbc.gridx = 1;
    gbc.gridy = yPos++;
    mainPanel.add(interpolationText, gbc);

    getContentPane().add(mainPanel, BorderLayout.CENTER);
    getContentPane().add(buildButtons(), BorderLayout.SOUTH);

    pack();
    setVisible(true);
    setResizable(false);
    System.gc();
  } // end init()
示例#4
0
  private void initializeComponents() {

    Font font;
    try {
      font = Font.createFont(Font.TRUETYPE_FONT, new FileInputStream("images/Riffic.ttf"));
      Font styledAndSized = font.deriveFont(36F);
      playerSelectLabel = new JLabel("Select Number of Players");
      playerSelectLabel.setFont(styledAndSized);

      submitButton = new JButton("Submit");
      styledAndSized = font.deriveFont(20F);
      submitButton.setFont(styledAndSized);
      submitButton.setEnabled(false);
      submitButton.setPreferredSize(new Dimension(200, 50));

      p2 = new JRadioButton("2");
      styledAndSized = font.deriveFont(20F);
      p2.setFont(styledAndSized);
      p2.addActionListener(
          new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent ae) {
              selection = 2;
              submitButton.setEnabled(true);
            }
          });
      p3 = new JRadioButton("3");
      p3.setFont(styledAndSized);
      p3.addActionListener(
          new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent ae) {
              selection = 3;
              submitButton.setEnabled(true);
            }
          });
      p4 = new JRadioButton("4");
      p4.setFont(styledAndSized);
      p4.addActionListener(
          new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent ae) {
              selection = 4;
              submitButton.setEnabled(true);
            }
          });

      bg = new ButtonGroup();
      buttonPanel = new JPanel();

    } catch (FileNotFoundException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (FontFormatException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
  // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
  private void initComponents() {
    final javax.swing.ButtonGroup acceptOrDeclineButtonGroup = new javax.swing.ButtonGroup();
    final javax.swing.JLabel explanationJLabel = new javax.swing.JLabel();

    setOpaque(false);
    explanationJLabel.setFont(Fonts.DialogFont);
    explanationJLabel.setText(
        java.util.ResourceBundle.getBundle("localization/Browser_Messages")
            .getString("UpgradeAccountAvatar.Agreement.Explanation"));

    licenseAgreementJTextArea.setColumns(20);
    licenseAgreementJTextArea.setEditable(false);
    licenseAgreementJTextArea.setFont(Fonts.DialogTextEntryFont);
    licenseAgreementJTextArea.setRows(5);
    licenseAgreementJTextArea.setTabSize(4);
    licenseAgreementJTextArea.setFocusable(false);
    licenseAgreementJScrollPane.setViewportView(licenseAgreementJTextArea);

    acceptOrDeclineButtonGroup.add(acceptJRadioButton);
    acceptJRadioButton.setFont(Fonts.DialogFont);
    acceptJRadioButton.setText(
        java.util.ResourceBundle.getBundle("localization/Browser_Messages")
            .getString("UpgradeAccountAvatar.Agreement.AcceptLicenseAgreement"));
    acceptJRadioButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    acceptJRadioButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
    acceptJRadioButton.setOpaque(false);
    acceptJRadioButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            acceptJRadioButtonActionPerformed(evt);
          }
        });

    acceptOrDeclineButtonGroup.add(declineJRadioButton);
    declineJRadioButton.setFont(Fonts.DialogFont);
    declineJRadioButton.setText(
        java.util.ResourceBundle.getBundle("localization/Browser_Messages")
            .getString("UpgradeAccountAvatar.Agreement.DeclineLicenseAgreement"));
    declineJRadioButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    declineJRadioButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
    declineJRadioButton.setOpaque(false);
    declineJRadioButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            declineJRadioButtonActionPerformed(evt);
          }
        });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                licenseAgreementJScrollPane,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                455,
                                Short.MAX_VALUE)
                            .addComponent(explanationJLabel)
                            .addComponent(acceptJRadioButton)
                            .addComponent(declineJRadioButton))
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGap(100, 100, 100)
                    .addComponent(explanationJLabel)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        licenseAgreementJScrollPane,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        214,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(19, 19, 19)
                    .addComponent(acceptJRadioButton)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(declineJRadioButton)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
  } // </editor-fold>//GEN-END:initComponents
  public static void main(String args[]) {
    JRadioButton rb = new JRadioButton();
    rb.getAccessibleContext();
    rb.isFocusTraversable();
    rb.setEnabled(false);
    rb.setEnabled(true);
    rb.requestFocus();
    rb.requestFocusInWindow();
    rb.getPreferredSize();
    rb.getMaximumSize();
    rb.getMinimumSize();
    rb.contains(1, 2);
    Component c1 = rb.add(new Component() {});
    Component c2 = rb.add(new Component() {});
    Component c3 = rb.add(new Component() {});
    Insets ins = rb.getInsets();
    rb.getAlignmentY();
    rb.getAlignmentX();
    rb.getGraphics();
    rb.setVisible(false);
    rb.setVisible(true);
    rb.setForeground(Color.red);
    rb.setBackground(Color.red);
    for (String font : Toolkit.getDefaultToolkit().getFontList()) {
      for (int j = 8; j < 17; j++) {
        Font f1 = new Font(font, Font.PLAIN, j);
        Font f2 = new Font(font, Font.BOLD, j);
        Font f3 = new Font(font, Font.ITALIC, j);
        Font f4 = new Font(font, Font.BOLD | Font.ITALIC, j);

        rb.setFont(f1);
        rb.setFont(f2);
        rb.setFont(f3);
        rb.setFont(f4);

        rb.getFontMetrics(f1);
        rb.getFontMetrics(f2);
        rb.getFontMetrics(f3);
        rb.getFontMetrics(f4);
      }
    }
    rb.enable();
    rb.disable();
    rb.reshape(10, 10, 10, 10);
    rb.getBounds(new Rectangle(1, 1, 1, 1));
    rb.getSize(new Dimension(1, 2));
    rb.getLocation(new Point(1, 2));
    rb.getX();
    rb.getY();
    rb.getWidth();
    rb.getHeight();
    rb.isOpaque();
    rb.isValidateRoot();
    rb.isOptimizedDrawingEnabled();
    rb.isDoubleBuffered();
    rb.getComponentCount();
    rb.countComponents();
    rb.getComponent(1);
    rb.getComponent(2);
    Component[] cs = rb.getComponents();
    rb.getLayout();
    rb.setLayout(new FlowLayout());
    rb.doLayout();
    rb.layout();
    rb.invalidate();
    rb.validate();
    rb.remove(0);
    rb.remove(c2);
    rb.removeAll();
    rb.preferredSize();
    rb.minimumSize();
    rb.getComponentAt(1, 2);
    rb.locate(1, 2);
    rb.getComponentAt(new Point(1, 2));
    rb.isFocusCycleRoot(new Container());
    rb.transferFocusBackward();
    rb.setName("goober");
    rb.getName();
    rb.getParent();
    rb.getGraphicsConfiguration();
    rb.getTreeLock();
    rb.getToolkit();
    rb.isValid();
    rb.isDisplayable();
    rb.isVisible();
    rb.isShowing();
    rb.isEnabled();
    rb.enable(false);
    rb.enable(true);
    rb.enableInputMethods(false);
    rb.enableInputMethods(true);
    rb.show();
    rb.show(false);
    rb.show(true);
    rb.hide();
    rb.getForeground();
    rb.isForegroundSet();
    rb.getBackground();
    rb.isBackgroundSet();
    rb.getFont();
    rb.isFontSet();
    Container c = new Container();
    c.add(rb);
    rb.getLocale();
    for (Locale locale : Locale.getAvailableLocales()) rb.setLocale(locale);

    rb.getColorModel();
    rb.getLocation();

    boolean exceptions = false;
    try {
      rb.getLocationOnScreen();
    } catch (IllegalComponentStateException e) {
      exceptions = true;
    }
    if (!exceptions)
      throw new RuntimeException("IllegalComponentStateException did not occur when expected");

    rb.location();
    rb.setLocation(1, 2);
    rb.move(1, 2);
    rb.setLocation(new Point(1, 2));
    rb.getSize();
    rb.size();
    rb.setSize(1, 32);
    rb.resize(1, 32);
    rb.setSize(new Dimension(1, 32));
    rb.resize(new Dimension(1, 32));
    rb.getBounds();
    rb.bounds();
    rb.setBounds(10, 10, 10, 10);
    rb.setBounds(new Rectangle(10, 10, 10, 10));
    rb.isLightweight();
    rb.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));
    rb.getCursor();
    rb.isCursorSet();
    rb.inside(1, 2);
    rb.contains(new Point(1, 2));
    rb.isFocusable();
    rb.setFocusable(true);
    rb.setFocusable(false);
    rb.transferFocus();
    rb.getFocusCycleRootAncestor();
    rb.nextFocus();
    rb.transferFocusUpCycle();
    rb.hasFocus();
    rb.isFocusOwner();
    rb.toString();
    rb.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
    rb.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
    rb.setComponentOrientation(ComponentOrientation.UNKNOWN);
    rb.getComponentOrientation();
  }
示例#7
0
  /** Initialize the contents of the frame. */
  private void initialize() {
    frame = new JFrame();
    frame.getContentPane().setBackground(Color.WHITE);
    frame.setBounds(100, 100, 1024, 768);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().setLayout(null);

    txtUsername = new JTextField();
    txtUsername.setText("username");
    txtUsername.setBounds(716, 11, 86, 20);
    frame.getContentPane().add(txtUsername);
    txtUsername.setColumns(10);

    txtPassword = new JTextField();
    txtPassword.setText("password");
    txtPassword.setBounds(812, 11, 86, 20);
    frame.getContentPane().add(txtPassword);
    txtPassword.setColumns(10);

    JButton btnNewButton = new JButton("Login");
    btnNewButton.addMouseListener(
        new MouseAdapter() {
          @Override
          public void mouseClicked(MouseEvent e) {
            PrivateDashboard privateDashboard = new PrivateDashboard();
            privateDashboard.getFrame().setVisible(true);
          }
        });
    btnNewButton.setBounds(908, 10, 89, 23);
    frame.getContentPane().add(btnNewButton);

    JLabel lblForgotPassword = new JLabel("Forgot Password");
    lblForgotPassword.setForeground(Color.BLUE);
    lblForgotPassword.setBounds(895, 44, 102, 14);
    frame.getContentPane().add(lblForgotPassword);

    JPanel panel_MainChartPanel = new JPanel();
    panel_MainChartPanel.setBorder(new LineBorder(new Color(0, 0, 0)));
    panel_MainChartPanel.setBackground(Color.WHITE);
    panel_MainChartPanel.setBounds(194, 69, 517, 436);
    frame.getContentPane().add(panel_MainChartPanel);
    panel_MainChartPanel.setLayout(null);

    //		JLabel label = new JLabel("");
    //		label.setBounds(0, 0, 67, 57);
    //		label.setIcon(new
    // ImageIcon(PublicDashboard.class.getResource("/ubc/cpsc544/3DBuildingView.png")));
    //		panel_MainChartPanel.add(label);

    BarChart barChart = new BarChart();
    ChartPanel chartPanel = barChart.getChartPanel();
    chartPanel.setVisible(true);
    chartPanel.setBounds(0, 0, 517, 436);
    panel_MainChartPanel.add(chartPanel);

    JPanel panel_Units = new JPanel();
    FlowLayout fl_panel_Units = (FlowLayout) panel_Units.getLayout();
    fl_panel_Units.setAlignment(FlowLayout.LEFT);
    panel_Units.setBorder(new LineBorder(new Color(0, 0, 0)));
    panel_Units.setBackground(Color.WHITE);
    panel_Units.setBounds(10, 364, 174, 141);
    frame.getContentPane().add(panel_Units);

    JLabel lblUnits = new JLabel("Units");
    lblUnits.setFont(new Font("Tahoma", Font.BOLD, 14));
    panel_Units.add(lblUnits);

    JRadioButton radioButton = new JRadioButton("Kilo-Watt Hour kWH");
    radioButton.setFont(new Font("Tahoma", Font.PLAIN, 14));
    radioButton.setBackground(Color.WHITE);
    radioButton.setSelected(true);
    panel_Units.add(radioButton);

    JRadioButton radioButton_1 = new JRadioButton("Ibs of CO2");
    radioButton_1.setEnabled(false);
    radioButton_1.setFont(new Font("Tahoma", Font.PLAIN, 14));
    radioButton_1.setBackground(Color.WHITE);
    panel_Units.add(radioButton_1);

    JRadioButton radioButton_2 = new JRadioButton("Dollar Value");
    radioButton_2.setEnabled(false);
    radioButton_2.setFont(new Font("Tahoma", Font.PLAIN, 14));
    radioButton_2.setBackground(Color.WHITE);
    panel_Units.add(radioButton_2);

    JPanel panel_4 = new JPanel();
    FlowLayout flowLayout_1 = (FlowLayout) panel_4.getLayout();
    flowLayout_1.setAlignment(FlowLayout.LEFT);
    panel_4.setBorder(new LineBorder(new Color(0, 0, 0)));
    panel_4.setBackground(Color.WHITE);
    panel_4.setBounds(10, 521, 701, 185);
    frame.getContentPane().add(panel_4);
    panel_4.setLayout(null);

    JTextPane txtpnFloors = new JTextPane();
    txtpnFloors.setFont(new Font("Tahoma", Font.PLAIN, 14));
    txtpnFloors.setText(
        "St. John\u2019s College is UBC\u2019s international graduate college. A magnet for international and multicultural exchange, the College offers an academic setting that encourages discussion, debate and cultural expression, all enlivened by the participation of resident graduate students who come from diverse cultural backgrounds.");
    txtpnFloors.setBounds(12, 60, 666, 80);
    panel_4.add(txtpnFloors);

    JTextPane txtpnNoFloors = new JTextPane();
    txtpnNoFloors.setFont(new Font("Helvetica", Font.PLAIN, 15));
    txtpnNoFloors.setText(
        "NO. FLOORS  \t-  05\nOCCUPANTS  \t-  120\n\nSt. John\u2019s College is UBC\u2019s international graduate college. A magnet for international\n and multicultural exchange, the College offers an academic setting that encourages \ndiscussion, debate and cultural expression, all enlivened by the participation of \nresident graduate students who come from diverse cultural backgrounds.");
    panel_4.add(txtpnNoFloors);

    JTextPane txtpnFloorsOccupants = new JTextPane();
    txtpnFloorsOccupants.setFont(new Font("Dialog", Font.PLAIN, 15));
    txtpnFloorsOccupants.setText("Floors:  05\r\nOccupants:  120\r");
    txtpnFloorsOccupants.setBounds(12, 12, 280, 51);
    panel_4.add(txtpnFloorsOccupants);

    JPanel panel_5 = new JPanel();
    panel_5.setBorder(new LineBorder(new Color(0, 0, 0)));
    panel_5.setBackground(Color.WHITE);
    panel_5.setBounds(721, 521, 276, 185);
    frame.getContentPane().add(panel_5);

    JLabel label_1 = new JLabel("");
    label_1.setIcon(new ImageIcon(PublicDashboard.class.getResource("/ubc/cpsc544/weather.png")));
    panel_5.add(label_1);

    JLabel lblBulbIcon = new JLabel("");
    lblBulbIcon.setIcon(new ImageIcon(PublicDashboard.class.getResource("/ubc/cpsc544/bulb.png")));
    lblBulbIcon.setBounds(12, 11, 35, 33);
    frame.getContentPane().add(lblBulbIcon);

    JLabel lblUbcEnergyDashboard = new JLabel("UBC Energy Dashboard");
    lblUbcEnergyDashboard.setForeground(new Color(0, 128, 0));
    lblUbcEnergyDashboard.setFont(new Font("Tahoma", Font.BOLD, 18));
    lblUbcEnergyDashboard.setBorder(null);
    lblUbcEnergyDashboard.setBounds(49, 15, 229, 29);
    frame.getContentPane().add(lblUbcEnergyDashboard);

    JPanel panel = new JPanel();
    panel.setBounds(10, 69, 174, 284);
    frame.getContentPane().add(panel);
    panel.setBackground(Color.WHITE);
    panel.setBorder(new LineBorder(new Color(0, 0, 0)));
    panel.setLayout(null);

    JLabel lblCumulative = new JLabel("Cumulative");
    lblCumulative.setBounds(10, 5, 89, 26);
    lblCumulative.setFont(new Font("Tahoma", Font.BOLD, 14));
    lblCumulative.setBorder(null);
    panel.add(lblCumulative);

    JLabel lblK = new JLabel("176,000 kWH");
    lblK.setIcon(new ImageIcon(PublicDashboard.class.getResource("/ubc/cpsc544/Electricity.jpg")));
    lblK.setFont(new Font("Tahoma", Font.BOLD, 17));
    lblK.setBorder(null);
    lblK.setBounds(10, 32, 144, 31);
    panel.add(lblK);

    JLabel lblCo = new JLabel("20,735 CO2");
    lblCo.setIcon(new ImageIcon(PublicDashboard.class.getResource("/ubc/cpsc544/COs.jpg")));
    lblCo.setFont(new Font("Tahoma", Font.PLAIN, 14));
    lblCo.setBorder(null);
    lblCo.setBounds(10, 67, 144, 31);
    panel.add(lblCo);

    JLabel label_2 = new JLabel("3,601.25");
    label_2.setIcon(
        new ImageIcon(PublicDashboard.class.getResource("/ubc/cpsc544/Dollar_Symbol.gif")));
    label_2.setFont(new Font("Tahoma", Font.PLAIN, 14));
    label_2.setBorder(null);
    label_2.setBounds(10, 97, 144, 31);
    panel.add(label_2);

    JLabel lblLastMonth = new JLabel("Last month");
    lblLastMonth.setFont(new Font("Tahoma", Font.PLAIN, 14));
    lblLastMonth.setBorder(null);
    lblLastMonth.setBounds(10, 139, 89, 26);
    panel.add(lblLastMonth);

    JLabel lblKwh = new JLabel("166,500 kWH");
    lblKwh.setIcon(
        new ImageIcon(PublicDashboard.class.getResource("/ubc/cpsc544/Electricity.jpg")));
    lblKwh.setFont(new Font("Tahoma", Font.BOLD, 17));
    lblKwh.setBorder(null);
    lblKwh.setBounds(10, 176, 144, 31);
    panel.add(lblKwh);

    JLabel label_4 = new JLabel("5.4%");
    label_4.setForeground(new Color(0, 204, 0));
    label_4.setIcon(new ImageIcon(PublicDashboard.class.getResource("/ubc/cpsc544/DownArrow.png")));
    label_4.setFont(new Font("Tahoma", Font.BOLD, 21));
    label_4.setBorder(null);
    label_4.setBounds(10, 224, 144, 31);
    panel.add(label_4);

    JSeparator separator = new JSeparator();
    separator.setBounds(10, 133, 152, 2);
    panel.add(separator);

    JPanel panel_2 = new JPanel();
    panel_2.setBorder(new LineBorder(new Color(0, 0, 0)));
    panel_2.setBackground(Color.WHITE);
    panel_2.setBounds(723, 71, 274, 434);
    frame.getContentPane().add(panel_2);
    panel_2.setLayout(null);

    JTextPane txtpnIdeas = new JTextPane();
    txtpnIdeas.setBounds(12, 55, 259, 339);
    panel_2.add(txtpnIdeas);
    txtpnIdeas.setEditable(false);
    txtpnIdeas.setFont(new Font("Tahoma", Font.PLAIN, 15));
    txtpnIdeas.setBorder(null);
    txtpnIdeas.setMargin(new Insets(30, 30, 30, 30));
    txtpnIdeas.setText(
        "1. Lower your thermostat by 4 - 5 degrees Celsius (7 - 9 degrees Fahrenheit) while you're sleeping at night and when no one is at home. \n\n "
            + "2. Switch to cold when doing your laundry. 85 – 90% of the energy used to wash your clothes is used to heat the water. \n\n "
            + "3. Try setting your dishwasher to start after 7:00 p.m. when off-peak prices begin. ");

    JLabel lblTopIdeas = new JLabel("Top Ideas");
    lblTopIdeas.setBounds(12, 13, 112, 29);
    panel_2.add(lblTopIdeas);
    lblTopIdeas.setFont(new Font("Tahoma", Font.BOLD, 14));
    lblTopIdeas.setBorder(null);

    JLabel lblSt = new JLabel("St. John's College, UBC");
    lblSt.setFont(new Font("Dialog", Font.BOLD, 16));
    lblSt.setBounds(519, 40, 192, 22);
    frame.getContentPane().add(lblSt);
  }
  /**
   * Initializes the GUI by creating the components, placing them in the dialog, and displaying
   * them.
   */
  private void init() {
    setForeground(Color.black);

    setTitle("Nonlocal Means Filter");

    JPanel mainPanel;
    mainPanel = new JPanel();
    mainPanel.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
    mainPanel.setLayout(new GridBagLayout());

    GridBagConstraints gbc = new GridBagConstraints();
    gbc.gridwidth = 1;
    gbc.gridheight = 1;
    gbc.anchor = GridBagConstraints.WEST;
    gbc.weightx = 1;
    gbc.insets = new Insets(3, 3, 3, 3);
    gbc.gridx = 0;
    gbc.gridy = 0;
    gbc.fill = GridBagConstraints.HORIZONTAL;

    paramPanel = new JPanel(new GridBagLayout());
    paramPanel.setForeground(Color.black);
    paramPanel.setBorder(buildTitledBorder("Parameters"));
    mainPanel.add(paramPanel, gbc);

    GridBagConstraints gbc2 = new GridBagConstraints();
    gbc2.gridwidth = 1;
    gbc2.gridheight = 1;
    gbc2.anchor = GridBagConstraints.WEST;
    gbc2.weightx = 1;
    gbc2.insets = new Insets(3, 3, 3, 3);
    gbc2.gridx = 0;
    gbc2.gridy = 0;
    gbc2.fill = GridBagConstraints.HORIZONTAL;

    labelSearchWindowSide = createLabel("Search window side (odd)");

    paramPanel.add(labelSearchWindowSide, gbc2);

    gbc2.gridx = 1;
    textSearchWindowSide = createTextField("15");
    paramPanel.add(textSearchWindowSide, gbc2);

    gbc2.gridx = 0;
    gbc2.gridy = 1;
    labelSimilarityWindowSide = createLabel("Similarity window side (odd) ");
    paramPanel.add(labelSimilarityWindowSide, gbc2);

    gbc2.gridx = 1;
    textSimilarityWindowSide = createTextField("7");
    paramPanel.add(textSimilarityWindowSide, gbc2);

    gbc2.gridx = 0;
    gbc2.gridy = 2;
    labelNoiseStandardDeviation = createLabel("Noise standard deviation ");
    paramPanel.add(labelNoiseStandardDeviation, gbc2);

    gbc2.gridx = 1;
    textNoiseStandardDeviation = createTextField("10.0");
    paramPanel.add(textNoiseStandardDeviation, gbc2);

    gbc2.gridx = 0;
    gbc2.gridy = 3;
    labelDegree = createLabel("Degree of filtering ");
    labelDegree.setEnabled(doRician);
    paramPanel.add(labelDegree, gbc2);

    gbc2.gridx = 1;
    textDegree = createTextField("1.414");
    textDegree.setEnabled(doRician);
    paramPanel.add(textDegree, gbc2);

    gbc2.gridx = 0;
    gbc2.gridy = 4;
    doRicianCheckBox = new JCheckBox("Deal with Rician noise in MRI");
    doRicianCheckBox.setFont(serif12);
    doRicianCheckBox.setSelected(false);
    doRicianCheckBox.addActionListener(this);
    paramPanel.add(doRicianCheckBox, gbc2);

    if (image.getNDims() > 2) {
      gbc2.gridx = 0;
      gbc2.gridy = 5;
      gbc2.gridwidth = 2;

      image25DCheckBox = new JCheckBox("Process each slice independently (2.5D)");
      image25DCheckBox.setFont(serif12);
      paramPanel.add(image25DCheckBox, gbc2);
      image25DCheckBox.setSelected(false);
    } // if (image.getNDims > 2)

    JPanel outputOptPanel = new JPanel(new GridLayout(1, 2));
    destinationPanel = new JPanel(new BorderLayout());
    destinationPanel.setForeground(Color.black);
    destinationPanel.setBorder(buildTitledBorder("Destination"));
    outputOptPanel.add(destinationPanel);

    destinationGroup = new ButtonGroup();
    newImage = new JRadioButton("New image", true);
    newImage.setBounds(10, 16, 120, 25);
    newImage.setFont(serif12);
    destinationGroup.add(newImage);
    destinationPanel.add(newImage, BorderLayout.NORTH);

    replaceImage = new JRadioButton("Replace image", false);
    replaceImage.setFont(serif12);
    destinationGroup.add(replaceImage);
    destinationPanel.add(replaceImage, BorderLayout.CENTER);

    // Only if the image is unlocked can it be replaced.
    if (image.getLockStatus() == ModelStorageBase.UNLOCKED) {
      replaceImage.setEnabled(true);
    } else {
      replaceImage.setEnabled(false);
    }

    gbc.gridx = 0;
    gbc.gridy = 1;
    mainPanel.add(outputOptPanel, gbc);

    mainDialogPanel.add(mainPanel, BorderLayout.CENTER);
    mainDialogPanel.add(buildButtons(), BorderLayout.SOUTH);

    getContentPane().add(mainDialogPanel);

    pack();
    setResizable(true);
    // setVisible(true);

    System.gc();
  }
示例#9
0
  public CheckOut() {
    setBorder(new SoftBevelBorder(BevelBorder.RAISED, null, null, null, null));
    setPreferredSize(new Dimension(635, 550));
    setLayout(new BorderLayout(0, 0));

    JPanel panel = new JPanel();
    panel.setBackground(Color.LIGHT_GRAY);
    add(panel);
    panel.setLayout(null);

    JPanel payMethodPanel = new JPanel();
    payMethodPanel.setBorder(new LineBorder(new Color(0, 0, 0)));
    payMethodPanel.setBackground(Color.LIGHT_GRAY);
    payMethodPanel.setBounds(0, 90, 629, 212);
    panel.add(payMethodPanel);
    payMethodPanel.setLayout(null);

    JRadioButton rdbtnCreditCard = new JRadioButton("Credit Card");

    buttonGroup.add(rdbtnCreditCard);
    rdbtnCreditCard.setBackground(Color.LIGHT_GRAY);
    rdbtnCreditCard.setFont(new Font("HelvLight", Font.PLAIN, 14));
    rdbtnCreditCard.setBounds(22, 8, 105, 23);
    payMethodPanel.add(rdbtnCreditCard);

    JRadioButton rdbtnInvoice = new JRadioButton("Invoice");

    buttonGroup.add(rdbtnInvoice);
    rdbtnInvoice.setBackground(Color.LIGHT_GRAY);
    rdbtnInvoice.setFont(new Font("HelvLight", Font.PLAIN, 14));
    rdbtnInvoice.setBounds(22, 35, 105, 23);
    payMethodPanel.add(rdbtnInvoice);

    JRadioButton rdbtnPayAtThe = new JRadioButton("At the door");

    buttonGroup.add(rdbtnPayAtThe);
    rdbtnPayAtThe.setBackground(Color.LIGHT_GRAY);
    rdbtnPayAtThe.setFont(new Font("HelvLight", Font.PLAIN, 14));
    rdbtnPayAtThe.setBounds(22, 62, 105, 23);
    payMethodPanel.add(rdbtnPayAtThe);

    final InvoiceInfo invoiceInfoPnl = new InvoiceInfo();
    final JPanel cardInfoPanel = new JPanel();
    cardInfoPanel.setBorder(null);
    final CardInfo cardInfoPnl = new CardInfo();

    cardInfoPanel.setBackground(Color.LIGHT_GRAY);
    cardInfoPanel.setBounds(264, 8, 353, 186);
    payMethodPanel.add(cardInfoPanel);
    cardInfoPanel.setLayout(null);

    // When Credit card is chosen
    rdbtnCreditCard.addMouseListener(
        new MouseAdapter() {
          @Override
          public void mouseClicked(MouseEvent e) {
            cardInfoPanel.removeAll();
            cardInfoPanel.getParent().revalidate();
            cardInfoPanel.getParent().repaint();

            cardInfoPanel.add(cardInfoPnl);
            cardInfoPanel.getParent().revalidate();
            cardInfoPanel.getParent().repaint();
          }
        });

    // When Invoice is chosen
    rdbtnInvoice.addMouseListener(
        new MouseAdapter() {
          @Override
          public void mouseClicked(MouseEvent e) {
            cardInfoPanel.removeAll();
            cardInfoPanel.getParent().revalidate();
            cardInfoPanel.getParent().repaint();

            cardInfoPanel.add(invoiceInfoPnl);
            cardInfoPanel.getParent().revalidate();
            cardInfoPanel.getParent().repaint();
          }
        });

    // When At the door is chosen
    rdbtnPayAtThe.addMouseListener(
        new MouseAdapter() {
          @Override
          public void mouseClicked(MouseEvent e) {
            cardInfoPanel.removeAll();
            cardInfoPanel.getParent().revalidate();
            cardInfoPanel.getParent().repaint();
          }
        });

    JPanel panel_2 = new JPanel();
    panel_2.setBorder(new LineBorder(new Color(0, 0, 0)));
    panel_2.setBackground(Color.LIGHT_GRAY);
    panel_2.setBounds(0, 0, 629, 37);
    panel.add(panel_2);
    panel_2.setLayout(null);

    JLabel lblCheckOut = new JLabel("Check Out");
    lblCheckOut.setForeground(Color.DARK_GRAY);
    lblCheckOut.setFont(new Font("HelvLight", Font.PLAIN, 18));
    lblCheckOut.setBounds(12, 0, 230, 37);
    panel_2.add(lblCheckOut);

    JPanel panel_3 = new JPanel();
    panel_3.setBorder(new LineBorder(new Color(0, 0, 0)));
    panel_3.setBackground(UIManager.getColor("Button.disabledToolBarBorderBackground"));
    panel_3.setBounds(0, 61, 629, 28);
    panel.add(panel_3);
    panel_3.setLayout(null);

    JLabel lblPayingMethod = new JLabel("Pay Method");
    lblPayingMethod.setBounds(12, 0, 108, 20);
    panel_3.add(lblPayingMethod);
    lblPayingMethod.setForeground(Color.DARK_GRAY);
    lblPayingMethod.setFont(new Font("HelvLight", Font.PLAIN, 14));

    JPanel panel_1 = new JPanel();
    panel_1.setLayout(null);
    panel_1.setBorder(new LineBorder(new Color(0, 0, 0)));
    panel_1.setBackground(UIManager.getColor("Button.disabledToolBarBorderBackground"));
    panel_1.setBounds(0, 303, 629, 28);
    panel.add(panel_1);

    JLabel lblDeliveryInformaiton = new JLabel("Delivery Address");
    lblDeliveryInformaiton.setForeground(Color.DARK_GRAY);
    lblDeliveryInformaiton.setFont(new Font("HelvLight", Font.PLAIN, 14));
    lblDeliveryInformaiton.setBounds(12, 0, 171, 20);
    panel_1.add(lblDeliveryInformaiton);

    JPanel panel_4 = new JPanel();
    panel_4.setLayout(null);
    panel_4.setBorder(new LineBorder(new Color(0, 0, 0)));
    panel_4.setBackground(Color.LIGHT_GRAY);
    panel_4.setBounds(0, 332, 629, 212);
    panel.add(panel_4);

    JPanel panel_5 = new JPanel();
    panel_5.setLayout(null);
    panel_5.setBorder(null);
    panel_5.setBackground(Color.LIGHT_GRAY);
    panel_5.setBounds(12, 12, 110, 145);
    panel_4.add(panel_5);

    JLabel label = new JLabel("Firstname:");
    label.setHorizontalAlignment(SwingConstants.RIGHT);
    label.setForeground(Color.DARK_GRAY);
    label.setFont(new Font("HelvLight", Font.PLAIN, 12));
    label.setBounds(12, 0, 91, 17);
    panel_5.add(label);

    JLabel label_1 = new JLabel("Lastname:");
    label_1.setHorizontalAlignment(SwingConstants.RIGHT);
    label_1.setForeground(Color.DARK_GRAY);
    label_1.setFont(new Font("HelvLight", Font.PLAIN, 12));
    label_1.setBounds(12, 24, 91, 17);
    panel_5.add(label_1);

    JLabel label_2 = new JLabel("Street:");
    label_2.setHorizontalAlignment(SwingConstants.RIGHT);
    label_2.setForeground(Color.DARK_GRAY);
    label_2.setFont(new Font("HelvLight", Font.PLAIN, 12));
    label_2.setBounds(11, 46, 91, 20);
    panel_5.add(label_2);

    JLabel label_3 = new JLabel("Zip and city:");
    label_3.setHorizontalAlignment(SwingConstants.RIGHT);
    label_3.setForeground(Color.DARK_GRAY);
    label_3.setFont(new Font("HelvLight", Font.PLAIN, 12));
    label_3.setBounds(12, 73, 91, 20);
    panel_5.add(label_3);

    JLabel label_4 = new JLabel("Email:");
    label_4.setHorizontalAlignment(SwingConstants.RIGHT);
    label_4.setForeground(Color.DARK_GRAY);
    label_4.setFont(new Font("HelvLight", Font.PLAIN, 12));
    label_4.setBounds(12, 122, 91, 17);
    panel_5.add(label_4);

    JLabel lblDeliveryDate = new JLabel("Delivery date:");
    lblDeliveryDate.setToolTipText("Enter date for delivery ");
    lblDeliveryDate.setHorizontalAlignment(SwingConstants.RIGHT);
    lblDeliveryDate.setForeground(Color.DARK_GRAY);
    lblDeliveryDate.setFont(new Font("HelvLight", Font.PLAIN, 12));
    lblDeliveryDate.setBounds(9, 96, 91, 20);
    panel_5.add(lblDeliveryDate);

    JPanel panel_6 = new JPanel();
    panel_6.setLayout(null);
    panel_6.setBorder(null);
    panel_6.setBackground(Color.LIGHT_GRAY);
    panel_6.setBounds(120, 12, 221, 188);
    panel_4.add(panel_6);

    fNameTextField = new JTextField(iMat.getCustomer().getFirstName());
    fNameTextField.addFocusListener(reg);
    fNameTextField.setName("fNameTextField");
    fNameTextField.setFont(new Font("HelvLight", Font.PLAIN, 12));
    fNameTextField.setColumns(10);
    fNameTextField.setBounds(0, 0, 195, 19);
    panel_6.add(fNameTextField);

    lNameTextField = new JTextField(iMat.getCustomer().getLastName());
    lNameTextField.addFocusListener(reg);
    lNameTextField.setName("lNameTextField");
    lNameTextField.setFont(new Font("HelvLight", Font.PLAIN, 12));
    lNameTextField.setColumns(10);
    lNameTextField.setBounds(0, 26, 195, 19);
    panel_6.add(lNameTextField);

    addressTextField = new JTextField(iMat.getCustomer().getAddress());
    addressTextField.addFocusListener(reg);
    addressTextField.setName("addressTextField");
    addressTextField.setFont(new Font("HelvLight", Font.PLAIN, 12));
    addressTextField.setColumns(10);
    addressTextField.setBounds(0, 50, 195, 19);
    panel_6.add(addressTextField);

    zipTextField = new JTextField(iMat.getCustomer().getPostCode());
    zipTextField.addFocusListener(reg);
    zipTextField.setName("zipTextField");
    zipTextField.setToolTipText("Postnummer");
    zipTextField.setFont(new Font("HelvLight", Font.PLAIN, 12));
    zipTextField.setColumns(10);
    zipTextField.setBounds(0, 75, 54, 19);
    panel_6.add(zipTextField);

    cityTextField = new JTextField(iMat.getCustomer().getPostAddress());
    cityTextField.addFocusListener(reg);
    cityTextField.setName("cityTextField");
    cityTextField.setFont(new Font("HelvLight", Font.PLAIN, 12));
    cityTextField.setColumns(10);
    cityTextField.setBounds(66, 75, 129, 19);
    panel_6.add(cityTextField);

    emailTextField = new JTextField(iMat.getCustomer().getEmail());
    emailTextField.addFocusListener(reg);
    emailTextField.setName("emailTextField");
    emailTextField.setFont(new Font("HelvLight", Font.PLAIN, 12));
    emailTextField.setColumns(10);
    emailTextField.setBounds(2, 123, 195, 19);
    panel_6.add(emailTextField);

    JLabel label_7 = new JLabel("Receipt will be sent to this email");
    label_7.setHorizontalAlignment(SwingConstants.LEFT);
    label_7.setForeground(Color.DARK_GRAY);
    label_7.setFont(new Font("HelvLight", Font.ITALIC, 12));
    label_7.setBounds(3, 142, 195, 17);
    panel_6.add(label_7);

    JLabel label_8 = new JLabel("*");
    label_8.setToolTipText("Mandatory field");
    label_8.setHorizontalAlignment(SwingConstants.LEFT);
    label_8.setForeground(Color.DARK_GRAY);
    label_8.setFont(new Font("HelvLight", Font.PLAIN, 16));
    label_8.setBounds(200, 0, 12, 17);
    panel_6.add(label_8);

    JLabel label_9 = new JLabel("*");
    label_9.setToolTipText("Mandatory field");
    label_9.setHorizontalAlignment(SwingConstants.LEFT);
    label_9.setForeground(Color.DARK_GRAY);
    label_9.setFont(new Font("HelvLight", Font.PLAIN, 16));
    label_9.setBounds(200, 26, 12, 17);
    panel_6.add(label_9);

    JLabel label_10 = new JLabel("*");
    label_10.setToolTipText("Mandatory field");
    label_10.setHorizontalAlignment(SwingConstants.LEFT);
    label_10.setForeground(Color.DARK_GRAY);
    label_10.setFont(new Font("HelvLight", Font.PLAIN, 16));
    label_10.setBounds(200, 50, 12, 17);
    panel_6.add(label_10);

    JLabel label_11 = new JLabel("*");
    label_11.setToolTipText("Mandatory field");
    label_11.setHorizontalAlignment(SwingConstants.LEFT);
    label_11.setForeground(Color.DARK_GRAY);
    label_11.setFont(new Font("HelvLight", Font.PLAIN, 16));
    label_11.setBounds(200, 75, 12, 17);
    panel_6.add(label_11);

    JLabel lblYouAreNot = new JLabel("You are not signed in!");
    lblYouAreNot.setHorizontalTextPosition(SwingConstants.LEFT);
    lblYouAreNot.setHorizontalAlignment(SwingConstants.RIGHT);
    lblYouAreNot.setForeground(Color.DARK_GRAY);
    lblYouAreNot.setFont(new Font("HelvLight", Font.PLAIN, 14));
    lblYouAreNot.setBounds(359, 12, 148, 22);
    panel_4.add(lblYouAreNot);

    final JPanel panel_7 = new JPanel();
    panel_7.setVisible(false);
    panel_7.setBackground(Color.LIGHT_GRAY);
    panel_7.setBorder(null);
    panel_7.setBounds(383, 41, 234, 102);
    panel_4.add(panel_7);
    panel_7.setLayout(null);

    JLabel registerLabel = new JLabel("Register Account");
    registerLabel.addMouseListener(reg);
    registerLabel.setName("registerLabel");
    registerLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    registerLabel.setHorizontalAlignment(SwingConstants.RIGHT);
    registerLabel.setForeground(Color.WHITE);
    registerLabel.setFont(new Font("HelvLight", Font.BOLD, 18));
    registerLabel.setBounds(0, 157, 195, 31);
    panel_6.add(registerLabel);

    JComboBox dayComboBox = new JComboBox();
    dayComboBox.setModel(
        new DefaultComboBoxModel(
            new String[] {
              "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14",
              "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28",
              "29", "30", "31"
            }));
    dayComboBox.addFocusListener(reg);
    dayComboBox.setName("day");
    dayComboBox.setFont(new Font("HelvLight", Font.PLAIN, 12));
    dayComboBox.setBounds(0, 98, 54, 20);
    panel_6.add(dayComboBox);

    JComboBox monthComboBox = new JComboBox();
    monthComboBox.setModel(
        new DefaultComboBoxModel(
            new String[] {"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"}));
    monthComboBox.addFocusListener(reg);
    monthComboBox.setName("month");
    monthComboBox.setFont(new Font("HelvLight", Font.PLAIN, 12));
    monthComboBox.setBounds(66, 98, 54, 20);
    panel_6.add(monthComboBox);

    JComboBox yearComboBox = new JComboBox();
    yearComboBox.setModel(
        new DefaultComboBoxModel(new String[] {"14", "15", "16", "17", "18", "19", "20"}));
    yearComboBox.addFocusListener(reg);
    yearComboBox.setName("year");
    yearComboBox.setFont(new Font("HelvLight", Font.PLAIN, 12));
    yearComboBox.setBounds(132, 98, 63, 20);
    panel_6.add(yearComboBox);

    JLabel label_5 = new JLabel("*");
    label_5.setToolTipText("Mandatory field");
    label_5.setHorizontalAlignment(SwingConstants.LEFT);
    label_5.setForeground(Color.DARK_GRAY);
    label_5.setFont(new Font("HelvLight", Font.PLAIN, 16));
    label_5.setBounds(200, 98, 12, 17);
    panel_6.add(label_5);

    JLabel lblSignIn = new JLabel("Sign in");
    lblSignIn.setName("lblSignIn");
    lblSignIn.addMouseListener(reg);
    lblSignIn.addMouseListener(
        new MouseAdapter() {
          @Override
          public void mouseClicked(MouseEvent e) {
            if (panel_7.isVisible()) {
              panel_7.setVisible(false);
            } else {
              panel_7.setVisible(true);
            }
          }
        });

    lblSignIn.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    lblSignIn.setHorizontalTextPosition(SwingConstants.LEFT);
    lblSignIn.setHorizontalAlignment(SwingConstants.RIGHT);
    lblSignIn.setForeground(Color.WHITE);
    lblSignIn.setFont(new Font("HelvLight", Font.BOLD, 18));
    lblSignIn.setBounds(553, 12, 64, 31);
    panel_4.add(lblSignIn);

    JLabel label_6 = new JLabel("Email:");
    label_6.setHorizontalTextPosition(SwingConstants.RIGHT);
    label_6.setBounds(12, 12, 65, 17);
    label_6.setHorizontalAlignment(SwingConstants.RIGHT);
    label_6.setForeground(Color.DARK_GRAY);
    label_6.setFont(new Font("HelvLight", Font.PLAIN, 14));
    panel_7.add(label_6);

    JLabel lblPassword = new JLabel("Password:"******"HelvLight", Font.PLAIN, 14));
    lblPassword.setBounds(12, 41, 67, 17);
    panel_7.add(lblPassword);

    passwordField = new JPasswordField();
    passwordField.addFocusListener(reg);
    passwordField.setName("passwordField");
    passwordField.setFont(new Font("HelvLight", Font.PLAIN, 14));
    passwordField.setBounds(84, 40, 138, 19);
    panel_7.add(passwordField);

    signEmailTextField = new JTextField();
    signEmailTextField.addFocusListener(reg);
    signEmailTextField.setName("signEmailTextField");
    signEmailTextField.setFont(new Font("HelvLight", Font.PLAIN, 14));
    signEmailTextField.setColumns(10);
    signEmailTextField.setBounds(84, 12, 138, 19);
    panel_7.add(signEmailTextField);

    JButton btnLogIn = new JButton("Sign in");
    btnLogIn.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent arg0) {}
        });
    btnLogIn.addMouseListener(reg);
    btnLogIn.setName("btnLogIn");
    btnLogIn.setForeground(Color.DARK_GRAY);
    btnLogIn.setFont(new Font("HelvLight", Font.PLAIN, 14));
    btnLogIn.setBackground(SystemColor.window);
    btnLogIn.setBounds(144, 71, 78, 27);
    panel_7.add(btnLogIn);

    JButton btnPreview = new JButton("Preview");

    btnPreview.setName("btnPreview");
    btnPreview.addMouseListener(reg);
    btnPreview.setToolTipText("Preview purchase");
    btnPreview.setForeground(Color.DARK_GRAY);
    btnPreview.setFont(new Font("HelvLight", Font.PLAIN, 14));
    btnPreview.setBackground(SystemColor.window);
    btnPreview.setBounds(526, 169, 91, 27);
    panel_4.add(btnPreview);

    JButton button_1 = new JButton("Back");
    button_1.addMouseListener(
        new MouseAdapter() {
          @Override
          public void mouseClicked(MouseEvent e) {
            CardLayout layout = (CardLayout) thisPanel.getParent().getLayout();
            layout.previous(thisPanel.getParent());
          }
        });
    button_1.setToolTipText("Return to shopping cart");
    button_1.setForeground(Color.DARK_GRAY);
    button_1.setFont(new Font("HelvLight", Font.PLAIN, 14));
    button_1.setBackground(SystemColor.window);
    button_1.setBounds(12, 169, 84, 27);
    panel_4.add(button_1);

    JLabel lblCart = new JLabel("Cart");
    lblCart.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    lblCart.setToolTipText("Return to shopping cart");
    lblCart.setForeground(Color.WHITE);
    lblCart.setFont(new Font("HelvLight", Font.BOLD, 14));
    lblCart.setBounds(10, 38, 35, 20);
    panel.add(lblCart);

    JLabel lblCheckOut_1 = new JLabel("> Check out");
    lblCheckOut_1.setBackground(Color.DARK_GRAY);
    lblCheckOut_1.setToolTipText("You are here!");
    lblCheckOut_1.setForeground(Color.DARK_GRAY);
    lblCheckOut_1.setFont(new Font("HelvLight", Font.BOLD, 14));
    lblCheckOut_1.setBounds(47, 38, 96, 20);
    panel.add(lblCheckOut_1);
  }
  private void initComponent() {
    // 最基本按钮
    close = new MyButton(30, 30, Img.CLOSE_0, Img.CLOSE_1, Img.CLOSE_2);
    close.addMouseListener(
        new MouseListener() {
          public void mouseClicked(MouseEvent arg0) {
            System.exit(0);
          }

          public void mouseEntered(MouseEvent arg0) {}

          public void mouseExited(MouseEvent arg0) {}

          public void mousePressed(MouseEvent arg0) {}

          public void mouseReleased(MouseEvent arg0) {}
        });
    min = new MyButton(30, 30, Img.MINI_0, Img.MINI_1, Img.MINI_2);
    min.addMouseListener(
        new MouseListener() {
          public void mouseClicked(MouseEvent arg0) {
            frame.setExtendedState(JFrame.ICONIFIED);
          }

          public void mouseEntered(MouseEvent arg0) {}

          public void mouseExited(MouseEvent arg0) {}

          public void mousePressed(MouseEvent arg0) {}

          public void mouseReleased(MouseEvent arg0) {}
        });
    _return = new MyButton(30, 30, Img.RETURN_0, Img.RETURN_1, Img.RETURN_2);
    _return.addMouseListener(
        new MouseListener() {
          public void mouseClicked(MouseEvent arg0) {
            frame.dispose();
            new MainFrame();
          }

          public void mouseEntered(MouseEvent arg0) {}

          public void mouseExited(MouseEvent arg0) {}

          public void mousePressed(MouseEvent arg0) {}

          public void mouseReleased(MouseEvent arg0) {}
        });
    // 功能按钮
    goto_AccountManage =
        new MyButton(frame.getWidth() / 6, 30, Img.GOZHANGHU_0, Img.GOZHANGHU_1, Img.GOZHANGHU_2);
    goto_AccountManage.addMouseListener(
        new MouseListener() {
          public void mouseClicked(MouseEvent arg0) {
            clear();
            frame.setStated(frame.getState());
            frame.setState(1);
            frame.change();
          }

          public void mouseEntered(MouseEvent arg0) {}

          public void mouseExited(MouseEvent arg0) {}

          public void mousePressed(MouseEvent arg0) {}

          public void mouseReleased(MouseEvent arg0) {}
        });
    goto_CostManage =
        new MyButton(
            frame.getWidth() / 6, 30, Img.GOCHENGBEN_2, Img.GOCHENGBEN_2, Img.GOCHENGBEN_2);
    goto_CostManage.addMouseListener(
        new MouseListener() {
          public void mouseClicked(MouseEvent arg0) {
            clear();
            frame.setStated(frame.getState());
            frame.setState(2);
            frame.change();
          }

          public void mouseEntered(MouseEvent arg0) {}

          public void mouseExited(MouseEvent arg0) {}

          public void mousePressed(MouseEvent arg0) {}

          public void mouseReleased(MouseEvent arg0) {}
        });
    goto_SettlementManage =
        new MyButton(frame.getWidth() / 6, 30, Img.GOJIESUAN_0, Img.GOJIESUAN_1, Img.GOJIESUAN_2);
    goto_SettlementManage.addMouseListener(
        new MouseListener() {
          public void mouseClicked(MouseEvent arg0) {
            clear();
            frame.setStated(frame.getState());
            frame.setState(3);
            frame.change();
          }

          public void mouseEntered(MouseEvent arg0) {}

          public void mouseExited(MouseEvent arg0) {}

          public void mousePressed(MouseEvent arg0) {}

          public void mouseReleased(MouseEvent arg0) {}
        });
    goto_Statistic =
        new MyButton(
            frame.getWidth() / 6,
            30,
            Img.GOTONGJIBAOBIAO_0,
            Img.GOTONGJIBAOBIAO_1,
            Img.GOTONGJIBAOBIAO_2);
    goto_Statistic.addMouseListener(
        new MouseListener() {
          public void mouseClicked(MouseEvent arg0) {
            clear();
            frame.setStated(frame.getState());
            frame.setState(4);
            frame.change();
          }

          public void mouseEntered(MouseEvent arg0) {}

          public void mouseExited(MouseEvent arg0) {}

          public void mousePressed(MouseEvent arg0) {}

          public void mouseReleased(MouseEvent arg0) {}
        });
    goto_BaseDataSetting =
        new MyButton(frame.getWidth() / 6, 30, Img.GOQICHU_0, Img.GOQICHU_1, Img.GOQICHU_2);
    goto_BaseDataSetting.addMouseListener(
        new MouseListener() {
          public void mouseClicked(MouseEvent arg0) {
            clear();
            frame.setStated(frame.getState());
            frame.setState(5);
            frame.change();
          }

          public void mouseEntered(MouseEvent arg0) {}

          public void mouseExited(MouseEvent arg0) {}

          public void mousePressed(MouseEvent arg0) {}

          public void mouseReleased(MouseEvent arg0) {}
        });
    goto_SystemLog =
        new MyButton(frame.getWidth() / 6, 30, Img.GOXITONG_0, Img.GOXITONG_1, Img.GOXITONG_2);
    goto_SystemLog.addMouseListener(
        new MouseListener() {
          public void mouseClicked(MouseEvent arg0) {
            clear();
            frame.setStated(frame.getState());
            frame.setState(6);
            frame.change();
          }

          public void mouseEntered(MouseEvent arg0) {}

          public void mouseExited(MouseEvent arg0) {}

          public void mousePressed(MouseEvent arg0) {}

          public void mouseReleased(MouseEvent arg0) {}
        });
    // 详细操作按钮
    confirm = new MyButton(90, 30, Img.CONFIRM_0, Img.CONFIRM_1, Img.CONFIRM_2);
    confirm.addMouseListener(
        new MouseListener() {
          public void mouseClicked(MouseEvent arg0) {
            _create();
          }

          public void mouseEntered(MouseEvent arg0) {}

          public void mouseExited(MouseEvent arg0) {}

          public void mousePressed(MouseEvent arg0) {}

          public void mouseReleased(MouseEvent arg0) {}
        });

    // 最基本元素
    JLabel titleLabel = new JLabel("物流信息管理系统");
    titleLabel.setSize((int) (50 * 8 * 1.07f), 50);
    titleLabel.setFont(new Font("宋体", Font.BOLD, 50));
    titleLabel.setForeground(Color.BLACK);
    titleLabel.setLocation(596 - (int) (50 * 8 * 1.07f) / 2, 20);

    String func = "成本管理";
    JLabel funLabel = new JLabel(func);
    funLabel.setSize((int) (40 * func.length() * 1.07f), 40);
    funLabel.setFont(new Font("宋体", Font.BOLD, 40));
    funLabel.setLocation(596 - (int) (40 * func.length() * 1.07f) / 2, 128 + 10);

    JLabel currentuserAgencyNameLabel = new JLabel(currentUser.getAgencyName());
    currentuserAgencyNameLabel.setSize(
        (int) (30 * currentUser.getAgencyName().length() * 1.07f), 30);
    currentuserAgencyNameLabel.setFont(new Font("宋体", Font.BOLD, 30));
    currentuserAgencyNameLabel.setForeground(Color.DARK_GRAY);
    currentuserAgencyNameLabel.setLocation(170, 128 - 30);

    String s = "财务人员";
    JLabel currentuserLabel = new JLabel(s);
    currentuserLabel.setSize((int) (30 * s.length() * 1.07f), 30);
    currentuserLabel.setFont(new Font("宋体", Font.BOLD, 30));
    currentuserLabel.setLocation(
        170 + (int) (30 * currentUser.getAgencyName().length() * 1.07f), 128 - 30);

    JLabel currentusernameLabel = new JLabel(currentUser.getname());
    currentusernameLabel.setSize((int) (30 * currentUser.getname().length() * 1.07f), 30);
    currentusernameLabel.setFont(new Font("宋体", Font.BOLD, 30));
    currentusernameLabel.setForeground(Color.DARK_GRAY);
    currentusernameLabel.setLocation(
        170
            + (int) (30 * currentUser.getAgencyName().length() * 1.07f)
            + (int) (30 * s.length() * 1.07f),
        128 - 30);
    // 最基本按钮
    close.setLocation(FinacialStaffHighFrame.w - 30, 0);
    min.setLocation(FinacialStaffHighFrame.w - 80, 0);
    _return.setLocation(20, 50);
    // 功能按钮
    goto_AccountManage.setLocation(0, 150);
    goto_CostManage.setLocation(0, 200);
    goto_SettlementManage.setLocation(0, 250);
    goto_Statistic.setLocation(0, 300);
    goto_BaseDataSetting.setLocation(0, 350);
    goto_SystemLog.setLocation(0, 400);

    // 其他组件
    id = new JLabel("付款单单号:   " + bl.createMoneyOutListId());
    id.setSize((int) (16 * 20 * 1.07f), 16);
    id.setFont(new Font("宋体", Font.BOLD, 15));
    id.setLocation(FinacialStaffHighFrame.w / 6 + 40, 128 + 30);

    JLabel l1 = new JLabel("付款人:");
    l1.setSize((int) (16 * 4 * 1.07f), 16);
    l1.setFont(new Font("宋体", Font.BOLD, 15));
    l1.setLocation(FinacialStaffHighFrame.w / 6 + 40, 128 + 80);
    pay_man = new JTextField();
    pay_man.setSize(150, 20);
    pay_man.setLocation(FinacialStaffHighFrame.w / 6 + 40 + (int) (16 * 5 * 1.07f), 128 + 80 - 3);

    JLabel l2 = new JLabel("付款日期:");
    l2.setSize((int) (16 * 5 * 1.07f), 16);
    l2.setFont(new Font("宋体", Font.BOLD, 15));
    l2.setLocation(FinacialStaffHighFrame.w / 6 + 40, 128 + 80 + 50);
    Date date_ = new Date();
    DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    String time = format.format(date_);
    pay_date = new JTextField(time);
    pay_date.setSize(150, 20);
    pay_date.setLocation(
        FinacialStaffHighFrame.w / 6 + 40 + (int) (16 * 5 * 1.07f), 128 + 80 + 50 - 3);

    JLabel l3 = new JLabel("付款金额:");
    l3.setSize((int) (16 * 5 * 1.07f), 16);
    l3.setFont(new Font("宋体", Font.BOLD, 15));
    l3.setLocation(FinacialStaffHighFrame.w / 6 + 40, 128 + 80 + 100);
    money = new JTextField();
    money.setSize(150, 20);
    money.setLocation(
        FinacialStaffHighFrame.w / 6 + 40 + (int) (16 * 5 * 1.07f), 128 + 80 + 100 - 3);

    JLabel l4 = new JLabel("付款账号:");
    l4.setSize((int) (16 * 5 * 1.07f), 16);
    l4.setFont(new Font("宋体", Font.BOLD, 15));
    l4.setLocation(FinacialStaffHighFrame.w / 6 + 40, 128 + 80 + 150);
    bankcard = new JTextField();
    bankcard.setSize(150, 20);
    bankcard.setLocation(
        FinacialStaffHighFrame.w / 6 + 40 + (int) (16 * 5 * 1.07f), 128 + 80 + 150 - 3);

    JLabel l5 = new JLabel("备注:");
    l5.setSize((int) (16 * 3 * 1.07f), 16);
    l5.setFont(new Font("宋体", Font.BOLD, 15));
    l5.setLocation(FinacialStaffHighFrame.w / 6 + 40, 128 + 80 + 200);
    note = new JTextArea();
    note.setSize(200, 100);
    note.setBorder(BorderFactory.createEtchedBorder());
    note.setLocation(
        FinacialStaffHighFrame.w / 6 + 40 + (int) (16 * 5 * 1.07f), 128 + 80 + 200 - 3);

    JLabel l6 = new JLabel("付款条目:");
    l6.setSize((int) (16 * 5 * 1.07f), 16);
    l6.setFont(new Font("宋体", Font.BOLD, 15));
    l6.setLocation(600, 128 + 80);

    rent = new JRadioButton("租金", true);
    rent.setSize((int) (20 * 3 * 1.07f), 20);
    rent.setFont(new Font("宋体", Font.BOLD, 16));
    rent.setLocation(600 + (int) (16 * 5 * 1.07f), 128 + 80);
    rent.setOpaque(false);

    deli_price = new JRadioButton("运费", false);
    deli_price.setSize((int) (20 * 3 * 1.07f), 20);
    deli_price.setFont(new Font("宋体", Font.BOLD, 16));
    deli_price.setLocation(600 + (int) (16 * 5 * 1.07f), 128 + 80 + 30);
    deli_price.setOpaque(false);

    salary = new JRadioButton("人员工资", false);
    salary.setSize((int) (20 * 5 * 1.07f), 20);
    salary.setFont(new Font("宋体", Font.BOLD, 16));
    salary.setLocation(600 + (int) (16 * 5 * 1.07f), 128 + 80 + 60);
    salary.setOpaque(false);

    reward = new JRadioButton("奖励", false);
    reward.setSize((int) (20 * 3 * 1.07f), 20);
    reward.setFont(new Font("宋体", Font.BOLD, 16));
    reward.setLocation(600 + (int) (16 * 5 * 1.07f), 128 + 80 + 90);
    reward.setOpaque(false);

    buttonGroup = new ButtonGroup();
    buttonGroup.add(rent);
    buttonGroup.add(deli_price);
    buttonGroup.add(salary);
    buttonGroup.add(reward);

    JLabel l7 = new JLabel("新建付款单:");
    l7.setSize((int) (16 * 6 * 1.07f), 16);
    l7.setFont(new Font("宋体", Font.BOLD, 15));
    l7.setLocation(596 - 30 / 2 - (int) (16 * 6 * 1.07f), 600 + 5);
    confirm.setLocation(596 - 30 / 2, 600);

    add(titleLabel);
    add(funLabel);
    add(currentuserAgencyNameLabel);
    add(currentuserLabel);
    add(currentusernameLabel);

    add(close);
    add(min);
    add(_return);
    add(goto_AccountManage);
    add(goto_CostManage);
    add(goto_SettlementManage);
    add(goto_Statistic);
    add(goto_BaseDataSetting);
    add(goto_SystemLog);

    add(id);
    add(l1);
    add(pay_man);
    add(l2);
    add(pay_date);
    add(l3);
    add(money);
    add(l4);
    add(bankcard);
    add(l5);
    add(note);
    add(l6);

    add(rent);
    add(deli_price);
    add(salary);
    add(reward);

    add(l7);
    add(confirm);
  }
 private void initGUI() {
   try {
     TableLayout thisLayout =
         new TableLayout(
             new double[][] {
               {
                 15.0,
                 TableLayout.FILL,
                 TableLayout.FILL,
                 TableLayout.FILL,
                 TableLayout.FILL,
                 TableLayout.FILL,
                 TableLayout.FILL,
                 15.0
               },
               {
                 6.0,
                 35.0,
                 35.0,
                 35.0,
                 35.0,
                 7.0,
                 TableLayout.FILL,
                 TableLayout.FILL,
                 7.0,
                 37.0,
                 7.0
               }
             });
     thisLayout.setHGap(5);
     thisLayout.setVGap(5);
     this.setLayout(thisLayout);
     setPreferredSize(new Dimension(400, 300));
     {
       jLabel1 = new JLabel();
       this.add(jLabel1, "1, 3, r, f");
       jLabel1.setText("CC");
       jLabel1.setFont(new Font("sansserif", Font.PLAIN, 13));
     }
     {
       jLabel2 = new JLabel();
       this.add(jLabel2, "1, 4, r, f");
       jLabel2.setText(Translator.getTranslation("Subject"));
       jLabel2.setFont(new Font("sansserif", Font.PLAIN, 13));
     }
     {
       textPane = new JTextPane();
       this.add(textPane, "1, 6, 6, 7");
       // jTextArea1.setBorder(BorderFactory.createLineBorder(Color.black));
       // pane.setText("<html><body><b>This is a test</b></body></html>");
       textPane.setFont(new Font("sansserif", Font.PLAIN, 16));
     }
     {
       scrollPane = new JScrollPane(textPane);
       this.add(scrollPane, "1, 6, 6, 7");
     }
     {
       jButton1 = new JButton();
       this.add(jButton1, "3, 9");
       jButton1.setText(Translator.getTranslation("Send"));
       jButton1.setUI(new RoundedCornerButtonUI(true, false));
       jButton1.setBackground(Variables.active);
       jButton1.setFont(new Font("sansserif", Font.PLAIN, 13));
       jButton1.setIcon(new ImageIcon("icons/mailsend.png"));
       jButton1.addMouseListener(this);
     }
     {
       jButton2 = new JButton();
       this.add(jButton2, "4, 9");
       jButton2.setText(Translator.getTranslation("Cancel"));
       jButton2.setUI(new RoundedCornerButtonUI(true, false));
       jButton2.setBackground(Variables.active);
       jButton2.setFont(new Font("sansserif", Font.PLAIN, 13));
       jButton2.setIcon(new ImageIcon("icons/cancelmail.png"));
       jButton2.addMouseListener(this);
     }
     {
       jTextField1 = new JTextField();
       this.add(jTextField1, "2, 3, 5, 3");
       jTextField1.setFont(new Font("sansserif", Font.PLAIN, 16));
     }
     {
       jTextField2 = new JTextField();
       this.add(jTextField2, "2, 4, 5, 4");
       jTextField2.setFont(new Font("sansserif", Font.PLAIN, 16));
     }
     {
       jLabel3 = new JLabel();
       this.add(jLabel3, "1, 2, r, f");
       jLabel3.setText(Translator.getTranslation("To"));
       jLabel3.setFont(new Font("sansserif", Font.PLAIN, 13));
     }
     {
       jTextField3 = new JTextField();
       this.add(jTextField3, "2, 2, 5, 2");
       jTextField3.setFont(new Font("sansserif", Font.PLAIN, 16));
     }
     {
       jRadioButton1 = new JRadioButton();
       this.add(jRadioButton1, "3,1,c,f");
       jRadioButton1.setText(Translator.getTranslation("Send To All"));
       jRadioButton1.setBackground(Variables.back);
       jRadioButton1.setFont(new Font("sansserif", Font.PLAIN, 13));
       jRadioButton1.addMouseListener(this);
     }
     {
       jRadioButton2 = new JRadioButton();
       this.add(jRadioButton2, "4,1,c,f");
       jRadioButton2.setText(Translator.getTranslation("Enter Recipient(s)"));
       jRadioButton2.setBackground(Variables.back);
       jRadioButton2.setFont(new Font("sansserif", Font.PLAIN, 13));
       jRadioButton2.addMouseListener(this);
     }
     jRadioButton1.setSelected(true);
     jTextField3.setEditable(false);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
  public ProjectCreateModeStep(final String defaultPath, final WizardContext wizardContext) {
    final StringBuilder buf = new StringBuilder();
    for (WizardMode mode : Extensions.getExtensions(WizardMode.MODES)) {
      if (mode.isAvailable(wizardContext)) {
        myModes.add(mode);
        if (defaultPath != null && wizardContext.isCreatingNewProject()) {
          if (mode instanceof CreateFromSourcesMode) {
            myMode = mode;
          }
        } else if (mode instanceof CreateFromScratchMode) {
          myMode = mode;
        }
      }
      final String footnote = mode.getFootnote(wizardContext);
      if (footnote != null) {
        if (buf.length() > 0) buf.append("<br>");
        buf.append(footnote);
      }
    }

    if (myMode == null) {
      myMode = myModes.get(0);
    }

    myWizardContext = wizardContext;
    myWholePanel = new JPanel(new GridBagLayout());
    myWholePanel.setBorder(BorderFactory.createEtchedBorder());

    final Insets insets = new Insets(0, 0, 0, 5);
    GridBagConstraints gc =
        new GridBagConstraints(
            0,
            GridBagConstraints.RELATIVE,
            1,
            1,
            1,
            0,
            GridBagConstraints.NORTHWEST,
            GridBagConstraints.HORIZONTAL,
            insets,
            0,
            0);
    final ButtonGroup group = new ButtonGroup();
    for (final WizardMode mode : myModes) {
      insets.top = 15;
      insets.left = 5;
      final JRadioButton rb = new JRadioButton(mode.getDisplayName(wizardContext), mode == myMode);
      rb.setFont(UIUtil.getLabelFont().deriveFont(Font.BOLD));
      rb.addActionListener(
          new ActionListener() {
            public void actionPerformed(final ActionEvent e) {
              setMode(mode);
            }
          });
      rb.addMouseListener(
          new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
              if (e.getClickCount() == 2 && e.getButton() == MouseEvent.BUTTON1) {
                wizardContext.requestNextStep();
              }
            }
          });

      myWholePanel.add(rb, gc);
      group.add(rb);
      insets.top = 5;
      insets.left = 20;
      final JLabel description = new JLabel(mode.getDescription(wizardContext));
      myWholePanel.add(description, gc);
      final JComponent settings = mode.getAdditionalSettings(wizardContext);
      if (settings != null) {
        myWholePanel.add(settings, gc);
      }
    }
    myMode.onChosen(true);
    gc.weighty = 1;
    gc.fill = GridBagConstraints.BOTH;
    myWholePanel.add(Box.createVerticalBox(), gc);
    final JLabel note =
        new JLabel(
            "<html>" + buf.toString() + "</html>",
            IconLoader.getIcon("/nodes/warningIntroduction.png"),
            SwingConstants.LEFT);
    note.setVisible(buf.length() > 0);
    gc.weighty = 0;
    gc.fill = GridBagConstraints.HORIZONTAL;
    gc.insets.bottom = 5;
    myWholePanel.add(note, gc);
  }
  public deliverOrderUI(MainUIService main) {
    setLayout(null);
    this.m = main;

    this.setBounds(0, 0, 850, 700);
    this.setBackground(Color.WHITE);

    Font font = new Font("楷体", Font.PLAIN, 18);
    Font font0 = new Font("楷体", Font.BOLD, 20);
    Font f = new Font("仿宋", Font.PLAIN, 14);

    JLabel label = new JLabel("寄件人信息:");
    label.setBounds(5, 10, 150, 30);
    label.setFont(font0);
    this.add(label);

    JLabel label_1 = new JLabel("寄件人姓名");
    label_1.setBounds(20, 55, 100, 30);
    label_1.setFont(font);
    this.add(label_1);

    textField = new JTextField();
    textField.setBounds(120, 55, 100, 30);
    textField.setFont(f);
    this.add(textField);
    textField.setColumns(10);

    JLabel label_2 = new JLabel("住址");
    label_2.setBounds(300, 55, 100, 30);
    label_2.setFont(font);
    this.add(label_2);

    textField_1 = new JTextField();
    textField_1.setBounds(375, 56, 150, 30);
    textField_1.setFont(f);
    this.add(textField_1);
    textField_1.setColumns(10);

    JLabel lblNewLabel = new JLabel("单位");
    lblNewLabel.setBounds(20, 110, 100, 30);
    lblNewLabel.setFont(font);
    this.add(lblNewLabel);

    textField_2 = new JTextField();
    textField_2.setBounds(100, 115, 150, 30);
    textField_2.setFont(f);
    this.add(textField_2);
    textField_2.setColumns(10);

    JLabel label_3 = new JLabel("电话");
    label_3.setBounds(300, 110, 100, 30);
    label_3.setFont(font);
    this.add(label_3);

    textField_3 = new JTextField();
    textField_3.setBounds(375, 115, 150, 30);
    textField_3.setFont(f);
    this.add(textField_3);
    textField_3.setColumns(10);

    JLabel lblNewLabel_1 = new JLabel("手机号");
    lblNewLabel_1.setBounds(550, 115, 100, 30);
    lblNewLabel_1.setFont(font);
    this.add(lblNewLabel_1);

    textField_4 = new JTextField();
    textField_4.setColumns(10);
    textField_4.setBounds(610, 111, 150, 30);
    textField_4.setFont(f);
    this.add(textField_4);

    JLabel label_4 = new JLabel("收件人信息:");
    label_4.setBounds(5, 160, 160, 30);
    label_4.setFont(font0);
    this.add(label_4);

    JLabel label_5 = new JLabel("寄件人姓名");
    label_5.setBounds(20, 205, 100, 30);
    label_5.setFont(font);
    this.add(label_5);

    textField_5 = new JTextField();
    textField_5.setColumns(10);
    textField_5.setBounds(120, 205, 100, 30);
    textField_5.setFont(f);
    this.add(textField_5);

    JLabel label_6 = new JLabel("住址");
    label_6.setBounds(300, 205, 100, 30);
    label_6.setFont(font);
    this.add(label_6);

    JLabel label_7 = new JLabel("单位");
    label_7.setBounds(20, 255, 100, 30);
    label_7.setFont(font);
    this.add(label_7);

    textField_7 = new JTextField();
    textField_7.setColumns(10);
    textField_7.setBounds(100, 255, 150, 30);
    textField_7.setFont(f);
    this.add(textField_7);

    JLabel label_8 = new JLabel("电话");
    label_8.setBounds(300, 255, 100, 30);
    label_8.setFont(font);
    this.add(label_8);

    JLabel label_9 = new JLabel("手机号");
    label_9.setBounds(550, 255, 100, 30);
    label_9.setFont(font);
    this.add(label_9);

    textField_9 = new JTextField();
    textField_9.setColumns(10);
    textField_9.setBounds(610, 255, 150, 30);
    textField_9.setFont(f);
    this.add(textField_9);

    textField_8 = new JTextField();
    textField_8.setColumns(10);
    textField_8.setBounds(375, 255, 150, 30);
    textField_8.setFont(f);
    this.add(textField_8);

    textField_6 = new JTextField();
    textField_6.setColumns(10);
    textField_6.setBounds(375, 205, 150, 30);
    textField_6.setFont(f);
    this.add(textField_6);

    JLabel lblNewLabel_2 = new JLabel("托运货物信息:");
    lblNewLabel_2.setBounds(5, 330, 160, 30);
    lblNewLabel_2.setFont(font0);
    this.add(lblNewLabel_2);

    JLabel label_10 = new JLabel("原件数");
    label_10.setBounds(20, 375, 100, 30);
    label_10.setFont(font);
    this.add(label_10);

    textField_10 = new JTextField();
    textField_10.setColumns(10);
    textField_10.setBounds(100, 375, 70, 30);
    textField_10.setFont(f);
    this.add(textField_10);

    JLabel label_11 = new JLabel("实际重量");
    label_11.setBounds(224, 375, 100, 30);
    label_11.setFont(font);
    this.add(label_11);

    textField_11 = new JTextField();
    textField_11.setColumns(10);
    textField_11.setBounds(300, 375, 70, 30);
    textField_11.setFont(f);
    this.add(textField_11);

    JLabel label_12 = new JLabel("体积");
    label_12.setBounds(425, 375, 100, 30);
    label_12.setFont(font);
    this.add(label_12);

    textField_12 = new JTextField();
    textField_12.setColumns(10);
    textField_12.setBounds(497, 375, 70, 30);
    textField_12.setFont(f);
    this.add(textField_12);

    JLabel label_13 = new JLabel("内件品名");
    label_13.setBounds(612, 375, 100, 30);
    label_13.setFont(font);
    this.add(label_13);

    textField_13 = new JTextField();
    textField_13.setColumns(10);
    textField_13.setBounds(684, 375, 150, 30);
    textField_13.setFont(f);
    this.add(textField_13);

    JLabel label_14 = new JLabel("快递种类");
    label_14.setBounds(5, 440, 100, 30);
    label_14.setFont(font);
    this.add(label_14);

    ButtonGroup bg1 = new ButtonGroup();

    JRadioButton radioButton = new JRadioButton("经济快递");
    radioButton.setBounds(100, 440, 100, 30);
    radioButton.setFont(font);
    bg1.add(radioButton);
    this.add(radioButton);

    JRadioButton radioButton_1 = new JRadioButton("标准快递");
    radioButton_1.setBounds(270, 440, 100, 30);
    radioButton_1.setFont(font);
    bg1.add(radioButton_1);
    this.add(radioButton_1);

    JRadioButton radioButton_2 = new JRadioButton("特快快递");
    radioButton_2.setBounds(440, 440, 100, 30);
    radioButton_2.setFont(font);
    bg1.add(radioButton_2);
    this.add(radioButton_2);

    JLabel label_15 = new JLabel("包装类型");
    label_15.setBounds(5, 500, 100, 30);
    label_15.setFont(font);
    this.add(label_15);

    ButtonGroup bg2 = new ButtonGroup();

    JRadioButton radioButton_3 = new JRadioButton("纸箱");
    radioButton_3.setBounds(100, 500, 100, 30);
    radioButton_3.setFont(font);
    bg2.add(radioButton_3);
    this.add(radioButton_3);

    JRadioButton radioButton_4 = new JRadioButton("木箱");
    radioButton_4.setBounds(270, 500, 100, 30);
    radioButton_4.setFont(font);
    bg2.add(radioButton_4);
    this.add(radioButton_4);

    JRadioButton radioButton_5 = new JRadioButton("快递袋");
    radioButton_5.setBounds(440, 500, 100, 30);
    radioButton_5.setFont(font);
    bg2.add(radioButton_5);
    this.add(radioButton_5);

    JRadioButton radioButton_6 = new JRadioButton("其它");
    radioButton_6.setBounds(610, 500, 100, 30);
    radioButton_6.setFont(font);
    bg2.add(radioButton_6);
    this.add(radioButton_6);

    JLabel label_16 = new JLabel("订单条形码");
    label_16.setBounds(5, 566, 100, 30);
    label_16.setFont(font);
    this.add(label_16);

    textField_14 = new JTextField();
    textField_14.setColumns(10);
    textField_14.setBounds(100, 566, 150, 30);
    textField_14.setFont(f);
    this.add(textField_14);

    JLabel label_17 = new JLabel("费用合计");
    label_17.setBounds(300, 566, 100, 30);
    label_17.setFont(font);
    this.add(label_17);

    textField_15 = new JTextField();
    textField_15.setColumns(10);
    textField_15.setBounds(375, 566, 100, 30);
    textField_15.setFont(f);
    this.add(textField_15);

    button_confirm = new JButton("确定");
    button_confirm.setBounds(250, 615, 100, 30);
    button_confirm.setFont(font);
    button_confirm.addMouseListener(new Listener());
    this.add(button_confirm);

    button_cancel = new JButton("取消");
    button_cancel.setBounds(380, 615, 100, 30);
    button_cancel.setFont(font);
    button_cancel.addMouseListener(new Listener());
    this.add(button_cancel);
  }
示例#14
0
  void initial() {
    JPanel dpanel = new JPanel();
    dpanel.setLayout(new GridLayout(3, 1, 4, 4));

    display = new JLabel(" ", JLabel.RIGHT);
    display.setFont(new Font(DLGFONTNAME, DLGFONTSTYLE, 18));
    display.setForeground(Color.white);
    display.setBackground(Color.black);
    display.setOpaque(true);

    dpanel.add(display);

    ButtonGroup group = new ButtonGroup();
    faxNumButton = new JRadioButton("Fax number", true);
    broadcastButton = new JRadioButton("Group Send", false);
    broadcastButton.setFont(new Font(DLGFONTNAME, DLGFONTSTYLE, 14));
    faxNumButton.setFont(new Font(DLGFONTNAME, DLGFONTSTYLE, 14));
    faxNumButton.addKeyListener(this);
    broadcastButton.addKeyListener(this);
    group.add(faxNumButton);
    group.add(broadcastButton);

    dpanel.add(faxNumButton);
    dpanel.add(broadcastButton);
    dpanel.addKeyListener(this);

    JPanel npanel = new JPanel();
    npanel.setLayout(new GridLayout(4, 3, 4, 4));
    button = new JButton[20];

    for (int i = 0; i < 11; i++) {
      button[i] = new JButton(NBUTTON_NAME[i]);
      button[i].setFont(new Font(DLGFONTNAME, DLGFONTSTYLE, 16));
      //			if ((i % 5) == 3)
      //			if ((i % 5) == 4) button[i].setForeground(Color.red);
      button[i].setFocusPainted(false);
      button[i].addActionListener(this);
      button[i].addKeyListener(this);
      if (NBUTTON_NAME[i].equals(" ")) button[i].setVisible(false);
      npanel.add(button[i]);

      addKeyListener(this);
    }

    Container container = getContentPane();
    container.setLayout(new BorderLayout());
    container.add(dpanel, BorderLayout.NORTH);
    container.add(npanel, BorderLayout.CENTER);

    JPanel cpanel = new JPanel();
    cpanel.setLayout(new GridLayout(3, 1, 4, 4));
    cbutton = new JButton[20];

    for (int i = 0; i < 3; i++) {
      cbutton[i] = new JButton(CBUTTON_NAME[i]);
      cbutton[i].setFont(new Font(DLGFONTNAME, DLGFONTSTYLE, 16));
      cbutton[i].setFocusPainted(false);
      cbutton[i].addActionListener(this);
      cbutton[i].addKeyListener(this);
      cbutton[i].setForeground(Color.blue);
      // if (CBUTTON_NAME[i].equals(" ")) cbutton[i].setVisible(false);
      cpanel.add(cbutton[i]);

      addKeyListener(this);
    }

    faxNumberStr = "0";
    not1stChar = 0;

    container.add(cpanel, BorderLayout.EAST);
    container.addKeyListener(this);
  }
示例#15
0
  /**
   * Overloaded constructor of the class Has all needed GUI to represent itself graphically on the
   * screen
   *
   * @param data as Chess_Data
   * @param bridge as a ConnectionBridge
   */
  public Choose_Icon(Chess_Data data, ConnectionBridge bridge) {
    this.bridge = bridge;
    this.data = data;
    c = this.getContentPane();

    // CREATE AND INITIALIZE THE APPLY BUTTON
    applyButton = new JButton(new ImageIcon(getClass().getResource("Icons/next.gif")));
    applyButton.setBackground(new Color(139, 69, 19));
    applyButton.setPreferredSize(new Dimension(100, 30));
    applyButton.addActionListener(
        new ActionListener() {

          /**
           * The actionPerfomed method of our class
           *
           * @param e ActionEvent object that is generated when button is clicked
           */
          public void actionPerformed(ActionEvent e) {
            if (Choose_Icon.this.data.isGameOnLine()) {
              Choose_Icon.this.sendPlayerIcon();
            }
            Choose_Icon.this.dispose();
          }
        });

    btnGroup = new ButtonGroup();

    pl1Button = new JRadioButton("Player 1");
    pl1Button.setBackground(Color.GRAY);
    pl1Button.setFont(new Font("Verdana", Font.BOLD, 16));

    pl2Button = new JRadioButton("Player 2");
    pl2Button.setBackground(Color.GRAY);
    pl2Button.setFont(new Font("Verdana", Font.BOLD, 16));

    this.showPossiblePlayerIcons();

    btnGroup.add(pl1Button);
    btnGroup.add(pl2Button);

    panel = new JPanel();
    panel.setBackground(Color.GRAY);
    panel.add(pl1Button);
    panel.add(pl2Button);
    panel.add(applyButton);

    this.setModal(true);

    southPanel = new JPanel();
    southPanel.setBackground(Color.GRAY);

    // ADD THE SMILEYS TO THE DIALOG
    for (int i = 1; i < 16; i++) {
      map.put(new Integer(i), new Thumbnail("Icons/hercules" + i + ".gif"));
      southPanel.add(map.get(i));
      map.get(i)
          .addMouseListener(
              new MouseAdapter() {

                /**
                 * The method mousePressed is overwritten in our class
                 *
                 * @param e MouseEvent object that is generated when mouse is clicked
                 */
                @Override
                public void mousePressed(MouseEvent e) {
                  Thumbnail thumbnail = (Thumbnail) e.getSource();
                  Set set = map.entrySet();
                  Iterator it = set.iterator();
                  while (it.hasNext()) {
                    Map.Entry me = (Map.Entry) it.next();
                    if (((Thumbnail) me.getValue()).getBorder() != null) {
                      ((Thumbnail) me.getValue()).setBorder(new LineBorder(Color.GRAY, 5));
                    }
                  }

                  if (pl1Button.isSelected()) {
                    playerIconPath = thumbnail.getImagePath();
                    Choose_Icon.this
                        .data
                        .getPlayers()
                        .get(0)
                        .setImagePath(thumbnail.getImagePath());
                  } else if (pl2Button.isSelected()) {
                    playerIconPath = thumbnail.getImagePath();
                    Choose_Icon.this
                        .data
                        .getPlayers()
                        .get(1)
                        .setImagePath(thumbnail.getImagePath());
                  }
                  Choose_Icon.this.data.setPlayers(Choose_Icon.this.data.getPlayers());
                  thumbnail.setBorder(new LineBorder(Color.GREEN, 5));
                }
              });
    }
    scroll =
        new JScrollPane(
            southPanel,
            JScrollPane.VERTICAL_SCROLLBAR_NEVER,
            JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);

    // ADD COMPONENTS TO THE CONTAINER
    c.add(scroll, BorderLayout.CENTER);
    c.add(panel, BorderLayout.SOUTH);

    // INITIALIZES JFRAMES' PROPERTIES
    this.setTitle("Choose Icon");
    this.setLocation(500, 300);
    this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
    this.setResizable(false);
    this.setSize(600, 200);
    this.setVisible(true);
  }
  public void init() {
    setForeground(Color.black);
    setTitle("DTI Create List File " + " v1.0");

    GridBagLayout gbl = new GridBagLayout();
    GridBagConstraints mainPanelConstraints = new GridBagConstraints();
    JPanel mainPanel = new JPanel(gbl);

    performRegistrationCheckbox = new JCheckBox("Register first");
    performRegistrationCheckbox.setFont(serif12B);
    performRegistrationCheckbox.setSelected(false);
    performRegistrationCheckbox.addActionListener(this);
    performRegistrationCheckbox.setActionCommand("performRegistrationCheckbox");
    performRegistrationCheckbox.setEnabled(false);
    registrationSettingsButton = new JButton("Registration Settings");
    registrationSettingsButton.setFont(serif12B);
    registrationSettingsButton.setEnabled(false);
    registrationSettingsButton.addActionListener(this);
    registrationSettingsButton.setActionCommand("registrationSettingsButton");
    dicomB0VolumeLabel = new JLabel("DICOM B0 volume: ");
    dicomB0VolumeLabel.setFont(serif12B);
    dicomB0VolumeLabel.setEnabled(false);
    dicomB0VolumeTextField = new JTextField(55);
    dicomB0VolumeTextField.setEditable(false);
    dicomB0VolumeTextField.setEnabled(false);
    dicomB0VolumeTextField.setBorder(new LineBorder(Color.gray));
    dicomB0VolumeBrowseButton = new JButton("Browse");
    dicomB0VolumeBrowseButton.setFont(serif12B);
    dicomB0VolumeBrowseButton.addActionListener(this);
    dicomB0VolumeBrowseButton.setActionCommand("dicomB0VolumeBrowse");
    dicomB0VolumeBrowseButton.setEnabled(false);
    JLabel dicomB0InfoLabel = new JLabel("Select the first image slice in the volume");
    dicomB0InfoLabel.setFont(serif12B);
    dicomB0InfoLabel.setEnabled(false);

    JPanel regPanel = new JPanel(gbl);
    regPanel.setBorder(buildTitledBorder("Registration"));
    GridBagConstraints regPanelConstraints = new GridBagConstraints();
    regPanelConstraints.gridx = 0;
    regPanelConstraints.gridy = 0;
    regPanelConstraints.anchor = GridBagConstraints.WEST;
    regPanelConstraints.insets = new Insets(0, 5, 15, 5);
    regPanel.add(performRegistrationCheckbox, regPanelConstraints);
    regPanelConstraints.gridx = 1;
    regPanelConstraints.gridy = 0;
    regPanelConstraints.insets = new Insets(0, 5, 15, 5);
    regPanel.add(registrationSettingsButton, regPanelConstraints);
    regPanelConstraints.gridx = 0;
    regPanelConstraints.gridy = 1;
    regPanelConstraints.insets = new Insets(0, 5, 5, 5);
    regPanel.add(dicomB0VolumeLabel, regPanelConstraints);
    regPanelConstraints.gridx = 1;
    regPanelConstraints.gridy = 1;
    regPanelConstraints.insets = new Insets(0, 5, 5, 5);
    regPanel.add(dicomB0VolumeTextField, regPanelConstraints);
    regPanelConstraints.gridx = 2;
    regPanelConstraints.gridy = 1;
    regPanelConstraints.insets = new Insets(0, 5, 5, 5);
    regPanel.add(dicomB0VolumeBrowseButton, regPanelConstraints);
    regPanelConstraints.gridx = 1;
    regPanelConstraints.gridy = 2;
    regPanelConstraints.gridwidth = 3;
    regPanelConstraints.anchor = GridBagConstraints.CENTER;
    regPanelConstraints.insets = new Insets(0, 5, 15, 5);
    regPanel.add(dicomB0InfoLabel, regPanelConstraints);

    mainPanelConstraints.gridx = 0;
    mainPanelConstraints.gridy = 0;
    mainPanelConstraints.insets = new Insets(15, 5, 5, 0);
    mainPanelConstraints.gridwidth = 1;
    mainPanelConstraints.anchor = GridBagConstraints.WEST;
    dwiLabel = new JLabel(" DWI data : ");
    dwiLabel.setFont(serif12B);
    mainPanel.add(dwiLabel, mainPanelConstraints);

    mainPanelConstraints.gridx = 1;
    mainPanelConstraints.gridy = 0;
    mainPanelConstraints.insets = new Insets(15, 5, 5, 0);
    dwiPathTextField = new JTextField(55);
    dwiPathTextField.setEditable(false);
    // dwiPathTextField.setBackground(Color.white);
    dwiPathTextField.setBorder(new LineBorder(Color.black));
    mainPanel.add(dwiPathTextField, mainPanelConstraints);

    mainPanelConstraints.gridx = 2;
    mainPanelConstraints.gridy = 0;
    mainPanelConstraints.insets = new Insets(15, 5, 5, 5);
    dwiPathBrowseButton = new JButton("Browse");
    dwiPathBrowseButton.setFont(serif12B);
    dwiPathBrowseButton.addActionListener(this);
    dwiPathBrowseButton.setActionCommand("dwiPathBrowse");
    mainPanel.add(dwiPathBrowseButton, mainPanelConstraints);

    // mainPanelConstraints.anchor = GridBagConstraints.CENTER;
    // interleavedCheckbox = new JCheckBox("  interleaved dataset");
    // mainPanelConstraints.gridx = 1;
    // mainPanelConstraints.gridy = 1;
    // mainPanelConstraints.insets = new Insets(0,5,55,5);
    // mainPanel.add(interleavedCheckbox, mainPanelConstraints);

    mainPanelConstraints.anchor = GridBagConstraints.CENTER;
    JLabel dwiDataInfoLabel =
        new JLabel(
            "For DICOM datasets, select the top level study directory.  For Par/Rec datasets, select the .rec file");
    dwiDataInfoLabel.setFont(serif12B);
    dwiDataInfoLabel.setEnabled(false);
    mainPanelConstraints.gridx = 0;
    mainPanelConstraints.gridy = 1;
    mainPanelConstraints.gridwidth = 3;
    mainPanelConstraints.insets = new Insets(0, 5, 70, 5);
    mainPanel.add(dwiDataInfoLabel, mainPanelConstraints);

    mainPanelConstraints.anchor = GridBagConstraints.WEST;
    optionsGroup = new ButtonGroup();

    gradFileRadio = new JRadioButton(" gradient file : ");
    gradFileRadio.setFont(serif12B);
    gradFileRadio.setSelected(true);
    gradFileRadio.addActionListener(this);
    gradFileRadio.setActionCommand("gradFileRadio");
    optionsGroup.add(gradFileRadio);
    mainPanelConstraints.gridx = 0;
    mainPanelConstraints.gridy = 2;
    mainPanelConstraints.gridwidth = 1;
    mainPanelConstraints.insets = new Insets(0, 5, 15, 0);
    mainPanel.add(gradFileRadio, mainPanelConstraints);

    mainPanelConstraints.gridx = 1;
    mainPanelConstraints.gridy = 2;
    mainPanelConstraints.insets = new Insets(0, 5, 15, 0);
    gradientFilePathTextField = new JTextField(55);
    gradientFilePathTextField.setEditable(false);
    gradientFilePathTextField.setBorder(new LineBorder(Color.black));
    // gradientFilePathTextField.setBackground(Color.white);
    mainPanel.add(gradientFilePathTextField, mainPanelConstraints);

    mainPanelConstraints.gridx = 2;
    mainPanelConstraints.gridy = 2;
    mainPanelConstraints.insets = new Insets(0, 5, 15, 5);
    gradientFileBrowseButton = new JButton("Browse");
    gradientFileBrowseButton.setFont(serif12B);
    gradientFileBrowseButton.addActionListener(this);
    gradientFileBrowseButton.setActionCommand("gradientFileBrowse");
    mainPanel.add(gradientFileBrowseButton, mainPanelConstraints);

    bmtxtFileRadio = new JRadioButton(" b-matrix file : ");
    bmtxtFileRadio.setFont(serif12B);
    bmtxtFileRadio.setSelected(false);
    bmtxtFileRadio.addActionListener(this);
    bmtxtFileRadio.setActionCommand("bmtxtFileRadio");
    optionsGroup.add(bmtxtFileRadio);
    mainPanelConstraints.gridx = 0;
    mainPanelConstraints.gridy = 3;
    mainPanelConstraints.insets = new Insets(0, 5, 5, 0);
    mainPanel.add(bmtxtFileRadio, mainPanelConstraints);

    mainPanelConstraints.gridx = 1;
    mainPanelConstraints.gridy = 3;
    mainPanelConstraints.insets = new Insets(0, 5, 5, 0);
    bmtxtFilePathTextField = new JTextField(55);
    bmtxtFilePathTextField.setText("");
    bmtxtFilePathTextField.setEnabled(false);
    bmtxtFilePathTextField.setEditable(false);
    bmtxtFilePathTextField.setBorder(new LineBorder(Color.gray));
    // bmtxtFilePathTextField.setBackground(Color.lightGray);
    mainPanel.add(bmtxtFilePathTextField, mainPanelConstraints);

    mainPanelConstraints.gridx = 2;
    mainPanelConstraints.gridy = 3;
    mainPanelConstraints.insets = new Insets(0, 5, 5, 5);
    bmtxtFileBrowseButton = new JButton("Browse");
    bmtxtFileBrowseButton.setFont(serif12B);
    bmtxtFileBrowseButton.addActionListener(this);
    bmtxtFileBrowseButton.setActionCommand("bmtxtFileBrowse");
    bmtxtFileBrowseButton.setEnabled(false);
    mainPanel.add(bmtxtFileBrowseButton, mainPanelConstraints);

    mainPanelConstraints.anchor = GridBagConstraints.CENTER;
    mainPanelConstraints.gridx = 0;
    mainPanelConstraints.gridy = 4;
    mainPanelConstraints.gridwidth = 3;
    mainPanelConstraints.insets = new Insets(0, 5, 30, 5);
    JLabel parRecInfoLabel =
        new JLabel(
            "Gradient file or b-matrix file must be provided for all DICOM study directories and for versions 4.0 and earlier of Par/Rec");
    parRecInfoLabel.setFont(serif12B);
    parRecInfoLabel.setEnabled(false);
    mainPanel.add(parRecInfoLabel, mainPanelConstraints);

    // mainPanelConstraints.anchor = GridBagConstraints.CENTER;
    // mainPanelConstraints.gridx = 1;
    // mainPanelConstraints.gridy = 4;
    // mainPanelConstraints.insets = new Insets(10,5,5,5);
    // JLabel interleavedLabel = new JLabel("* for interleaved datasets, b-matrix file is
    // required");
    // mainPanel.add(interleavedLabel, mainPanelConstraints);

    mainPanelConstraints.gridx = 0;
    mainPanelConstraints.gridy = 5;
    mainPanelConstraints.insets = new Insets(15, 5, 15, 0);
    mainPanelConstraints.gridwidth = 3;
    mainPanelConstraints.anchor = GridBagConstraints.CENTER;
    mainPanel.add(regPanel, mainPanelConstraints);

    mainPanelConstraints.gridx = 0;
    mainPanelConstraints.gridy = 6;
    mainPanelConstraints.gridwidth = 3;
    mainPanelConstraints.insets = new Insets(15, 5, 15, 5);
    outputTextArea = new JTextArea(15, 70);
    outputTextArea.setEditable(false);
    outputTextArea.setBackground(Color.lightGray);
    outputTextArea.setBorder(new LineBorder(Color.black));
    outputTextArea.setForeground(Color.black);
    scrollPane =
        new JScrollPane(
            outputTextArea,
            ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
            ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    mainPanel.add(scrollPane, mainPanelConstraints);

    mainPanelConstraints.gridx = 0;
    mainPanelConstraints.gridy = 7;
    mainPanelConstraints.gridwidth = 3;
    mainPanelConstraints.insets = new Insets(15, 5, 15, 5);
    JLabel refLabel =
        new JLabel(
            "Developed in concert with Dr. Lin-Ching Chang D.Sc.,  Dr. Carlo Pierpaoli MD Ph.D.,  and Lindsay Walker MS from the NIH/NICHD/LIMB/STBB group");
    refLabel.setFont(serif12B);
    mainPanel.add(refLabel, mainPanelConstraints);

    JPanel OKCancelPanel = new JPanel();
    buildOKButton();
    OKButton.setActionCommand("ok");
    OKButton.setFont(serif12B);
    OKCancelPanel.add(OKButton);
    buildCancelButton();
    cancelButton.setActionCommand("cancel");
    cancelButton.setFont(serif12B);
    OKCancelPanel.add(cancelButton);
    buildHelpButton();
    helpButton.setActionCommand("help");
    helpButton.setFont(serif12B);
    OKCancelPanel.add(helpButton);

    getContentPane().add(mainPanel, BorderLayout.CENTER);
    getContentPane().add(OKCancelPanel, BorderLayout.SOUTH);

    pack();
    setResizable(false);
    setVisible(true);
  }
示例#17
0
  public createPetGUI(Customer aCustomer) {

    setBounds(100, 100, 300, 495);
    contentPane = new JPanel();
    contentPane.setBackground(UIManager.getColor("menu")); // Background colour
    contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
    setContentPane(contentPane);
    contentPane.setLayout(null);

    JLabel lblNewLabel = new JLabel("Create New Pet");
    lblNewLabel.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 14));
    lblNewLabel.setBounds(92, 11, 226, 19);
    contentPane.add(lblNewLabel);

    JLabel lblSpecies = new JLabel("Species*:");
    lblSpecies.setFont(new Font("Tahoma", Font.PLAIN, 11));
    lblSpecies.setBounds(10, 89, 67, 19);
    contentPane.add(lblSpecies);

    speciesField = new JTextField();
    speciesField.setBounds(132, 89, 118, 17);
    contentPane.add(speciesField);
    speciesField.setColumns(10);

    JLabel lblName = new JLabel("Name*:");
    lblName.setFont(new Font("Tahoma", Font.PLAIN, 11));
    lblName.setBounds(10, 150, 77, 14);
    contentPane.add(lblName);

    nameField = new JTextField();
    nameField.setBounds(132, 149, 118, 15);
    contentPane.add(nameField);
    nameField.setColumns(10);

    JLabel lblGender = new JLabel("Gender*:");
    lblGender.setFont(new Font("Tahoma", Font.PLAIN, 11));
    lblGender.setBounds(10, 198, 67, 14);
    contentPane.add(lblGender);

    JRadioButton rdbtnMale = new JRadioButton("Male");
    rdbtnMale.setFont(new Font("Tahoma", Font.PLAIN, 11));
    rdbtnMale.setBounds(130, 194, 67, 23);
    contentPane.add(rdbtnMale);

    JRadioButton rdbtnFemale = new JRadioButton("Female");
    rdbtnFemale.setFont(new Font("Tahoma", Font.PLAIN, 11));
    rdbtnFemale.setBounds(199, 194, 119, 23);
    contentPane.add(rdbtnFemale);

    JLabel lblDateOfBirth = new JLabel("Date Of Birth:");
    lblDateOfBirth.setFont(new Font("Tahoma", Font.PLAIN, 11));
    lblDateOfBirth.setBounds(10, 240, 67, 14);
    contentPane.add(lblDateOfBirth);

    birthDateField = new JTextField();
    birthDateField.setText("DD");
    birthDateField.setBounds(118, 237, 25, 20);
    contentPane.add(birthDateField);
    birthDateField.setColumns(10);

    JLabel label = new JLabel("/");
    label.setBounds(144, 240, 10, 14);
    contentPane.add(label);

    birthMonthField = new JTextField();
    birthMonthField.setText("MM");
    birthMonthField.setBounds(153, 237, 25, 20);
    contentPane.add(birthMonthField);
    birthMonthField.setColumns(10);

    JLabel label_1 = new JLabel("/");
    label_1.setBounds(188, 240, 46, 14);
    contentPane.add(label_1);

    birthYearField = new JTextField();
    birthYearField.setText("YYYY");
    birthYearField.setBounds(204, 237, 46, 20);
    contentPane.add(birthYearField);
    birthYearField.setColumns(10);

    JLabel lblFurColour = new JLabel("Fur Colour:");
    lblFurColour.setFont(new Font("Tahoma", Font.PLAIN, 11));
    lblFurColour.setBounds(10, 284, 100, 14);
    contentPane.add(lblFurColour);

    furField = new JTextField();
    furField.setBounds(131, 284, 119, 14);
    contentPane.add(furField);
    furField.setColumns(10);

    JLabel lblSpecialCharacteristics = new JLabel("Special Characteristics:");
    lblSpecialCharacteristics.setFont(new Font("Tahoma", Font.PLAIN, 11));
    lblSpecialCharacteristics.setBounds(10, 330, 176, 14);
    contentPane.add(lblSpecialCharacteristics);

    specialField = new JTextField();
    specialField.setBounds(131, 330, 118, 14);
    contentPane.add(specialField);
    specialField.setColumns(10);

    JLabel lblChipNumber = new JLabel("Chip Number:");
    lblChipNumber.setFont(new Font("Tahoma", Font.PLAIN, 11));
    lblChipNumber.setBounds(10, 381, 114, 19);
    contentPane.add(lblChipNumber);

    chipField = new JTextField();
    chipField.setBounds(132, 380, 118, 17);
    contentPane.add(chipField);
    chipField.setColumns(10);

    btnNewButton.setFont(new Font("Tahoma", Font.PLAIN, 11));
    btnNewButton.setBounds(10, 435, 89, 23);
    contentPane.add(btnNewButton);

    btnCancel.setFont(new Font("Tahoma", Font.PLAIN, 11));
    btnCancel.setBounds(199, 435, 89, 23);
    contentPane.add(btnCancel);

    JSeparator separator = new JSeparator();
    separator.setBounds(10, 53, 419, 2);
    contentPane.add(separator);
    this.setVisible(true);
    this.setResizable(false);
    this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);

    this.aCustomer = aCustomer;
    if (rdbtnMale.isSelected())
      rdbtnFemale.setSelected(false); // Kwdikas gia apofygh tautoxronhs epiloghs male + female

    if (rdbtnFemale.isSelected()) rdbtnMale.setSelected(false);

    btnCancel.addActionListener(new cancelButtonListener());
    btnCancel.addActionListener(new cancelButtonListener());
  }
示例#18
0
  private void setup() {
    setLayout(null);
    this.setSize(1200, 800);
    setBackground(Color.DARK_GRAY);
    list.setFont(new Font("Arial", Font.PLAIN, 24));
    list.setBounds(52, 118, 429, 501);

    selecionado1 = new Label("");
    selecionado1.setForeground(Color.WHITE);
    selecionado1.setFont(new Font("Dialog", Font.PLAIN, 18));
    selecionado1.setBounds(560, 128, 611, 43);
    add(selecionado1);

    PreencheGenero();
    add(list);

    logout = new JButton("Logout");
    logout.setBounds(1074, 673, 97, 25);
    logout.addActionListener(this);
    logout.setVisible(true);
    add(logout);

    autor = new JRadioButton("Autor");
    autor.setForeground(Color.WHITE);
    autor.setFont(new Font("Tahoma", Font.PLAIN, 18));
    autor.setSelected(false);
    autor.setBackground(Color.DARK_GRAY);
    autor.setBounds(52, 56, 127, 25);
    autor.addActionListener(this);
    add(autor);

    titulo = new JRadioButton("Trabalho artístico");
    titulo.setForeground(Color.WHITE);
    titulo.setFont(new Font("Tahoma", Font.PLAIN, 18));
    titulo.setBackground(Color.DARK_GRAY);
    titulo.setSelected(false);
    titulo.setBounds(275, 56, 181, 25);
    titulo.addActionListener(this);
    add(titulo);

    genero = new JRadioButton("Gênero");
    genero.setForeground(Color.WHITE);
    genero.setFont(new Font("Tahoma", Font.PLAIN, 18));
    genero.setBackground(Color.DARK_GRAY);
    genero.setSelected(true);
    genero.setBounds(499, 58, 127, 25);
    genero.addActionListener(this);
    add(genero);

    selecionado2 = new Label("");
    selecionado2.setForeground(Color.WHITE);
    selecionado2.setFont(new Font("Dialog", Font.PLAIN, 18));
    selecionado2.setBounds(560, 197, 611, 43);
    add(selecionado2);

    selecionado3 = new Label("");
    selecionado3.setForeground(Color.WHITE);
    selecionado3.setFont(new Font("Dialog", Font.PLAIN, 18));
    selecionado3.setBounds(560, 268, 611, 55);
    add(selecionado3);

    label = new Label("Selecione um Filtro");
    label.setForeground(Color.WHITE);
    label.setFont(new Font("Dialog", Font.PLAIN, 18));
    label.setBounds(52, 10, 611, 43);
    add(label);

    adicionar = new JButton("Adicionar");
    adicionar.setBounds(956, 673, 97, 25);
    adicionar.addActionListener(this);
    add(adicionar);

    Label logado = new Label("Selecione um Filtro");
    logado.setAlignment(Label.RIGHT);
    logado.setForeground(Color.WHITE);
    logado.setFont(new Font("Dialog", Font.PLAIN, 18));
    logado.setBounds(722, 10, 449, 43);
    logado.setText("Olá, " + Main.user.getNome());
    add(logado);
  }
示例#19
0
  /** Create the frame. */
  public TelaBuscaAnimais(Usuario u) {

    this.usuario = u;
    this.fachada = Fachada.getInstance();
    setTitle("PetBuddy");
    setIconImage(Toolkit.getDefaultToolkit().getImage("Sprites\\sai.png"));
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setBounds(100, 100, 800, 600);
    setResizable(false);
    painel = new JPanel();
    painel.setBorder(new EmptyBorder(5, 5, 5, 5));
    painel.setLayout(null);
    setContentPane(painel);
    this.grupo = new ButtonGroup();

    JLabel textoInsiraOsDados =
        new JLabel("Insira os dados referentes ao tipo de animal que esta procurando");
    textoInsiraOsDados.setFont(new Font("Segoe Script", Font.PLAIN, 17));
    textoInsiraOsDados.setBounds(138, 63, 602, 46);
    painel.add(textoInsiraOsDados);

    JLabel textoRaca = new JLabel("Ra\u00E7a");
    textoRaca.setFont(new Font("Segoe Script", Font.PLAIN, 13));
    textoRaca.setBounds(42, 233, 43, 30);
    painel.add(textoRaca);

    campoRaca = new JTextField();
    campoRaca.setBounds(95, 234, 352, 30);
    painel.add(campoRaca);
    campoRaca.setColumns(10);

    this.radioButtonCachorro = new JRadioButton("Cachorro");
    radioButtonCachorro.setContentAreaFilled(false);
    radioButtonCachorro.setFont(new Font("Segoe Script", Font.PLAIN, 13));
    radioButtonCachorro.setBounds(39, 156, 109, 23);
    radioButtonCachorro.addActionListener(this);
    painel.add(radioButtonCachorro);
    grupo.add(radioButtonCachorro);

    this.radioButtonGato = new JRadioButton("Gato");
    radioButtonGato.setContentAreaFilled(false);
    radioButtonGato.setFont(new Font("Segoe Script", Font.PLAIN, 13));
    radioButtonGato.setBounds(187, 156, 109, 23);
    radioButtonGato.addActionListener(this);
    painel.add(radioButtonGato);
    grupo.add(radioButtonGato);

    this.radioButtonReptil = new JRadioButton("Reptil");
    radioButtonReptil.setContentAreaFilled(false);
    radioButtonReptil.setFont(new Font("Segoe Script", Font.PLAIN, 13));
    radioButtonReptil.setBounds(483, 156, 109, 23);
    radioButtonReptil.addActionListener(this);
    painel.add(radioButtonReptil);
    grupo.add(radioButtonReptil);

    this.radioButtonRoedor = new JRadioButton("Roedor");
    radioButtonRoedor.setContentAreaFilled(false);
    radioButtonRoedor.setFont(new Font("Segoe Script", Font.PLAIN, 13));
    radioButtonRoedor.setBounds(631, 156, 109, 23);
    radioButtonRoedor.addActionListener(this);
    painel.add(radioButtonRoedor);
    grupo.add(radioButtonRoedor);

    this.radioButtonAve = new JRadioButton("Ave");
    radioButtonAve.setContentAreaFilled(false);
    radioButtonAve.setFont(new Font("Segoe Script", Font.PLAIN, 13));
    radioButtonAve.setBounds(335, 156, 109, 23);
    radioButtonAve.addActionListener(this);
    painel.add(radioButtonAve);
    grupo.add(radioButtonAve);

    BufferedImage buttonIcon;
    try {
      buttonIcon = ImageIO.read(new File("Sprites\\buscar.gif"));
      this.botaoBusca = new JButton(new ImageIcon(buttonIcon));
      this.botaoBusca.setBounds(544, 390, 196, 46);
      this.botaoBusca.setBorder(BorderFactory.createEmptyBorder());
      this.botaoBusca.setContentAreaFilled(false);
      botaoBusca.addActionListener(this);
      painel.add(botaoBusca);

      BufferedImage buttonIcon2 = ImageIO.read(new File("Sprites\\voltar.gif"));
      this.botaoVoltar = new JButton(new ImageIcon(buttonIcon2));
      this.botaoVoltar.setBounds(70, 428, 167, 46);
      this.botaoVoltar.setBorder(BorderFactory.createEmptyBorder());
      this.botaoVoltar.setContentAreaFilled(false);
      botaoVoltar.addActionListener(this);
      painel.add(botaoVoltar);

      BufferedImage buttonIcon3 = ImageIO.read(new File("Sprites\\buscar todos.gif"));
      this.botaoBuscarTodos = new JButton(new ImageIcon(buttonIcon3));
      this.botaoBuscarTodos.setBounds(438, 467, 346, 47);
      this.botaoBuscarTodos.setBorder(BorderFactory.createEmptyBorder());
      this.botaoBuscarTodos.setContentAreaFilled(false);
      botaoBuscarTodos.addActionListener(this);
      painel.add(botaoBuscarTodos);
    } catch (IOException e) {
      e.printStackTrace();
    }

    textoBuscarTodos = new JLabel("Buscar todos os animais da esp\u00E9cie selecionada");
    textoBuscarTodos.setFont(new Font("Segoe Script", Font.BOLD, 13));
    textoBuscarTodos.setBounds(419, 442, 352, 14);
    painel.add(textoBuscarTodos);

    textoBuscaPorEspcie = new JLabel("Busca por esp\u00E9cie e ra\u00E7a");
    textoBuscaPorEspcie.setFont(new Font("Segoe Script", Font.BOLD, 13));
    textoBuscaPorEspcie.setBounds(538, 365, 191, 14);
    painel.add(textoBuscaPorEspcie);
    BackgroundImageJFrame();
  }
  /** Create the panel. */
  public GuiPeakCalling() {
    setLayout(null);

    macs14RadioButton = new JRadioButton("macs14");
    macs14RadioButton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            if (macs14RadioButton.isSelected()) {
              macs14Panel.setVisible(true);
              Sicerpanel.setVisible(false);
            }
          }
        });
    macs14RadioButton.setFont(new Font("Dialog", Font.BOLD, 15));
    macs14RadioButton.setHorizontalAlignment(SwingConstants.CENTER);
    macs14RadioButton.setBounds(19, 116, 122, 31);
    add(macs14RadioButton);
    buttonGroup.add(macs14RadioButton);

    sicerRadioButton = new JRadioButton("Sicer");
    sicerRadioButton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            if (sicerRadioButton.isSelected()) {
              Sicerpanel.setVisible(true);
              macs14Panel.setVisible(false);
            }
          }
        });
    sicerRadioButton.setFont(new Font("Dialog", Font.BOLD, 15));
    sicerRadioButton.setBounds(27, 261, 103, 23);
    add(sicerRadioButton);
    buttonGroup.add(sicerRadioButton);

    guiLayeredPanSpeciesVersion = new GuiLayeredPanSpeciesVersion();
    guiLayeredPanSpeciesVersion.setBounds(27, 12, 237, 96);
    add(guiLayeredPanSpeciesVersion);
    JButton saveButton = new JButton("SAVE");
    saveButton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            String outPath = guiFileOpen.saveFileNameAndPath("", "");
            txtSavePath.setText(outPath);
          }
        });
    saveButton.setBounds(276, 25, 118, 25);
    add(saveButton);

    txtSavePath = new JTextField();
    txtSavePath.setBounds(429, 25, 292, 25);
    add(txtSavePath);
    txtSavePath.setColumns(10);

    macs14Panel = new JPanel();
    macs14Panel.setLayout(null);
    macs14Panel.setBounds(37, 157, 684, 96);
    add(macs14Panel);

    txtControlFileMacs = new JTextField();
    txtControlFileMacs.setColumns(10);
    txtControlFileMacs.setBounds(149, 49, 114, 25);
    macs14Panel.add(txtControlFileMacs);

    txtInFileMacs = new JTextField();
    txtInFileMacs.setColumns(10);
    txtInFileMacs.setBounds(149, 12, 114, 25);
    macs14Panel.add(txtInFileMacs);

    JButton controlFilebutton = new JButton("ControlFile");
    controlFilebutton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            txtControlFileMacs.setText(guiFileOpen.openFileName("", ""));
          }
        });
    controlFilebutton.setBounds(12, 49, 93, 25);
    macs14Panel.add(controlFilebutton);

    JButton inFilebutton = new JButton("InFile");
    inFilebutton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            txtInFileMacs.setText(guiFileOpen.openFileName("", ""));
          }
        });
    inFilebutton.setBounds(12, 12, 93, 25);
    macs14Panel.add(inFilebutton);

    mfoldminspinner = new JSpinner();
    mfoldminspinner.setModel(new SpinnerNumberModel(new Integer(2), null, null, new Integer(1)));
    mfoldminspinner.setBounds(403, 13, 69, 23);
    macs14Panel.add(mfoldminspinner);

    mfoldMaxspinner = new JSpinner();
    mfoldMaxspinner.setModel(new SpinnerNumberModel(new Integer(300), null, null, new Integer(1)));
    mfoldMaxspinner.setBounds(584, 13, 69, 23);
    macs14Panel.add(mfoldMaxspinner);

    JLabel pvalueLabel = new JLabel("pvalue");
    pvalueLabel.setBounds(304, 49, 69, 25);
    macs14Panel.add(pvalueLabel);

    JLabel mfoldMaxLabel = new JLabel("mfoldMax");
    mfoldMaxLabel.setBounds(495, 12, 81, 25);
    macs14Panel.add(mfoldMaxLabel);

    JLabel mfoldminLabel = new JLabel("mfoldMin");
    mfoldminLabel.setBounds(304, 12, 81, 25);
    macs14Panel.add(mfoldminLabel);

    JButton mac14startbutton = new JButton("macs14Start");
    mac14startbutton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent arg0) {
            runMacs();
          }
        });
    mac14startbutton.setBounds(521, 42, 132, 38);
    macs14Panel.add(mac14startbutton);

    txtPvalue = new JTextField();
    txtPvalue.setText("0.01");
    txtPvalue.setColumns(10);
    txtPvalue.setBounds(403, 49, 69, 25);
    macs14Panel.add(txtPvalue);

    Sicerpanel = new JPanel();
    Sicerpanel.setBounds(37, 294, 691, 296);
    Sicerpanel.setVisible(false);
    add(Sicerpanel);
    Sicerpanel.setLayout(null);

    cmbSICERtype = new JComboBoxData<PeakCallingSicerType>();
    cmbSICERtype.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent arg0) {
            setComponentVisibleSICER(cmbSICERtype.getSelectedValue());
          }
        });
    cmbSICERtype.setBounds(18, 10, 323, 32);
    Sicerpanel.add(cmbSICERtype);
    cmbSICERtype.setMapItem(PeakCallingSicerType.getMapType());

    sicer_df_rbPanel = new JPanel();
    sicer_df_rbPanel.setBounds(18, 80, 517, 81);
    Sicerpanel.add(sicer_df_rbPanel);
    sicer_df_rbPanel.setLayout(null);

    kobedFilebutton = new JButton("koBedFile");
    kobedFilebutton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            String koBedPathAndFile = guiFileOpen.openFileName("", "");
            txtKobedFileSICER.setText(koBedPathAndFile);
            txtKoPrefixSICER.setText(FileOperate.getFileName(koBedPathAndFile).split("_")[0]);
          }
        });
    kobedFilebutton.setBounds(16, 12, 106, 25);
    sicer_df_rbPanel.add(kobedFilebutton);

    txtKobedFileSICER = new JTextField();
    txtKobedFileSICER.setColumns(10);
    txtKobedFileSICER.setBounds(134, 11, 177, 27);
    sicer_df_rbPanel.add(txtKobedFileSICER);

    KoColFilebutton = new JButton("koColFile");
    KoColFilebutton.setBounds(16, 49, 106, 25);
    sicer_df_rbPanel.add(KoColFilebutton);
    KoColFilebutton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            String koColPathAndFile = guiFileOpen.openFileName("", "");
            txtKoColFileSICER.setText(koColPathAndFile);
          }
        });
    KoColFilebutton.setEnabled(false);

    txtKoColFileSICER = new JTextField();
    txtKoColFileSICER.setBounds(134, 50, 175, 25);
    sicer_df_rbPanel.add(txtKoColFileSICER);
    txtKoColFileSICER.setColumns(10);
    txtKoColFileSICER.setEnabled(false);

    sicer_dfPanel = new JPanel();
    sicer_dfPanel.setLayout(null);
    sicer_dfPanel.setBounds(18, 173, 517, 81);
    Sicerpanel.add(sicer_dfPanel);

    wtBedFilebutton = new JButton("wtBedFile");
    wtBedFilebutton.setBounds(12, 12, 106, 25);
    sicer_dfPanel.add(wtBedFilebutton);
    wtBedFilebutton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            String wtBedPathAndFile = guiFileOpen.openFileName("", "");
            txtWtBedFileSICER.setText(wtBedPathAndFile);
            txtWtPrefixSICER.setText(FileOperate.getFileName(wtBedPathAndFile).split("_")[0]);
          }
        });
    wtBedFilebutton.setEnabled(false);

    txtWtBedFileSICER = new JTextField();
    txtWtBedFileSICER.setBounds(136, 12, 175, 25);
    sicer_dfPanel.add(txtWtBedFileSICER);
    txtWtBedFileSICER.setColumns(10);
    txtWtBedFileSICER.setEditable(false);

    wtcolFilebutton = new JButton("wtColFile");
    wtcolFilebutton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            String wtColPathAndFile = guiFileOpen.openFileName("", "");
            txtWtcolFileSICER.setText(wtColPathAndFile);
          }
        });
    wtcolFilebutton.setBounds(12, 49, 106, 25);
    sicer_dfPanel.add(wtcolFilebutton);

    txtWtcolFileSICER = new JTextField();
    txtWtcolFileSICER.setColumns(10);
    txtWtcolFileSICER.setBounds(136, 49, 175, 25);
    sicer_dfPanel.add(txtWtcolFileSICER);

    JButton sicerStartbutton = new JButton("sicerSTART");
    sicerStartbutton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            runSicer();
          }
        });
    sicerStartbutton.setBounds(547, 80, 129, 174);
    Sicerpanel.add(sicerStartbutton);

    cmbMethyTypeSicer = new JComboBoxData<Integer>();
    cmbMethyTypeSicer.addActionListener(
        new ActionListener() {

          public void actionPerformed(ActionEvent arg0) {
            methylationType = cmbMethyTypeSicer.getSelectedValue();
            if (methylationType == 40) {
              dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
              dialog.setVisible(true);
              System.out.println(dialog.getWindowSize());
              System.out.println(dialog.getGapSize());
            }
          }
        });

    cmbMethyTypeSicer.setMapItem(SicerControl.getMapMethyStr2Int());
    cmbMethyTypeSicer.setBounds(18, 54, 323, 24);
    Sicerpanel.add(cmbMethyTypeSicer);
    kobedFilebutton.setEnabled(true);
    txtKobedFileSICER.setEnabled(true);

    txtKoPrefixSICER = new JTextField();
    txtKoPrefixSICER.setBounds(382, 15, 123, 19);
    sicer_df_rbPanel.add(txtKoPrefixSICER);
    txtKoPrefixSICER.setColumns(10);

    JLabel koPrelabel = new JLabel("koPrefix");
    koPrelabel.setBounds(315, 17, 68, 15);
    sicer_df_rbPanel.add(koPrelabel);
    wtcolFilebutton.setEnabled(false);
    txtWtcolFileSICER.setEnabled(false);

    txtWtPrefixSICER = new JTextField();
    txtWtPrefixSICER.setBounds(386, 15, 119, 19);
    sicer_dfPanel.add(txtWtPrefixSICER);
    txtWtPrefixSICER.setColumns(10);
    txtWtPrefixSICER.setEditable(false);

    wtPrefix = new JLabel("wtPrefix");
    wtPrefix.setBounds(317, 17, 68, 15);
    sicer_dfPanel.add(wtPrefix);
    wtPrefix.setEnabled(false);
  }