Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question about modal dialog in AWT 1.1


  • From: Mark@xxxxxxxxxxxxxxxxxxxxxxxx (Mark Thomas)
  • Subject: Question about modal dialog in AWT 1.1
  • Date: Thu, 30 Sep 1999 22:39 +0100 (BST)

Alexandrescu said:

>        It's possible to make in AWT 1.1 an modal dialog like JOptionPane
> from swing. More exactly if supose that the dialog has Yes/ No buttons ,
> when the button "Yes " is pressed the dialog is close and an integer
> value is return in the parent window .

Alexandrescu

Yes, it is easily done. You need to extend Dialog and then use 
AWTEventMulticaster to keep a list of registered ActionListeners to which 
an ActionEvent is dispatched when the button is pressed.  There is an 
excellent example in Chapter 6 of the book 'Java Examples in a Nutshell' 
by David Flanagan from O'Reilly - which is really worth buying (not too 
expensive either)

All the best

Mark Thomas
Highland Consultancy Services Limited
Scotland

---
To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx