mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-30 10:12:06 +01:00
added Button to clear "All Packets" Tab
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@12152 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
2150d07435
commit
01a1fb7751
1 changed files with 21 additions and 1 deletions
|
@ -316,7 +316,27 @@ public class EnhancedDebugger implements SmackDebugger {
|
|||
menu.add(menuItem1);
|
||||
// Add listener to the text area so the popup menu can come up.
|
||||
messageTextArea.addMouseListener(new PopupListener(menu));
|
||||
allPane.setBottomComponent(new JScrollPane(messageTextArea));
|
||||
JPanel sublayout = new JPanel(new BorderLayout());
|
||||
sublayout.add(new JScrollPane(messageTextArea), BorderLayout.CENTER);
|
||||
|
||||
JButton clearb = new JButton("Clear All Packets");
|
||||
|
||||
clearb.addActionListener(new AbstractAction() {
|
||||
private static final long serialVersionUID = -8576045822764763613L;
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
for(int i=0; i< messagesTable.getRowCount();i++)
|
||||
{
|
||||
messagesTable.removeRow(i);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
sublayout.add(clearb, BorderLayout.NORTH);
|
||||
allPane.setBottomComponent(sublayout);
|
||||
|
||||
allPane.setDividerLocation(150);
|
||||
|
||||
tabbedPane.add("All Packets", allPane);
|
||||
|
|
Loading…
Reference in a new issue