SlideShare uma empresa Scribd logo
1 de 15
Dialog Box




             1
Objective

On completion of this period, you would be
able to know

• Dialog box




                                             2
Recap

In the previous class, you have leant

•Menu bars and menus




                                        3
Dialog Box

• Dialog boxes are primarily used to obtain user
  input
• They are similar to frame windows, except that
  dialog boxes are always child windows of a top-
  level window
• Dialog boxes don’t have menu bars
Dialog Box     contd..


• Dialog boxes may be modal or modeless
• Modal means
  – Focus is always on the current dialog box
Dialog Box        contd..


• Two commonly used
  constructors are shown
  here
   – Dialog(Frame
     parentWindow, boolean
     mode)
   – Dialog(Frame
     parentWindow, String title,
     boolean mode)
   – Here, parentWindow is the
     owner of the dialog box. If
     mode is true, the dialog
     box is modal
   – Otherwise, it is modeless
swings
                Struts
                 jdbc
              hibernate
                home
  java previous question papers
OCT/NOV-2012 QUESTION PAPER
      April / May 2012 c-09
  October/ November-2011 c-09
       April/ May 2011 c-09
       April/ May 2011 c-05




      Home                        7
Methods of Dialog Box

• Commonly used methods
  – void show()
     • Shows the dialog
  – String getTitle()
     • Returns the title of the dialog
  – void setTitle(String title)
     • Sets the dialog title
  – boolean isModal()
     • Checks whether the dialog is modal or not
Methods of Dialog Box           contd..


• void setModal(boolean flag)
  – Sets the current dialog to modal
• boolean isResizable()
  – Returns whether the dialog is resizable
• setResizable(boolean flag)
  – Sets the dialog to be resizable
Example Program
import java.awt.*
import java.awt.event.*;
public class DialogDemoextendfs Frame{
         public DialogDemo{
                    setTitle(“MyDialog”);
                    setSize(250,200);
                    setVisible(true);
                    Dialog myDialog = new Dialog(this,”Dialog”);
                    myDialog.setSize(150,100:
                    myDialog.show();
         }
Example Program                     contd..



    public static void main(String args[]){
              new DialoDemo();
    }
}
Summary

• In this class we have learnt
  – Different constructors of Dialog
  – Methods of Dialog class
  – Example program
Quiz

1. The method useful for setting a dialog to be
    modal
   a) getModal()
   b) setTitle()
   c) setModal()
   d) isModal()
Frequently Asked Questions

1. List and explain the constructors of Dialog class
2. List and explain the methods of dialog class
swings
                Struts
                 jdbc
              hibernate
                home
  java previous question papers
OCT/NOV-2012 QUESTION PAPER
      April / May 2012 c-09
  October/ November-2011 c-09
       April/ May 2011 c-09
       April/ May 2011 c-05




      Home                        15

Mais conteúdo relacionado

Destaque (8)

9 anorexia bulimia (1)
9 anorexia bulimia (1)9 anorexia bulimia (1)
9 anorexia bulimia (1)
 
9 funciones...
9 funciones...9 funciones...
9 funciones...
 
9c21f702517c42b94bbbab1c2dc84adb
9c21f702517c42b94bbbab1c2dc84adb9c21f702517c42b94bbbab1c2dc84adb
9c21f702517c42b94bbbab1c2dc84adb
 
9 Interest Groups
9 Interest Groups9 Interest Groups
9 Interest Groups
 
%9 fุตบอลชั้นพื้นฐาน”
%9 fุตบอลชั้นพื้นฐาน”%9 fุตบอลชั้นพื้นฐาน”
%9 fุตบอลชั้นพื้นฐาน”
 
9º encontro - Turmas A e B
9º encontro - Turmas A e B9º encontro - Turmas A e B
9º encontro - Turmas A e B
 
Outsmarting Diabetes: Presentation to the Metis Settlements, March 2012
Outsmarting Diabetes: Presentation to the Metis Settlements, March 2012Outsmarting Diabetes: Presentation to the Metis Settlements, March 2012
Outsmarting Diabetes: Presentation to the Metis Settlements, March 2012
 
9 cm604.9
9 cm604.99 cm604.9
9 cm604.9
 

Semelhante a 9 cm604.75

Working with frames
Working with framesWorking with frames
Working with frames
myrajendra
 
How to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle coreHow to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle core
Dan Poltawski
 
The programming philosophy of jrql
The programming philosophy of jrqlThe programming philosophy of jrql
The programming philosophy of jrql
msg systems ag
 
Java Programming and J2ME: The Basics
Java Programming and J2ME: The BasicsJava Programming and J2ME: The Basics
Java Programming and J2ME: The Basics
tosine
 

Semelhante a 9 cm604.75 (20)

DSL's with Groovy
DSL's with GroovyDSL's with Groovy
DSL's with Groovy
 
Working with frames
Working with framesWorking with frames
Working with frames
 
How to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle coreHow to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle core
 
Professional Help for PowerShell Modules
Professional Help for PowerShell ModulesProfessional Help for PowerShell Modules
Professional Help for PowerShell Modules
 
Objective-C Is Not Java
Objective-C Is Not JavaObjective-C Is Not Java
Objective-C Is Not Java
 
Migrating to dita_ flacke
Migrating to  dita_ flackeMigrating to  dita_ flacke
Migrating to dita_ flacke
 
A peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk UserA peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk User
 
