Dialog Class

September 12th, 2006 Admin Posted in Abstract Windowing Toolkit (AWT) No Comments »

* A Dialog is a top-level window with a title and a border
* A dialog must have either a frame or another dialog as its Parent.
* When the owner window of a visible dialog is hidden or minimized, the
dialog will automatically be hidden from the user.
* A dialog can be either modeless(the default) or modal.
* A modal dialog is one which blocks input to all other toplevel windows.
* Dialogs are capable of generating the following window events:
WindowOpened, WindowClosing,
WindowClosed, WindowActivated,
WindowDeactivated.
1. Dialog(Dialog owner)
2. Dialog(Dialog owner, String title)
3. Dialog(Dialog owner, String title,boolean modal)
4. Dialog(Frame owner)
5. Dialog(Frame owner, boolean modal)
6. Dialog(Frame owner, String title) 7.Dialog(Frame owner, String title,boolean modal)
1. void dispose() Disposes the Dialog and then causes show() to return if it is currently blocked.
2. String getTitle() Gets the title of the dialog.
3. void hide() Hides the Dialog.
4. boolean isModal() Indicates whether the dialog is modal.
5. boolean isResizable() Indicates whether this dialog is resizable by the user.
6. void setModal(boolean b) Specifies whether this dialog should be modal.
7. void setResizable(boolean resizable) Sets whether this dialog is resizable by the user.
8. void setTitle(String title) Sets the title of the Dialog.
9. void show() Makes the Dialog visible

AddThis Social Bookmark Button

Dialog Class

September 11th, 2006 Admin Posted in Abstract Windowing Toolkit (AWT) No Comments »

* A Dialog is a top-level window with a title and a border
* A dialog must have either a frame or another dialog as its Parent.
* When the owner window of a visible dialog is hidden or minimized, the dialog will automatically be hidden from the user.
* A dialog can be either modeless(the default) or modal.
* A modal dialog is one which blocks input to all other toplevel windows.
* Dialogs are capable of generating the following window events:
WindowOpened, WindowClosing,
WindowClosed, WindowActivated,
WindowDeactivated.

1. Dialog(Dialog owner)
2. Dialog(Dialog owner, String title)
3. Dialog(Dialog owner, String title,boolean modal)
4. Dialog(Frame owner)
5. Dialog(Frame owner, boolean modal)
6. Dialog(Frame owner, String title)

7.Dialog(Frame owner, String title,boolean modal)

1. void dispose() Disposes the Dialog and then causes show() to return if it is currently blocked.
2. String getTitle() Gets the title of the dialog.
3. void hide() Hides the Dialog.
4. boolean isModal() Indicates whether the dialog is modal.
5. boolean isResizable() Indicates whether this dialog is resizable by the user.
6. void setModal(boolean b) Specifies whether this dialog should be modal.
7. void setResizable(boolean resizable) Sets whether this dialog is resizable by the user.
8. void setTitle(String title) Sets the title of the Dialog.
9. void show() Makes the Dialog visible

AddThis Social Bookmark Button

Graphics class

September 11th, 2006 Admin Posted in Abstract Windowing Toolkit (AWT) No Comments »

This is the class in java.awt package, which is defined as
public abstract class Graphics extends Object

The Graphics class allows an application to draw onto components. A Graphics object holds  state information needed for the basic drawing operations. This state information includes the following properties:

The Component object on which to draw.
A translation origin for rendering and clipping coordinates.
The current clip.
The current color.
The current font.

Methods

1. drawLine(int x1,int y1,int x2,int y2)
2. drawString(String s,int x,int y)
3. drawRect(int x,int y,int w,int h)
4. drawPolygon(int x[],int y[],int n)
5. drawPolyline(int x[],int y[],int n)
6. drawOval(int x,int y, int w,int h)
7. drawRoundRect(int, int, int, int, int, int)
8. drawArc(int x,int y,int w,int h,int sa,int ea)
9.  fillRect(int x,int y,int w,int h)
10.  fillPolygon(int x[],int y[],int n)
11.  fillOval(int x,int y, int w,int h)
12.  fillRoundRect(int, int, int, int, int, int)
13.  fillArc(int x,int y,int w,int h,int sa,int ea)
14.  fill3DRect(int ,int , int, int ,boolean)drawImage(Parameters….);
setColor(), getColor(), setFont(), getFont() ….

AddThis Social Bookmark Button