// this is done in constructor
fsPanel = new JPanel();
//fsPanel.setLayout(new BorderLayout());
fsPanel.setLayout(new BoxLayout(fsPanel, BoxLayout.PAGE_AXIS));
fsPanel.add(filterPanel,"North");
fsPanel.add(timePanel);
fsPanel.add(searchPanel,"South");
---------------------------------------------------------
public void setPanelEnabled(boolean enabled){
for(int i = 0; i < fsPanel.getComponentCount(); i++){
JPanel compPanel = (JPanel) fsPanel.getComponent(i);
for(int j = 0; j < compPanel.getComponentCount(); j++){
compPanel.getComponent(j).setEnabled(enabled);
}
}
}
Rob Spoor wrote:We first need to know what key code that button is:
Once you know that you can use it in a key stroke; check how key binding works in Java.
As for the actual copying, JTextArea inherits method copy() from JTextComponent. All you need to do is call that.