Guest User

Untitled

a guest
Nov 22nd, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. list2.addMouseListener(new MouseListener(){
  2. public void mouseClicked(MouseEvent e){
  3. JPanel MousePanel=new JPanel();
  4. JList listp=new JList(PatientDetailArlist.toArray());
  5.  
  6. int index = listp.getSelectedIndex();
  7. System.out.println("Index Selected: " + index);
  8. String sp = (String) listp.getSelectedValue();
  9. System.out.println("Value Selected: " + sp.toString());
  10.  
  11. MousePanel.add(listp);
  12.  
  13.  
  14. tab.add("tab4",MousePanel);
  15. visibleGui();
  16. }
Add Comment
Please, Sign In to add comment