Displaying Messages : MessageBox « SWT « Java Tutorial






Use the MessageBox class for displaying some simple text or asking a question, and receiving one of the following responses:

  1. OK
  2. Yes
  3. No
  4. Cancel
  5. Retry
  6. Abort
  7. Ignore








17.40.MessageBox
17.40.1.Displaying Messages
17.40.2.Displaying a Message Box
17.40.3.The Icon Styles for MessageBox
17.40.4.The Button Styles for MessageBox
17.40.5.A message box with the question icon, Yes/No button, and a simple questionA message box with the question icon, Yes/No button, and a simple question
17.40.6.MessageBox with Error IconMessageBox with Error Icon
17.40.7.MessageBox with Information Icon and OK Cancel ButtonMessageBox with Information Icon and OK Cancel Button
17.40.8.MessageBox with Information IconMessageBox with Information Icon
17.40.9.MessageBox with Question Icon and Yes No ButtonMessageBox with Question Icon and Yes No Button
17.40.10.MessageBox with Warning Icon and Yes No Cancel ButtonMessageBox with Warning Icon and Yes No Cancel Button
17.40.11.MessageBox with Working Icon and Abort Retry and Ignore ButtonMessageBox with Working Icon and Abort Retry and Ignore Button