JTable that copy data from Excel
HI.
I use class which can copy and paste from Excel
http://www.javaworld.com/javaworld/javatips/jw-javatip77_p.html
but i got problem.....
I want to make a popup menu which can use keybord shortcuts CTRL+C to copy and CTRL+V to paste.
How will be look like my popup menu ? I have now idea how to call and use shortcuts, and those that i have written doesn't work:
Here is my popup menu
// popup menu
// import table somewhere in program
publicvoid createPopupMenu(Jtable table){
JMenuItem menuItem;
JPopupMenu popup =new JPopupMenu();
menuItem =new JMenuItem("Copy CTRL+C");
menuItem.setAction(/* here should i use CTRL+C*/);
menuItem.addActionListener(this);
popup.add(menuItem);
menuItem =new JMenuItem("Paste CTRL+V");
menuItem.setAction(/* here should i use CTRL+V*/);
menuItem.addActionListener(this);
popup.add(menuItem);
// listen to the table
MouseListener popupListener =new PopupListener(popup);
table.addMouseListener(popupLitstener)
}

