![my interface](https://i.stack.imgur.com/WngHj.jpg)

I have this interface that i am working on to show information about machines connected to my local network. I want to select an ip than click on "Plus dinformation" button to show some information related to this machine. Here is my selection code 

```
 final static JTextArea clien = new JTextArea(20,30);
 clien.setSelectionColor(Color.blue);

 clien.addMouseListener(new java.awt.event.MouseAdapter() {
     public void mouseReleased(java.awt.event.MouseEvent evt) {
        MouseReleased(evt);
     }

    private void MouseReleased(MouseEvent evt) {
        // TODO Auto-generated method stub

         strselection = clien.getSelectedText();
} 

```

When i select an IP and then press the information button, the value contained in `strselection` found is `null` because clicking on that button cancelled the selection. I want that selection to remain active after clicking the button so `strselection` does not become `null`. How can i tweak my selection code to make this possible. I tried but with no luck.