I'm in need of a Jframe code that can add and remove item while the frame is not on or in other words there's another frame open that adds the object into it.
I tried using
    int index=box_task.getSelectedIndex();
    box_task.removeItemAt(index);
but every time I return to that specific frame it revert backs to its original form
