• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem with DocumentEvent

 
Mario A. Villamizar
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
How can I get the command string associated with DocumentEvent, like in ActionEvent.getActionCommand()
I've got this code, but i can't make it works

CODE] public OpenAndSaveWindow(final DocumentEvent de, final DotJMainWindow tMainWindow) {
function = de.getActionCommand();
if (function.equals("Open")) {
int returnValue = showOpenDialog(FileChooserDemo.tMainWindow);
if (returnValue == JFileChooser.APPROVE_OPTION)
fileName = getSelectedFile();
//this is where a real application would open the file.
}
else {
}
} [/CODE]
Thanks
 
Mario A. Villamizar
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
problem solve, thanks any way
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!