{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lecture-21 - 49 Sample Java Standard Classes • Using...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
49 Object Oriented Programming – Java: Getting Started R.B. Lenin Winter 2006 DA - IICT Sample Java Standard Classes Using existing Java classes is an important step in becoming a successful and proficient Java programmer We will introduce four standard classes here: – JOptionPane – String – Date – SimpleDateFormat
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
50 Object Oriented Programming – Java: Getting Started R.B. Lenin Winter 2006 DA - IICT Sample Java Standard Classes JOptionPane class is useful to display a result of a computation to the user in a simple way In a Graphical User Interface (GUI) environment, there are two types of windows: General-purpose frame JFrame class Special-purpose dialog JOptionPane class JOptionPane.showMessageDialog(null, “I Love Java”); First argument – frame object that controls this dialog Second argument – text to display
Background image of page 2
51 Object Oriented Programming – Java: Getting Started R.B. Lenin Winter 2006 DA - IICT A simple “message” dialog created by the showMessageDialog method of the JOptionPane class
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
52 Object Oriented Programming – Java: Getting Started R.B. Lenin Winter 2006 DA - IICT
Background image of page 4
53 Object Oriented Programming – Java: Getting Started R.B. Lenin Winter 2006 DA - IICT
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
54 Object Oriented Programming – Java: Getting Started R.B. Lenin Winter 2006 DA - IICT
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}