5, 5)));
treePanel.add(treeScrollPanel);
// The right hand side header area
hTxTArea = new NonWrappingTextPane();
hTxTArea.addKeyListener(this);
hTxTArea.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
// hTxTArea = new NonWrappingTextPane();
hTxTArea.putClientProperty("charset", "UTF-8");
hTxTArea.setEditable(true);
hTxTArea.setVisible(true);
hTxTArea.setFont(new Font("Verdana", Font.PLAIN, 12));
hTxTArea.setMargin(new Insets(1, 1, 1, 1));
hTxTArea.setBackground(Color.WHITE);
hTxTArea.setForeground(Color.BLACK);
// Set the editor kit responsible for highlighting
hTxTArea.setEditorKit(new StyledEditorKit() {
/**
*
*/
private static final long serialVersionUID = -4550261337511448681L;
@Override
public Document createDefaultDocument() {
return new TextHighlighter();
}
});
// Right click: Cut, Copy, Paste, Select All
// popupText(hTxTArea, true, true, true, true);
final JScrollPane hScrollPane = new JScrollPane(hTxTArea);
hScrollPane.setVerticalScrollBarPolicy(20);
hScrollPane.setHorizontalScrollBarPolicy(30);
final JPanel headerPanel = new JPanel(new BorderLayout());
headerPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory
.createTitledBorder(" Header "), BorderFactory
.createEmptyBorder(5, 5, 5, 5)));
headerPanel.add(hScrollPane);
// The right hand side information area
iTxTArea = new NonWrappingTextPane();
iTxTArea.addKeyListener(this);
iTxTArea.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
iTxTArea.setEditable(false);
iTxTArea.setFont(new Font("Verdana", Font.BOLD, 10));
// Right click: Cut, Copy, Paste, Select All
// popupText(iTxTArea, false, true, false, true);
final JScrollPane iScrollPane = new JScrollPane(iTxTArea);
iScrollPane.setVerticalScrollBarPolicy(20);
iScrollPane.setHorizontalScrollBarPolicy(30);
final JPanel infoPanel = new JPanel(new BorderLayout());
infoPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory
.createTitledBorder(" Information "), BorderFactory
.createEmptyBorder(5, 5, 5, 5)));
infoPanel.add(iScrollPane);
// The right hand side comment area
cTxTArea = new NonWrappingTextPane();
cTxTArea.addKeyListener(this);
cTxTArea.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
cTxTArea.setEditable(false);
cTxTArea.setFont(new Font("Verdana", Font.BOLD, 10));
// Right click: Cut, Copy, Paste, Select All