1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
public class SearchPanel extends JPanel {
private JLabel m_titleLabel = new JLabel();
private JLabel m_seqLabel = new JLabel();
private JTextArea m_seqArea = new JTextArea(5, 5);
public SearchPanel() {
init();
}
public String getSeq() {
return m_seqArea.getText();
}
......
public void init() {
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:400PX:NONE,FILL:DEFAULT:NON");
CellConstraints cc = new CellConstraints();
this.setLayout(formlayout1);
m_titleLabel.setFont(new Font("Times New Roman", Font.BOLD, 20));
m_titleLabel.setText("BLAST");
m_titleLabel.setHorizontalAlignment(JLabel.CENTER);
this.add(m_titleLabel, cc.xy(6, 1));
m_seqLabel.setText("Entrez la séquence de votre protéine :");
this.add(m_seqLabel, cc.xy(6, 3));
m_seqArea.setToolTipText("Numéro d'accession, gi ou séquence au format fasta");
JScrollPane jscrollpane1 = new JScrollPane(m_seqArea, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
jscrollpane1.setViewportView(m_seqArea);
this.add(jscrollpane1, cc.xy(6, 4));
....
}
} |
Partager