Java question - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Skype & Technology (/forumdisplay.php?fid=9) +---- Forum: Tech Talk (/forumdisplay.php?fid=17) +----- Thread: Java question (/showthread.php?tid=81486) Java question by saralk on 02-06-2008 at 03:46 PM
Hi, code: So when the ok button is pressed, the code in the actionPerformed function will be executed. I can construct a Contact object easily, however I can't figure out how to return it. RE: Java question by foaly on 02-06-2008 at 04:10 PM
I don't really get the problem but can't you do something like code: RE: Java question by saralk on 02-06-2008 at 04:23 PM You can't do that because the code is executed in the actionPerformed function which can't have a return value. RE: Java question by foaly on 02-06-2008 at 04:33 PM where do you need the data to be? RE: Java question by saralk on 02-06-2008 at 04:42 PM Well basically, the way I want it to work is that addContactWindow() will be called from a different class, and then once the user has clicked OK, the class that called it will know what the Contact object that was returned is. RE: Java question by foaly on 02-06-2008 at 04:51 PM
probably better to use JOptionPane.showInputDialog() then... |