The programming philosophy of jrql
The programming philosophy of jrqlThe programming philosophy of jrql
The programming philosophy of jrql
 
Java for XPages Development
Java for XPages DevelopmentJava for XPages Development
Java for XPages Development
 
GR8Conf 2009: Practical Groovy DSL by Guillaume Laforge
GR8Conf 2009: Practical Groovy DSL by Guillaume LaforgeGR8Conf 2009: Practical Groovy DSL by Guillaume Laforge
GR8Conf 2009: Practical Groovy DSL by Guillaume Laforge
 
Java Programming and J2ME: The Basics
Java Programming and J2ME: The BasicsJava Programming and J2ME: The Basics
Java Programming and J2ME: The Basics
 
04 inheritance
04 inheritance04 inheritance
04 inheritance
 
The Ring programming language version 1.5.4 book - Part 11 of 185
The Ring programming language version 1.5.4 book - Part 11 of 185The Ring programming language version 1.5.4 book - Part 11 of 185
The Ring programming language version 1.5.4 book - Part 11 of 185
 
Cse java
Cse javaCse java
Cse java
 
inheritance
inheritanceinheritance
inheritance
 
Core java part1
Core java  part1Core java  part1
Core java part1
 
A Notes Developer's Journey into Java
A Notes Developer's Journey into JavaA Notes Developer's Journey into Java
A Notes Developer's Journey into Java
 
Week3 to-design
Week3 to-designWeek3 to-design
Week3 to-design
 
Pi j4.1 packages
Pi j4.1 packagesPi j4.1 packages
Pi j4.1 packages
 
Java EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsJava EE Revisits GoF Design Patterns
Java EE Revisits GoF Design Patterns
 

Mais de myrajendra (20)

Fundamentals
FundamentalsFundamentals
Fundamentals
 
Data type
Data typeData type
Data type
 
Hibernate example1
Hibernate example1Hibernate example1
Hibernate example1
 
Jdbc workflow
Jdbc workflowJdbc workflow
Jdbc workflow
 
2 jdbc drivers
2 jdbc drivers2 jdbc drivers
2 jdbc drivers
 
3 jdbc api
3 jdbc api3 jdbc api
3 jdbc api
 
4 jdbc step1
4 jdbc step14 jdbc step1
4 jdbc step1
 
Dao example
Dao exampleDao example
Dao example
 
Sessionex1
Sessionex1Sessionex1
Sessionex1
 
Internal
InternalInternal
Internal
 
3. elements
3. elements3. elements
3. elements
 
2. attributes
2. attributes2. attributes
2. attributes
 
1 introduction to html
1 introduction to html1 introduction to html
1 introduction to html
 
Headings
HeadingsHeadings
Headings
 
Forms
FormsForms
Forms
 
Css
CssCss
Css
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Starting jdbc
Starting jdbcStarting jdbc
Starting jdbc
 

Último

Último (20)

Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 

9 cm604.75

  • 2. Objective On completion of this period, you would be able to know • Dialog box 2
  • 3. Recap In the previous class, you have leant •Menu bars and menus 3
  • 4. Dialog Box • Dialog boxes are primarily used to obtain user input • They are similar to frame windows, except that dialog boxes are always child windows of a top- level window • Dialog boxes don’t have menu bars
  • 5. Dialog Box contd.. • Dialog boxes may be modal or modeless • Modal means – Focus is always on the current dialog box
  • 6. Dialog Box contd.. • Two commonly used constructors are shown here – Dialog(Frame parentWindow, boolean mode) – Dialog(Frame parentWindow, String title, boolean mode) – Here, parentWindow is the owner of the dialog box. If mode is true, the dialog box is modal – Otherwise, it is modeless
  • 7. swings Struts jdbc hibernate home java previous question papers OCT/NOV-2012 QUESTION PAPER April / May 2012 c-09 October/ November-2011 c-09 April/ May 2011 c-09 April/ May 2011 c-05 Home 7
  • 8. Methods of Dialog Box • Commonly used methods – void show() • Shows the dialog – String getTitle() • Returns the title of the dialog – void setTitle(String title) • Sets the dialog title – boolean isModal() • Checks whether the dialog is modal or not
  • 9. Methods of Dialog Box contd.. • void setModal(boolean flag) – Sets the current dialog to modal • boolean isResizable() – Returns whether the dialog is resizable • setResizable(boolean flag) – Sets the dialog to be resizable
  • 10. Example Program import java.awt.* import java.awt.event.*; public class DialogDemoextendfs Frame{ public DialogDemo{ setTitle(“MyDialog”); setSize(250,200); setVisible(true); Dialog myDialog = new Dialog(this,”Dialog”); myDialog.setSize(150,100: myDialog.show(); }
  • 11. Example Program contd.. public static void main(String args[]){ new DialoDemo(); } }
  • 12. Summary • In this class we have learnt – Different constructors of Dialog – Methods of Dialog class – Example program
  • 13. Quiz 1. The method useful for setting a dialog to be modal a) getModal() b) setTitle() c) setModal() d) isModal()
  • 14. Frequently Asked Questions 1. List and explain the constructors of Dialog class 2. List and explain the methods of dialog class
  • 15. swings Struts jdbc hibernate home java previous question papers OCT/NOV-2012 QUESTION PAPER April / May 2012 c-09 October/ November-2011 c-09 April/ May 2011 c-09 April/ May 2011 c-05 Home 15