Example #1
0
  public TextPanel() {
    this.setSize(750, 80);
    this.setPreferredSize(this.getSize());

    setLayout(null);

    lblFile = new JLabel(Messages.getString("guiFile"));
    lblFile.setBounds(31, 11, 64, 19);
    lblFile.setFont(new Font("Tahoma", Font.BOLD, 15));
    add(lblFile);

    btnBrowse = new JButton(Messages.getString("guiBrowse"));
    btnBrowse.setBounds(476, 38, 100, 23);
    add(btnBrowse);

    lblTextPath = new JLabel(Messages.getString("guiFilePath"));
    lblTextPath.setBounds(31, 42, 64, 14);
    add(lblTextPath);

    tfTextPath = new JTextField();
    tfTextPath.setEditable(false);
    tfTextPath.setBounds(100, 38, 372, 23);
    add(tfTextPath);
    tfTextPath.setColumns(10);

    JSeparator separator = new JSeparator();
    separator.setBounds(195, 78, 359, 1);
    add(separator);

    btnPreview = new JButton(Messages.getString("guiPreview"));
    btnPreview.setBounds(604, 38, 100, 23);
    btnPreview.setEnabled(false);
    add(btnPreview);

    loadFileDialog = new EducryptFileChooser(this);
    loadFileDialog.setTextMode();
  }
  public ConsoleSmallPanel() {
    this.setSize(740, 170);
    this.setPreferredSize(this.getSize());
    setLayout(null);

    JLabel lblConsole = new JLabel(Messages.getString("guiConsole"));
    lblConsole.setFont(new Font("Tahoma", Font.BOLD, 15));
    lblConsole.setBounds(30, 11, 82, 19);
    add(lblConsole);

    JScrollPane scrollPane = new JScrollPane((Component) null);
    scrollPane.setBounds(30, 41, 654, 114);
    add(scrollPane);

    txtLog = new JTextPane();
    txtLog.setEditable(false);
    scrollPane.setViewportView(txtLog);

    ImageIcon saveIcon = new ImageIcon(EduCryptResources.getImageURL("save24.png"));

    btnSaveLog = new JButton(saveIcon);
    btnSaveLog.setBounds(694, 127, 28, 28);
    add(btnSaveLog);

    ImageIcon clearLogIcon = new ImageIcon(EduCryptResources.getImageURL("remove24color.png"));

    btnClearLog = new JButton(clearLogIcon);
    btnClearLog.setBounds(694, 72, 28, 28);
    add(btnClearLog);

    ImageIcon previewIcon = new ImageIcon(EduCryptResources.getImageURL("preview24.png"));

    btnPreview = new JButton(previewIcon);
    btnPreview.setBounds(694, 41, 28, 28);
    add(btnPreview);

    saveFileDialog = new EducryptFileChooser(btnSaveLog);
    saveFileDialog.setTxtMode();
  }