Drawing graphics: –

Drawing graphics: - The user can draw lines, rectangles, ovals and other free hand drawing using the mouse. The real care of awt graphics is the hug awt graphic class, which is derived directly from java.lang.object. Drawing free hand drawing with the mouse is a little different. In that case, we store up to one... Continue Reading →

Advertisements

Design image: –

Design image: - User can design image using java applet. We can use java image to display it on the screen. Java image is supported by the image class. Images are manipulated using the classes found in the java.awt.image package. To read in the image, we use get image method. To draw the image using... Continue Reading →

Creating frame window: –

Creating frame window: - The frame window used in java for creating a new window inside the main window just as we can handle them anywhere by implementing the method of listener interface. Here is an example in which we handle mouse event in the frame window adopted over the previous window by the implementing... Continue Reading →

Creating window application: –

Creating window application: - When we write a windowed application, we are responsible for creating our own window in which to display that application. The most common type of window to use for this is java frame window. The java frame window can be use with java.awt.Frame class. If we launch the application with the... Continue Reading →

Adding multiple buttons: –

Adding multiple buttons: - java provide facility to add multiples button using setFocusable() method which requires Boolean value and will decide whether component can gain the focus or not, and also use requestFocusInWindow() method which will be let us the component the gain the focus on startup. Where we design three buttons and a text... Continue Reading →

Standard event handling: –

Standard event handling: - We can add new button with the text “Click Me!” to an applet as well as adding an action listener that will be notify when the button clicks. To add an action listener to the button, we use button’s addActionListener method, passing it to an object that implements the method of... Continue Reading →

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: