M
Matt S
I have searched through various places but can't seem to find a
solution to what should be a simple problem.
I am trying to implement cut / paste / select all commands in a JMenu.
(JDK 1.5)
I have a JFrame with JInternal Frames.
When I try to work out which text component has the focus I get null as
the JMenu now has the focus.
i.e
((JTextComponent)scrollableDesktop.getSelectedFrame().getFocusOwner()).cut();
always throws null pointer exception.
This means I don't know which component to copy cut from or paste to.
There must be a solution to this isn't there?
solution to what should be a simple problem.
I am trying to implement cut / paste / select all commands in a JMenu.
(JDK 1.5)
I have a JFrame with JInternal Frames.
When I try to work out which text component has the focus I get null as
the JMenu now has the focus.
i.e
((JTextComponent)scrollableDesktop.getSelectedFrame().getFocusOwner()).cut();
always throws null pointer exception.
This means I don't know which component to copy cut from or paste to.
There must be a solution to this isn't there?