Search code examples
javaswingjtablejlabelsequence-alignment

Protein Sequence Display


I am trying to display protein sequence alignments in a java application for a college research project. I had the idea to use a JTable with a JLabel in each cell to hold the amino acids in the sequence. I need to be able to change the background color, text color, and have each cell event driven. Is there a better way to do this?


Solution

  • A simple alternative would be to use JTextArea, representing each protein sequence as a line of text, with hyphens for gaps.

    If you go forward with the JTable idea, look at: